Hello, LMR. This is Arcee, an Arduino SHR that is perfect for beginners.
----ASSEMBLY---
Materials I Used :
1X μBotino V3 (Or any other Arduino/Clone of your choice)
2X GM9 (143 : 1 Gear Ratio)
2X GM Wheels (Solarbotics type)
1X GP2Y0A21 IR Distance Sensor (5 - 80cm)
1X HX 5010 Servo
1X 4X AA Battery Holder
---CODE---
I'm assuming you have downloaded the Arduino IDE from here : http://arduino.cc/en/Main/Software (NOTE : I'm using the 0023 version for now). Now, first i tested my IR Sensor, you can go ahead and download the "IR Sensor" code above, connect your sensor as follows and run the code.
Red Wire -> Voltage (+ 5V) Black/Brown -> Ground (- 0V) Yellow/White -> Signal (Analog Pin 0)
You should see values appearing on the Serial Monitor that change when you wave your hand infront of it. Note the way it changes as you move your hand closer or further.
Next, i spent some time writing code, you can go ahead and download the "ObAv_1" code above too, connect your motors and servos to the pins listed below and zap to your Duino. (NOTE : Motor -> Motor Driver -> Pins)
Left Motor Pin A -> Pin 5 Left Motor Pin B -> Pin 6 Right Motor Pin A -> Pin 4 Right Motor Pin B -> Pin 7 Servo -> Pin 12
The SHR bot started working perfectly, moved exactly like the original SHR did. Then i took it up a notch and adapted some of Chris The Carpenter's code into mine and ended up with the "ObAv_2" code. You can go ahead and download that too, it your bot will move way different than the original SHR should. I will sweep left and right checking for obstacles and avoids them immediately. Videos of both methods are shown above.
Hope this Robot Page will help many beginner roboticists in the path of Arduino. :) Enjoy!
Receives IR signals from a remote control to drive around and avoids obstacles.
- Actuators / output devices: GM9 143:1 gear motor
- Control method: Infra Red Remote Control and aut
- CPU: Ubotino Controller V3 (Arduino)
- Operating system: Microsoft Windows XP
- Power source: 4.8v Batteries
- Programming language: Arduino C
- Sensors / input devices: IR Receiver (38khz), Frits/AmandaLDR
- Target environment: Enclosed enviroment / Dark enviroment.
This is a companion discussion topic for the original entry at https://community.robotshop.com/robots/show/arcee-a-great-arduino-shr-for-beginners