Size: 2197
Comment:
|
Size: 2254
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 61: | Line 61: |
note: For future upluads only steps 5-6 are required. |
![]() |
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
Contents
In order to upload new code to the micro-controller, follow these steps:
Install Java
1 sudo apt-get install gcc-avr avr-libc openjdk-6-jre
2 sudo update-alternatives --config java
Install the Arduino IDE
Install Arduino 1.5.6 or newer from (http://arduino.cc/en/main/software).
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 f 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.
Warning: Editing code incorrectly may cause damage to elements of the robotw
note: For future upluads only steps 5-6 are required.