Skip to content

Debugging low level systems

VivaanBahl edited this page Jan 14, 2016 · 2 revisions

https://github.com/CMU-Robotics-Club/RoboBuggy/tree/master/real_time/arduino_src#to-setup-avr-lib-look-at

Due to the nature of embedded systems, the Arduino Mega lacks any graphical interface. As such, in order to read any console output (from calling printf or some other function to output to stdout/stderr), a connection must be made between the Arduino Mega's uart2 and the computer with the serial console (CoolTerm or the Arduino Serial window). A serial to USB cable is the simpler option, but an Arduino running the Blink sketch or some other simple program which does not use the serial port can be used.

Note:

  • If an Arduino is being used, the TX2 of the Buggy's Mega and the TX0 of the other Arduino must be connected, as must the RX2 and RX0, respectively. IMPORTANT The Arduinos must share a common ground.
  • Make sure that the baud rate of the serial console and the Buggy's Arduino are the same.