-
Notifications
You must be signed in to change notification settings - Fork 516
Adding Pinoccio Scout to Boards.h #220
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Please also add the UART pins. See how I've done this for Mega. It should be similar for Pinoccio. Also add the |
@soundanalogous Thanks - I've rebased and added the UART pins and macro per your recommendation |
#define PIN_SERIAL1_TX 1 | ||
#define PIN_SERIAL2_RX 13 | ||
#define PIN_SERIAL2_TX 14 | ||
#define IS_PIN_DIGITAL(p) (((p) >= 2) && ((p) <= 8)) || (((p) >= 24) && ((p) <= 31)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do pins 0 and 1 map to Serial or Serial1? If they map to Serial1, the you should be able to use pins 0 and 1 as digital inputs unless those pins don't have digital I/O for some other reason.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay I found the pinout for the Pinoccio. They did tie the usb serial to digital pins 0 and 1. The number at the end of PIN_SERIAL aligns with the Serial object, so PIN_SERIAL1 is for Serial1, PIN_SERIAL2 is for Serial2. You should remove lines 568 and 569 and change the following 2 lines to PIN_SERIAL1 (so you'll only map to pins 13 and 14 for now since the default Serial object is reserved for Firmata communication). At some point I'll open it up when using Firmata via a non-serial channel such as Ethernet or WiFi.
Thanks for looking that up for me and for your patience in explaining it. I was wondering why the numbering started at 1 and not 0, so that makes perfect sense. Per your earlier comment, I've also extended the range of digital pins to include 9-16 which are mapped this way: #define SS 9
#define MOSI 10
#define MISO 11
#define SCK 12
#define RX1 13
#define TX1 14
#define SCL 15
#define SDA 16 Does that look correct? |
If those pins can be used as digital I/O pins then they should be included in the range of digital pins. You should test it against StandardFirmata if you have not already. Users may not know which digital pin numbers to specify for those pins since they fall out of order as they are arranged on the board. It would be helpful to document this somewhere. Add a comment to the code here. It may end up being a bit of a hidden feature. |
Roger that. I've verified all the digital pins work to blink an LED and added a comment to explain the numbering. |
Cool I think we're good here. Merging... |
Adding Pinoccio Scout to Boards.h
This adds a definition to Boards.h for the Pinoccio Scout, an Arduino compatible device similar to the Mega, as seen here: https://pinocc.io/