janelia-arduino/TMC2209

Arduino uno move at velocity bidarectional communication example compilation fail

miszaklajent opened this issue · 1 comments

C:\Users\l\AppData\Local\Temp.arduinoIDE-unsaved202374-36508-449txq.1z946\MoveAtVelocity\MoveAtVelocity.ino:3:34: error: 'Serial1' was not declared in this scope
HardwareSerial & serial_stream = Serial1;
^~~~~~~
C:\Users\l\AppData\Local\Temp.arduinoIDE-unsaved202374-36508-449txq.1z946\MoveAtVelocity\MoveAtVelocity.ino:3:34: note: suggested alternative: 'Serial'
HardwareSerial & serial_stream = Serial1;
^~~~~~~
Serial

exit status 1

Compilation error: 'Serial1' was not declared in this scope

Yes the Uno board does not have a Serial1 port that can be used to talk to the TMC2209. The only serial port on the Uno, Nano, Mini boards is shared with communication to the host computer, so that should probably not be used to communicate with the TMC2209 either. You can use SoftwareSerial on the Uno, Nano, and Mini boards, however, but only for unidirectional communication. Thank you for creating the issue, I will add comments in all of the examples about them not working with those boards.