Debug Prints Firmware



I’m trying to figure out where the Serial.print statements made in the firmware are actually printed. Can they be seen in the excution of Python code?


Hi @cjirvene,

The Serial.print statements in the firmware are only for debugging with the serial port attached and cannot be seen in the python programs.
Are you trying to debug anything in particular?



Thanks for the quick response Shoban. Yes, I’m trying to debug a program I’m writing which uses the encoder readings. So I need to see the output of the encoders while the motors are operating. Do you have any recommendations on how to do this?


Hi @cjirvene,

It would be hard to read and print the bare encoder values in the firmware because it is a bit tricky to see the print statements from the firmware.
We have two examples with encoder. One example is for encoder targeting and another one is to read encoder values.

You can try these out and see if that works good for you.

Please let us know if this helps,


Ok I see, that leads me to 2 questions.

  1. What does the encoder targeting do?
  2. How can I calculate the speed of each motor from the encoder readings in firmware?

Thanks in advance for your help.


Hi @cjirvene,

Encoder Targetting, helps the robot to move to a target distance. A small documentation on this is available here.

To calculate the speed, you will need to know the distance and time. To find the distance you can use this example to read the encoder count and each encoder count corresponds to an approximate movement of 1cm.
To find the time taken to move a distance you can use time.time() function from python.

Thus speed can be calculated knowing the time and distance as speed= distance/time.

Please let us know if this helps,