Good day comrades!
I finally have some free time, and today I bring to your attention a new article! This time, I'll tell you about the hardware of my robot.
The project includes the following electronic components:
- Parallax continuous rotation servo (2 pcs).
- Parallax robotics shield kit (1 pcs).
- Arduino Uno (1 pcs).
- Sound card (from previous articles, 1 pcs).
- AA batteries (5 pcs).
- Micro SD card slot (for the next stage, 1pcs)
To date the robot is fully assembled, but if necessary it will not be difficult to modify a bit its construction, in particular using microSD card slot and replacing Arduino Uno by Arduino Due. However, the initial idea of the project may be realized just now.
As for melody playback, it works, of course:
Also, I tried the robot in motion. To do this, I wrote a simple program that makes the robot move in a random route:
The program of his movement as a whole is very simple and everyone can try it on his robot:
#include <Servo.h> #define LSERVO 13 #define RSERVO 12 #define SPD 0 Servo Lservo, Rservo; int getRand(void) { long r = random(0+SPD, 180-SPD); r = (r / 10) * 10; return (int)r; } void setup(void) { Lservo.attach(LSERVO); Rservo.attach(RSERVO); Lservo.write(90); Rservo.write(90); randomSeed(analogRead(0)); } void loop(void) { Rservo.write(getRand()); Lservo.write(getRand()); delay(1000); }
Before finishing the article, I want to do important announcements:
- My [survey] is nearing completion and the next week I’ll finally decide in what direction I’ll have to go on.
- I like very much the melody from the Star Wars, but I think you have your favorite melody you want to be performed by my robot. Any suggestions? Write it in [ ] topic.
- Due to the fact that the dates of the competition [were changed] I'm not going to rush things and immediately post the 7th article, instead I’ll spend more time writing and debugging the robot’s software, and only after that I'll post the following article.
Thank you. See you soon!