5.b. Using the Demo Program

The Demo Program

The Orangutan SVP ships with a demo program pre-loaded which demonstrates most of its features and allows you to test that it is working correctly. After you first connect an external power supply and turn on your Orangutan, you should see the red user LED blinking about once per second. If you have soldered a buzzer in to your SVP (or bought the assembled version), you will also hear a beep. If you have connected an LCD, you will see the words “Pololu Orangutan SVP”, then “Demo Program” appear, indicating that you are running the demo program. If you see the blinking red LED but do not see any text on the LCD, you may need to adjust the contrast potentiometer in the lower left corner of the board. When the program has started successfully, press the Middle Button button (marked PC3 on the underside of the board) to proceed to the main menu. Press the Top Button (marked PC5) or the Bottom Button (marked PC2) to scroll forward or backward through the menu, and press the Middle Button to make a selection or to exit one of the demos. There are nine demos accessible from the menu:

  1. Analog Inputs: This demo displays voltage readings from the Orangutan SVP’s 13 analog inputs as a bar graph. The inputs are in this order: PA7, PA6, PA5, PA4, PA3, PA2, PA1, PA0, trimpot, A, B, C, D. You can press the top button to enable/disable the pull-up resistors on PA0—PA7.
  2. Battery Voltage: This demo displays the battery voltage in millivolts.
  3. Digital Inputs: This demo displays the digital readings from some of the user-accessible digital input lines. The pull-up resistors are enabled, so each line should read 1 if they are not connected to anything. If you connect a wire between one of these lines and ground, you should see its reading go to zero (be careful not to cause a short circuit).
  4. LEDs: Blinks the red and green user LEDs.
  5. Trimpot: Displays the position of the user trimmer potentiometer, which is located in the upper left corner of the board, as a number between 0 and 1023. While displaying the value, this demo also blinks the LEDs and plays a note whose frequency is a function of the current reading. It is easiest to turn the trimpot using a 2 mm flat-head screwdriver.
  6. Motors: Hold down the bottom or top buttons to run motors 1 or 2, respectively, or hold down both buttons to run both motors simultaneously. The motors will gradually ramp up to speed; in your own programs, you can switch them on much more suddenly. Tap the bottom or top buttons to switch the corresponding motor to reverse (the button name becomes lowercase if pressing it will drive the corresponding motor in reverse).
  7. Music: Plays a song while scrolling a text display. This demonstrates the ability of the Orangutan to play music in the background.
  8. Timer: A simple stopwatch. Press the bottom button to start or stop the stopwatch and the top button to reset. The stopwatch continues to count while you are exploring the other demos.
  9. USB: Demonstrates the USB connection between the Orangutan SVP and a computer. Plug the Orangutan SVP in to USB. Any bytes you send on the Pololu Orangutan SVP USB Communications Port (Section 8) will be displayed on the screen, and echoed back to the computer so you can see them in your terminal program. The red LED indicates the state of the DTR handshaking line, and the green LED indicates the state of the RTS handshaking line.

The source code for the demo program is included with the Pololu AVR C/C++ Library in the examples\atmega324p\svp-demo-program or examples\atmega1284p\svp-demo-program directory, depending on whether you have the SVP-324 or SVP-1284.