|
94 | 94 | #define SPEED_IN_PIN A0 |
95 | 95 | #define MODE_ANALOG_INPUT_PIN A1 |
96 | 96 |
|
| 97 | +#elif defined(ARDUINO_ARCH_SAMD) || defined(ARDUINO_ARCH_SAM) |
| 98 | +#define SERVO1_PIN 5 |
| 99 | +#define SERVO2_PIN 6 |
| 100 | +#define SERVO3_PIN 7 |
| 101 | +#define SPEED_IN_PIN A1 // A0 is DAC output |
| 102 | +#define MODE_ANALOG_INPUT_PIN A2 |
| 103 | + |
| 104 | +#if !defined(ARDUINO_SAMD_ADAFRUIT) |
| 105 | +// On the Zero and others we switch explicitly to SerialUSB |
| 106 | +#define Serial SerialUSB |
| 107 | +#endif |
| 108 | + |
| 109 | +// Definitions for the Chinese SAMD21 M0-Mini clone, which has no led connected to D13/PA17. |
| 110 | +// Attention!!! D2 and D4 are swapped on these boards!!! |
| 111 | +// If you connect the LED, it is on pin 24/PB11. In this case activate the next two lines. |
| 112 | +//#undef LED_BUILTIN |
| 113 | +//#define LED_BUILTIN 24 // PB11 |
| 114 | +// As an alternative you can choose pin 25, it is the RX-LED pin (PB03), but active low.In this case activate the next 3 lines. |
| 115 | +//#undef LED_BUILTIN |
| 116 | +//#define LED_BUILTIN 25 // PB03 |
| 117 | +//#define FEEDBACK_LED_IS_ACTIVE_LOW // The RX LED on the M0-Mini is active LOW |
| 118 | + |
97 | 119 | #else |
98 | 120 | #warning Board / CPU is not detected using pre-processor symbols -> using default values, which may not fit. Please extend PinDefinitionsAndMore.h. |
99 | 121 | // Default valued for unidentified boards |
|
114 | 136 | #if !defined(LED_BUILTIN) && !defined(ESP32) |
115 | 137 | #define LED_BUILTIN PB1 |
116 | 138 | #endif |
117 | | -// On the Zero and others we switch explicitly to SerialUSB |
118 | | -#if defined(ARDUINO_ARCH_SAMD) && !defined(ARDUINO_SAMD_ADAFRUIT) |
119 | | -#define Serial SerialUSB |
120 | | -// The Chinese SAMD21 M0-Mini clone has no led connected, if you connect it, it is on pin 24 like on the original board. |
121 | | -// Attention! D2 and D4 are swapped on these boards |
122 | | -//#undef LED_BUILTIN |
123 | | -//#define LED_BUILTIN 25 // Or choose pin 25, it is the RX pin, but active low. |
124 | | -#endif |
|
0 commit comments