The Demo Program
The Orangutan ships with a demo/test program pre-loaded. This demonstrates most of its features and allows you to test that it is working correctly. When you first turn on your Orangutan, you will hear a beep and see the words “Pololu xV-xx8”, then “Demo Program” appear, indicating that you are running the demo program. If you hear a beep but do not see any text on the LCD, you may need to adjust the contrast potentiometer in the upper-right corner of the board. When the program has started successfully, press the B button (the middle button, marked PB4 on the underside of the board) to proceed to the main menu. Press C (the top button, marked PB5) or A (the bottom button, marked PB1) to scroll forward or backward through the menu, and press B to make a selection or to exit one of the demos. There are seven demos accessible from the menu:
The source code for the demo program is included with the Pololu AVR C/C++ Library. After downloading and unpacking the library zip file, the demo program can be found in the appropriate
The “Secret” Test Program
The demo program contains a simpler test program that can be triggered if you hold one of the user pushbuttons while resetting or turning on the controller. We use this program to test each Orangutan before it ships. When this test program first begins running, the LCD will display a startup screen followed shortly by an interpretation of the voltage on pin ADC6. On the Orangutan SV-xx8, this figure represents the current battery voltage in millivolts; on the Orangutan LV-168, this figure represents the output of the temperature sensor in degrees Fahrenheit (if you touch the board near the center you should see the temperature rise). From this point on, you can use the three user pushbuttons to navigate through the three demo modes:
A Button: Motor Demo
Pushing the bottom user pushbutton (labeled PB1 on the back of the Orangutan PCB) will take you to the motor demo, which alternates between driving motors 1 and 2 forward and reverse. First, the Orangutan gradually ramps motor 1 from stationary to full-speed forward, to full-speed reverse, and back to stationary; motor 2 is stationary during this entire phase. Next, the Orangutan repeats this process with motor 2 while motor 1 remains stationary. The two motors alternate periods of activity like this for the duration of the demo. While motor 1 is active, the red LED is lit, and while motor 2 is active the red LED is off. While the currently active motor is moving forward, the green LED is lit, and while the currently active motor is moving in reverse, the green LED is off. The LCD gives you feed back about which motor is moving in which direction: “F” = forward, “R” = reverse, and “-” = inactive.
B Button: User I/O Demo
Pushing the middle user pushbutton (labeled PB4 on the back of the Orangutan PCB) will take you to the user I/O demo, which makes use of the eight user I/O pins and the trimmer potentiometer. At any given time, one pin is being driven low while the rest are weakly pulled high. At the same time, the LCD displays the input values on the eight user I/O pins. If you short a pin to ground, you will see the corresponding bit on the LCD go to zero. Pin PD1 will always read as low because it is being pulled down through the red user LED. The pin that is driven low will repeatedly cycle from left to right and back again, “bouncing” back and forth from PC5 to PD0 to PC5. The period of this cycle is determined by the position of the user potentiometer. You can connect an LED between an I/O lines and power (), and the LED will light each time the pin it’s connected to is driven low.
Note: or else you could damage the ATmega168 microcontroller when it tries to drive that pin low; only short it to one of the ground pins along the top edge of the board, or use an LED in series with a resistor to connect to power.
C Button: Melody Demo
Pushing the top user pushbutton (labeled PB5 on the back of the Orangutan PCB) will take you to the melody demo, in which the Orangutan plays a fugue on the buzzer while using high-frequency software PWM to alternately fade the red and green user LEDs in and out. The demo program uses the Pololu AVR library to play the melody directly from program memory (i.e. flash), thereby conserving RAM, and it uses timer interrupts to play the melody notes at the proper times, so program execution is not blocked as the melody plays.
US toll free: 1-877-7-POLOLU ~