Cyber Week Sale – click for coupon codes!

4. Using the preloaded demo program

Your 3pi+ 32U4 ships preloaded with a program that demonstrates most of its features. We recommend trying out this program to familiarize yourself with what it can do before moving on to programming it yourself.


When you first turn on your 3pi, you should hear a beep and see an introductory screen followed by a prompt to press the B button, which will take you to the main menu. On the original (LCD) version of the 3pi+ 32U4, if you hear a beep but do not see anything on the LCD, you might need to adjust the contrast potentiometer on the control board near the top right corner of the LCD. Once you are at the main menu, you can press C or A to scroll forward or backward through the menu, and you can press B to make a selection or to exit one of the demos. These demos are accessible from the menu:

  1. Power: This demo displays the battery voltage in millivolts, which should be above 5000 (5.0 Volts) for a fully-charged set of rechargeable batteries or a fresh set of alkalines, and indicates whether USB power is present.
  2. LineSens: This demo shows the current readings of the five IR line sensors using a bar graph. Bigger bars mean lower reflectance (e.g. the sensor is over something dark). Placing a reflective object such as your finger under one of the sensors should cause the corresponding reading to drop visibly on the graph. This demo also displays “C🞶” or “C·” to indicate that button C has an effect on the IR emitters—the emitters are on by default, and pressing C will turn them off for as long as the button is held. In indoor lighting conditions away from bright incandescent or halogen lights, all of the sensors should return entirely black readings with the IR emitters off.
  3. BumpSens: This demo lets you try out the bump sensors along the front side of the robot. While the left sensor is pressed, the screen will display “L” and the yellow LED will be on. While the right sensor is pressed, the screen will display “R” and the red LED will be on. The buzzer will also beep each time a bump sensors is pressed, with a different tone for left and right. Note: this demo will only work if the bump sensor supports have been cut; assembled versions ship with them already cut, but you will need to cut them yourself as described in the assembly instructions (Section 3) if you got the kit version.
  4. Inertial: This demo lets you try out the robot’s inertial sensors. As you make the robot roll, pitch, or yaw in your hands, the top line of the screen will display which axis (±X, Y, or Z) the robot is rotating about, as measured by the integrated three-axis gyro. While the robot is stationary, it should just display “Rot”, with no axis listed. The bottom line of the screen will display which robot axis is currently pointing up (i.e., in the opposite direction of gravity), as measured by the integrated three-axis accelerometer. When sitting on a flat table, it should say “Up+Z”. You can try tilting various parts of the robot to face up to see how that changes.
  5. Compass: This demo uses the robot’s integrated three-axis magnetometer to measure the Earth’s magnetic field and determine which compass direction it is facing. The demo is constantly calibrating, and in order to work well, the robot should initially be rotated about various axes (the screen will start by displaying “Turn me!” to indicate this). Please note that the Earth’s magnetic field can be distorted by stronger local magnetic fields, especially in close proximity to iron or steel, so if the demo is not working well, try changing locations. Also, please note that magnetic field orientations vary across the surface of the Earth, and magnetic north often deviates from true north.
  6. Motors: This demo lets you try out making the motors spin. Hold down A or C to run the motor on the corresponding side, 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 abruptly. Tap A or C to flip the rotation direction of the corresponding motor (the arrows next to the button letters on the display indicate which direction the motors will turn).
  7. Encoders: This demo displays the left and right motor encoder counts on the screen. You can rotate the wheels by hand to see the counts increase or decrease (based on the direction of rotation). You can also use the A and C buttons to activate the motors rather than turning them by hand (they function the same way as they do in the motors demo described above).
  8. Spin: This demo makes the 3pi spin in place in both directions. Set it on the ground, press the B button to initiate the demo, and then step back and watch it spin!
  9. LEDs: This demo cycles through lighting the red, green, and yellow user LEDs.
  10. OLED or LCD: This demo shows you various text characters you can display on the OLED or LCD screen. Use the buttons to scroll through the pages of characters.
  11. Music: Plays an adaptation of J. S. Bach’s Fugue in D Minor for microcontroller and buzzer, while scrolling a text display. This demonstrates the ability of the 3pi+ to play music in the background.
  12. About (original LCD version only): This displays basic information about the 3pi+ on the LCD.

The source code for the demo program is included as part of the Pololu3piPlus32U4 Arduino Library (DemoForLCDVersion and DemoForOLEDVersion for the respective display types). See Section 7 for more information.

Related Products

3pi+ 32U4 Control Board
3pi+ 32U4 OLED Robot Kit with 30:1 MP Motors (Standard Edition Kit)
3pi+ 32U4 OLED Robot Kit with 15:1 HPCB Motors (Hyper Edition Kit)
3pi+ 32U4 OLED Robot - Turtle Edition (75:1 LP Motors), Assembled
3pi+ 32U4 OLED Robot - Standard Edition (30:1 MP Motors), Assembled
3pi+ 32U4 OLED Robot - Hyper Edition (15:1 HPCB Motors), Assembled
3pi+ 32U4 OLED Control Board
3pi+ 32U4 Robot Kit with 75:1 LP Motors (Turtle Edition Kit)
3pi+ 32U4 Robot Kit with 30:1 MP Motors (Standard Edition Kit)
3pi+ 32U4 Robot Kit with 15:1 HPCB Motors (Hyper Edition Kit)
3pi+ 32U4 Robot - Turtle Edition (75:1 LP Motors), Assembled
3pi+ 32U4 Robot - Standard Edition (30:1 MP Motors), Assembled
3pi+ 32U4 Robot - Hyper Edition (15:1 HPCB Motors), Assembled
3pi+ 32U4 OLED Robot Kit with 75:1 LP Motors (Turtle Edition Kit)
Log In
Pololu Robotics & Electronics
Shopping cart
(702) 262-6648
Same-day shipping, worldwide
Menu
Shop Blog Forum Support
My account Comments or questions? About Pololu Contact Ordering information Distributors