I am having a problem with recognizing the serial library. When I load any example involving serial I get this error.
C:\Users\nicol\OneDrive\Documents\Arduino\libraries\SparkFun_HyperDisplay_Transparent_Grahical_OLED_Library\examples\Example1_DisplayTest/Example1_DisplayTest.ino:84: undefined reference to `Serial’
collect2.exe: error: ld returned 1 exit status
I got the OLED to work by commenting out the serial part since I am using I2C with the qwic connector. But I when I try any other example or code with serial I still get that error. I tried it on an Uno I got laying around and it worked fine. I have read that Windows 10 has some driver issues with the SAMD21. I don’t know at this point and I hope you guys can help.
When using the Redboard Turbo, you have to replace Serial by SerialUSB everywhere in the code.
See this in the hookup guide: https://learn.sparkfun.com/tutorials/re … rial-ports
Same problem here. I can replace Serial with SerialUSB in my sketch, but still run into a lot of issues with libraries? Specifically for the weather shield.
Arduino: 1.8.9 (Windows Store 1.8.21.0) (Windows 10), Board: "SparkFun RedBoard Turbo"
sketch\default.ino.cpp.o: In function `printWeather()':
\Weather Meter\basic_weather\default/default.ino:444: undefined reference to `Serial'
sketch\default.ino.cpp.o: In function `setup':
\Weather Meter\basic_weather\default/default.ino:172: undefined reference to `Serial'
libraries\SparkFun_Si7021_Humidity_and_Temperature_Sensor\SparkFun_Si7021_Breakout_Library.cpp.o: In function `Weather::begin()':
\Documents\Arduino\libraries\SparkFun_Si7021_Humidity_and_Temperature_Sensor\src/SparkFun_Si7021_Breakout_Library.cpp:72: undefined reference to `Serial'
collect2.exe: error: ld returned 1 exit status
exit status 1
Error compiling for board SparkFun RedBoard Turbo.
Any ideas?
Hi, and thank you for posting your question on our new support forums!
Unfortunately the code and library for the weather shield were written before we carried the RedBoard Turbo and both are not quite compatible with the Turbo. You’d also need to modify the library as well since it appears the library is making calls to Serial as well.
It’s frustrating, but at the time, nobody had conceived the SAMD21 would be in use on an Arduino board and there was no mechanism built into the library to deal with that.