Source code and library to program and control the Pedro robot. Available Control modes : Manual, Record & Replay, Bluetooth, Radio, and USB Serial.
- Install the latest Arduino IDE from arduino.cc.
- In Arduino IDE install PedroRobot library: Sketch → Include Library → Manage Libraries → search PedroRobot → Install.
- Install required dependencies:
- U8glib: Sketch → Include Library → Manage Libraries → search U8glib → Install.
- RF24: Sketch → Include Library → Manage Libraries → search RF24 → Install.
- Select your board: Tools → Board → Arduino Micro and the correct port.
- Open the example: File → Examples → PedroRobot → PedroRobot.
- Compile and upload to the board.
Note: Make sure all dependencies are installed before compiling to avoid errors.
What it does: Direct control of servo motors using onboard buttons.
How to use:
- Power ON Pedro (default mode Manual)
- Use button A0 to Select Servo.
- Use button A1 to Move Servo to Left.
- Use button A2 to Move Servo to Right.
🎓 STEM Insight: Learn about servo motors and direct PWM control.
What it does: Record servo movements, then replay them.
How to use:
- Enter the Select Mode menu (hold button A0 for 4 seconds).
- Choose Record Mode from the menu.
- Press A0 to confirm.
- Move Pedro manually using the buttons (as in Manual Mode).
- Re-enter the Select Mode menu (hold A0 for 4 seconds).
- Select Replay Mode.
- Pedro will now repeat the recorded sequence in a loop.
- To stop or change, re-enter the Select Mode menu.
🎓 STEM Insight: Teaches concepts of timing, sequencing, and automation.
What it does: Control Pedro via smartphone or PC.
How to use:
- Download the Serial Bluetooth app (iOS or Android).
- Create 7 control buttons with the following configuration:
- Name: Servo1 → Value: 1 → Mode: Text → Action: Send.
- Name: Servo2 → Value: 2 → Mode: Text → Action: Send.
- Name: Servo3 → Value: 3 → Mode: Text → Action: Send.
- Name: Servo4 → Value: 4 → Mode: Text → Action: Send.
- Name: FwD (Forward) → Value: 5 → Mode: Text → Action: Send.
- Name: BwD (Backward) → Value: 6 → Mode: Text → Action: Send.
- Name: Stop → Value: 7 → Mode: Text → Action: Send.
- On Pedro, set the switch AT → BT to: BT.
- Pair your device with Pedro’s HC-05 module (default name: HC-05, PIN: 1234).
- Use the app buttons to send commands and control Pedro in real time.
🛠️ AT Mode Setup (Optional – change Pedro’s Bluetooth name):
- Power OFF Pedro.
- Set switch NRF → BT → WiFi to: BT.
- Set switch BT → AT to: AT.
- Power ON Pedro.
- Enter the BLUETOOTH UPDATE menu.
- Change Pedro’s Bluetooth name (e.g., from PEDROROBOT1 up to PEDROROBOT99).
- Pair your device with the new name (PEDROROBOTX).
- Use the app buttons to control Pedro as before.
🎓 STEM Insight: : Students learn about wireless serial communication and how to configure Bluetooth modules for embedded systems.
What it does: Enables remote communication between two Pedro robots or more using the NRF24L01 radio module.
How to use:
- Insert the NRF24L01 module into the left slot of each Pedro board (one robot as transmitter, the other as receiver).
- Set Pedro’s switch NRF → BT → WiFi to: NRF.
- Enter the Select Mode menu (hold button A0 for 4 seconds).
- Choose Radio Mode from the menu.
- Press A0 to confirm.
- Define the robot’s role (type): press A1 to select TRANSMITTER or RECEIVER.
- Press A0 to confirm the role.
- Set a communication Code Key:
- Press A1 to increase (increment).
- Press A2 to decrease (decrement).
- Values range from 1 to 99.
- Press A0 to confirm the Code Key.
- Press A0 again to validate (OK).
Note: Both the transmitter and receiver must use the same Code Key to establish communication.
🎓 STEM Insight: This mode introduces students to the basics of radio frequency communication, addressing concepts like transmitter/receiver pairing and unique channel codes.
What it does: Control Pedro from your PC with Pedro-IHM.
How to use:
- Enter the Select Mode menu (hold button A0 for 4 seconds).
- Choose USB SERIAL MODE from the menu.
- Press A0 to confirm.
- Connect Pedro via USB cable.
- Launch the web controller app.
- Send commands & test servo response.
🎓 STEM Insight: Embedded programming and PC-robot communication.