Tutorial 15 - Control the robotic arm using an infrared remote controller - ADA031-V5.0
Adeept · Uploaded · 3:59 · Watch on YouTube
Adeept walks through uploading its infrared remote control sample code to the ADA031-V5.0 robotic arm controller board. It explains what each remote key does, including servo selection, angle steps, posture saving to EEPROM, and LED control.
Transcript
Captions as a .vtt fileEmbed with the transcript
- 0:04In this lesson, we will learn to control the robotic arm with an infrared remote controller.
- 0:10Connect the robotic arm controller board to your computer via a USB cable,
- 0:17attach the battery and turn on the power switch.
- 0:20If the ESP8266 module is installed, set the upload switch to position 0.
- 0:27Open the infrared remote control sample code.
- 0:33Select the matching board model and serial port, then upload the program to the controller board.
- 0:39When the upload completes successfully, the buzzer will beep to notify you that the program has started.
- 0:56To operate the robotic arm smoothly, let's first learn the function of each button on the remote controller.
- 1:03The up and down keys rotate the selected servo within the range of 0 to 180 degrees.
- 1:08Keys A, B, C, D adjust the angle increment for each servo movement.
- 1:18They correspond to 1 degree, 3 degrees, 5 degrees, and 10 degrees respectively to change the movement speed of the robotic arm.
- 1:27The OK key sets the selected servo to 90 degrees, and key 0 sets all servos to 90 degrees.
- 1:49Keys 1 to 6 map to servo 1 through servo 6.
- 1:53Press a key to select the target servo for control.
- 1:56Key E saves the current robotic arm posture.
- 2:10The posture data is stored in EEPROM, and the arm will automatically load this saved posture upon every power-up.
- 2:38Key 7, 8, and 9 control WS2812 LEDs for red, green, and blue light respectively.
- 2:46Key F turns off all WS2812 LEDs.
- 2:50Code Explanation
- 3:04Setup Function
- 3:06Setup Function
- 3:06Initialize the OLED display, WS2812 LEDs, infrared receiver, buzzer, and other peripherals.
- 3:16Loop Function
- 3:16Continuously detect and decode remote signals and update status flags.
- 3:22Based on these flags, the state machine executes tasks including servo rotation, WS2812 LED control, and OLED screen refresh.
- 3:32Once you get familiar with this code, you can write custom programs as required and develop more interesting features for your robotic arm.
Discussion
A mail when somebody comments. No account needed.
The newsletter
Get our free newsletter with new robots, prices and robotics news.