Skip to content

Conversation

@sandeepmistry
Copy link
Contributor

I've based this on the MKR FOX 1200 definition, and left the highest pin as 32 for the battery ADC. There more pins above 32 defined in the variants but they are used for the LoRaWAN and cellular modules on the boards.

Variants for the new boards are available with the new Arduino SAMD 1.6.17 core release:

#define IS_PIN_SERVO(p) (IS_PIN_DIGITAL(p) && (p) < MAX_SERVOS) // deprecated since v2.4
#define IS_PIN_I2C(p) ((p) == 11 || (p) == 12) // SDA = 11, SCL = 12
#define IS_PIN_SPI(p) ((p) == SS || (p) == MOSI || (p) == MISO || (p) == SCK)
#define IS_PIN_SERIAL(p) ((p) == PIN_SERIAL1_RX || (p) == PIN_SERIAL1_TX) //defined in variant.h RX = 13, TX = 14
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like each of these variants also defines PIN_SERIAL2_RX and PIN_SERIAL2_TX. Please also include those here (and for the other board definition above) if they are user accessible.

#define PIN_TO_PWM(p) PIN_TO_DIGITAL(p)
#define PIN_TO_SERVO(p) (p) // deprecated since v2.4

// Arduino MKR WAN 1300
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it looks like the definitions for each of these variants is identical. In that case can they be combined:
#elif defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRGSM1400)

@soundanalogous soundanalogous merged commit 3028ba8 into firmata:master Apr 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants