-
Notifications
You must be signed in to change notification settings - Fork 14
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
Support PlatformIO for Arduino project #6
base: main
Are you sure you want to change the base?
Conversation
Not a bad idea but it would break Arduino IDE compatibility (both the .ino and main.cpp would need to be kept in sync). Any other for/against? |
I haven't used the Arduino IDE in a (long) while. I'm not sure it still insists on I'm not sure if this PR would break Arduino IDE compat though? As long as you open only the But I agree that having the If I have time tomorrow I'll try and see what I can come up with (being a primarily .Net developer I'm not sure if what I come up with is the best approach...) |
Changing #include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#include "../../ArduinoProgrammerFirmwarePrototype/ArduinoProgrammerFirmwarePrototype.ino" ...and adding this to #include <Arduino.h> ... seems to work. But that seems a little bit (very) dirty to me... |
Having a separate cpp file and directory for platformio isn't necessary. As long as the source directory and the ino file have the same name, which they already do in this case, then Platformio will automatically convert the ino file at compile time. Adding There is a decision regarding where to place the platformio.ini and .gitignore file. You can place them in the software/Arduino directory or the software/Arduino/ArduinoProgrammerFirmwarePrototype directory. If there is a chance additional software will ever be placed in the software/Arduino directory I recommend placing them in the ArduinoProgrammerFirmwarePrototype directory. If placed in software/Arduino the platformio section of platformio.ini should be as follows:
If placed in the ArduinoProgrammerFirmwarePrototype directory the following instead:
|
This pull request adds PlatformIO support (https://platformio.org). It also gets rid of 2 compilation warnings. It also incorporates PR #5 by @BizarroBull ('cast result of Serial.read() so it doesn't get treated as signed when bit shifting').