Adafruit Library
Adafruit_Crickit.h
1 #ifndef _CRICKIT_TERSTER_H
2 #define _CRICKIT_TERSTER_H
3 
4 #include "Adafruit_seesaw.h"
5 
6 #define CRICKIT_SIGNAL1 2
7 #define CRICKIT_SIGNAL2 3
8 #define CRICKIT_SIGNAL3 40
9 #define CRICKIT_SIGNAL4 41
10 #define CRICKIT_SIGNAL5 11
11 #define CRICKIT_SIGNAL6 10
12 #define CRICKIT_SIGNAL7 9
13 #define CRICKIT_SIGNAL8 8
14 
15 #define CRICKIT_SERVO4 14
16 #define CRICKIT_SERVO3 15
17 #define CRICKIT_SERVO2 16
18 #define CRICKIT_SERVO1 17
19 
20 #define CRICKIT_MOTOR_A1 22
21 #define CRICKIT_MOTOR_A2 23
22 #define CRICKIT_MOTOR_B1 19
23 #define CRICKIT_MOTOR_B2 18
24 #define CRICKIT_DRIVE1 13
25 #define CRICKIT_DRIVE2 12
26 #define CRICKIT_DRIVE3 43
27 #define CRICKIT_DRIVE4 42
28 
29 #define CRICKIT_TOUCH1 0
30 #define CRICKIT_TOUCH2 1
31 #define CRICKIT_TOUCH3 2
32 #define CRICKIT_TOUCH4 3
33 
34 #define CRICKIT_DUTY_CYCLE_OFF 0
35 #define CRICKIT_DUTY_CYCLE_MAX 65535
36 
37 /**************************************************************************/
42 /**************************************************************************/
44 public:
45  Adafruit_Crickit(){};
46  ~Adafruit_Crickit(){};
47 
48  void analogWrite(uint8_t pin, uint16_t value, uint8_t width = 8);
49  uint16_t analogRead(uint8_t pin);
50  void setPWMFreq(uint8_t pin, uint16_t freq);
51 };
52 
53 #endif
void analogWrite(uint8_t pin, uint16_t value, uint8_t width=8)
write a PWM value to a PWM-enabled pin
Definition: Adafruit_Crickit.cpp:16
void setPWMFreq(uint8_t pin, uint16_t freq)
set the PWM frequency of a PWM-enabled pin. Note that on SAMD09, SAMD11 boards the frequency will be ...
Definition: Adafruit_Crickit.cpp:52
Class that stores state and functions for interacting with seesaw helper IC.
Definition: Adafruit_seesaw.h:235
Class that stores state and functions for interacting with Crickit variant of seesaw helper IC...
Definition: Adafruit_Crickit.h:43
uint16_t analogRead(uint8_t pin)
read the analog value on an ADC-enabled pin.
Definition: Adafruit_Crickit.cpp:33