|
23 | 23 | * installed firmware. */
|
24 | 24 | #define FIRMATA_MAJOR_VERSION 2 // for non-compatible changes
|
25 | 25 | #define FIRMATA_MINOR_VERSION 1 // for backwards compatible changes
|
26 |
| -#define VERSION_BLINK_PIN 13 // digital pin to blink version on |
27 | 26 |
|
28 | 27 | #define MAX_DATA_BYTES 32 // max number of data bytes in non-Sysex messages
|
29 | 28 |
|
@@ -157,26 +156,71 @@ extern FirmataClass Firmata;
|
157 | 156 | #define TOTAL_DIGITAL_PINS 22 // 14 digital + 8 analog
|
158 | 157 | #define TOTAL_PORTS 3 // total number of ports for the board
|
159 | 158 | #define ANALOG_PORT 2 // port# of analog used as digital
|
| 159 | +#define FIRST_ANALOG_PIN 14 // pin# corresponding to analog 0 |
| 160 | +#define VERSION_BLINK_PIN 13 // digital pin to blink version on |
160 | 161 | #elif defined(__AVR_ATmega8__) // old Arduinos
|
161 | 162 | #define TOTAL_ANALOG_PINS 6
|
162 | 163 | #define TOTAL_DIGITAL_PINS 20 // 14 digital + 6 analog
|
163 | 164 | #define TOTAL_PORTS 3 // total number of ports for the board
|
164 | 165 | #define ANALOG_PORT 2 // port# of analog used as digital
|
| 166 | +#define FIRST_ANALOG_PIN 14 // pin# corresponding to analog 0 |
| 167 | +#define VERSION_BLINK_PIN 13 // digital pin to blink version on |
165 | 168 | #elif defined(__AVR_ATmega1280__)// Arduino Mega
|
166 | 169 | #define TOTAL_ANALOG_PINS 16
|
167 |
| -#define TOTAL_DIGITAL_PINS 54 |
168 |
| -#define TOTAL_PORTS 8 // total number of ports for the board |
169 |
| -#define ANALOG_PORT 2 // port# of analog used as digital |
| 170 | +#define TOTAL_DIGITAL_PINS 70 // 54 digital + 16 analog |
| 171 | +#define TOTAL_PORTS 9 // total number of ports for the board |
| 172 | +#define ANALOG_PORT 8 // port# of analog used as digital |
| 173 | +#define FIRST_ANALOG_PIN 54 // pin# corresponding to analog 0 |
| 174 | +#define VERSION_BLINK_PIN 13 // digital pin to blink version on |
170 | 175 | #elif defined(__AVR_ATmega128__)// Wiring
|
171 | 176 | #define TOTAL_ANALOG_PINS 8
|
172 | 177 | #define TOTAL_DIGITAL_PINS 51
|
| 178 | +#define TOTAL_PORTS 7 // total number of ports for the board |
| 179 | +#define ANALOG_PORT 5 // port# of analog used as digital |
| 180 | +#define FIRST_ANALOG_PIN 40 // pin# corresponding to analog 0 |
| 181 | +#define VERSION_BLINK_PIN 13 // digital pin to blink version on |
| 182 | +#elif defined(__AVR_AT90USB162__) // Teensy |
| 183 | +#define TOTAL_ANALOG_PINS 0 |
| 184 | +#define TOTAL_DIGITAL_PINS 21 // 21 digital + no analog |
| 185 | +#define TOTAL_PORTS 4 // total number of ports for the board |
| 186 | +#define ANALOG_PORT 3 // port# of analog used as digital |
| 187 | +#define FIRST_ANALOG_PIN 21 // pin# corresponding to analog 0 |
| 188 | +#define VERSION_BLINK_PIN 6 // digital pin to blink version on |
| 189 | +#elif defined(__AVR_ATmega32U4__) // Teensy |
| 190 | +#define TOTAL_ANALOG_PINS 12 |
| 191 | +#define TOTAL_DIGITAL_PINS 25 // 11 digital + 12 analog |
| 192 | +#define TOTAL_PORTS 4 // total number of ports for the board |
| 193 | +#define ANALOG_PORT 3 // port# of analog used as digital |
| 194 | +#define FIRST_ANALOG_PIN 11 // pin# corresponding to analog 0 |
| 195 | +#define VERSION_BLINK_PIN 11 // digital pin to blink version on |
| 196 | +#elif defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB1286__) // Teensy++ |
| 197 | +#define TOTAL_ANALOG_PINS 8 |
| 198 | +#define TOTAL_DIGITAL_PINS 46 // 38 digital + 8 analog |
173 | 199 | #define TOTAL_PORTS 6 // total number of ports for the board
|
174 |
| -#define ANALOG_PORT 2 // port# of analog used as digital |
| 200 | +#define ANALOG_PORT 5 // port# of analog used as digital |
| 201 | +#define FIRST_ANALOG_PIN 38 // pin# corresponding to analog 0 |
| 202 | +#define VERSION_BLINK_PIN 6 // digital pin to blink version on |
| 203 | +#elif defined(__AVR_ATmega644P__) || defined(__AVR_ATmega644__) // Sanguino |
| 204 | +#define TOTAL_ANALOG_PINS 8 |
| 205 | +#define TOTAL_DIGITAL_PINS 32 // 24 digital + 8 analog |
| 206 | +#define TOTAL_PORTS 4 // total number of ports for the board |
| 207 | +#define ANALOG_PORT 3 // port# of analog used as digital |
| 208 | +#define FIRST_ANALOG_PIN 24 // pin# corresponding to analog 0 |
| 209 | +#define VERSION_BLINK_PIN 0 // digital pin to blink version on |
| 210 | +#elif defined(__AVR_ATmega645__) // Illuminato |
| 211 | +#define TOTAL_ANALOG_PINS 6 |
| 212 | +#define TOTAL_DIGITAL_PINS 42 // 36 digital + 6 analog |
| 213 | +#define TOTAL_PORTS 6 // total number of ports for the board |
| 214 | +#define ANALOG_PORT 4 // port# of analog used as digital |
| 215 | +#define FIRST_ANALOG_PIN 36 // pin# corresponding to analog 0 |
| 216 | +#define VERSION_BLINK_PIN 13 // digital pin to blink version on |
175 | 217 | #else // anything else
|
176 | 218 | #define TOTAL_ANALOG_PINS 6
|
177 | 219 | #define TOTAL_DIGITAL_PINS 14
|
178 | 220 | #define TOTAL_PORTS 3 // total number of ports for the board
|
179 | 221 | #define ANALOG_PORT 2 // port# of analog used as digital
|
| 222 | +#define FIRST_ANALOG_PIN 14 // pin# corresponding to analog 0 |
| 223 | +#define VERSION_BLINK_PIN 13 // digital pin to blink version on |
180 | 224 | #endif
|
181 | 225 |
|
182 | 226 |
|
|
0 commit comments