I am building a project with two environments: one for Arduino Uno and one for Teensy 3.6.
[env:uno] platform = atmelavr board = uno framework = arduino board_build.mcu = atmega328p upload_protocol = usbasp build_flags = -e lib_deps = watterott/digitalWriteFast@^1.0.0 robtillaart/RunningAverage@^0.3.2 khoih-prog/TimerInterrupt@^1.0.2 wilmouths/RGB@^1.0.9 contrem/arduino-timer@^3.0.1 adafruit/Adafruit BusIO@^1.14.5 [env:teensy36] platform = teensy board = teensy36 framework = arduino board_build.f_cpu = 256000000L lib_deps = watterott/digitalWriteFast@^1.0.0 marcoschwartz/LiquidCrystal_I2C@^1.1.4 robtillaart/RunningAverage@^0.3.2 khoih-prog/TimerInterrupt@^1.0.2 wilmouths/RGB@^1.0.9 khoih-prog/Teensy_TimerInterrupt@^1.3.0 luni64/TeensyTimerTool@^1.4.1 contrem/arduino-timer@^3.0.1 adafruit/Adafruit BusIO@^1.14.5
Upon building ONLY for Uno I get a TON of errors regarding the SPI library (which my project heavily depends on) and a contributed library
… the screen goes on and on with errors (I do not want to copy-paste 6 screenshots here), however, particular attention to the following one:
where even Serial is not getting recognised! What is going on?
my headers are:
#include <Arduino.h> #include <SPI.h> #include <digitalWriteFast.h> #include <RGBLed.h> #include <arduino-timer.h>
I have even removed the Teensy environment (commenting it) and it does not want to work
If I right-click on the SPI.h header to see the definition, pio reads the Teensy implementation, not the Arduino avr one
I fully removed ALL references to Teensy, deleted the pio folder and for the first time ever I had to add the
Why do I need it? I do not recall having to include it
I just found out that commenting the following lines in my
.ini file allows me to compile with no errors: