Note: This Tutorial is designed for use only with robots purchased before June 2014. The current packages are in ric

(!) Please ask about problems and questions regarding this tutorial on Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.

Programming the Lizi robot micro-controller

Description: This tutorial explains how to re-upload the code to the Lizi robot micro-controller (Atduino DUE).

Keywords: lizi micro-controller arduino

Tutorial Level: INTERMEDIATE

Next Tutorial: Lizi robot installation

In order to upload new code to the micro-controller, the following commands should be executed locally on the computer which is installed on the Lizi that we want to program:

Install Java

$ sudo apt-get install gcc-avr avr-libc openjdk-6-jre
$ sudo update-alternatives --config java

Install the Arduino IDE

Install Arduino 1.5.6 or newer from (

Configure the default PWM frequency

In your Arduino installation folder go to hardware/arduino/sam/variants/arduino_due_x/ and edit the variant.h:

Look for the line:

#define PWM_FREQUENCY 1000

And change it to:

#define PWM_FREQUENCY 20000

Get the Lizi sketch and libraries

Copy the content of the lizi_robot/lizi_arduino/Arduino folder into your Arduino sketchbook location (usually ~/Arduino).

Upload the sketch

Start the Arduino IDE and load the LiziDUE2 if you have the lizi2 (two motors version) or LiziDUE4 if you have the lizi4 (four motors version).

From Tools->Board select "Arduino Due (Programming Port)".

From Tools->Port select "/dev/ttyACM0 (Arduino Due (Programming Port))".

Click Upload.

Note: For future uploads only steps 1.4-1.5 are required.

Warning: Editing code incorrectly may cause damage to elements of the robot.

Wiki: lizi_robot/Tutorials/Programming the Lizi robot micro-controller (last edited 2014-07-02 05:33:30 by yamgeva)