Hackster is hosting Hackster Holidays, Ep. 6: Livestream & Giveaway Drawing. Watch previous episodes or stream live on Monday!Stream Hackster Holidays, Ep. 6 on Monday!
viliamk
Published © GPL3+

MyTurtle: self-learning robot (Part 3 - Head and Bumpers)

This project is about creating a self-learning robot. Part 3 is about adding a head and bumpers to the movement unit.

IntermediateWork in progress556
MyTurtle: self-learning robot (Part 3 - Head and Bumpers)

Things used in this project

Hardware components

Arduino Nano R3
Arduino Nano R3
×1
Ultrasonic Sensor - HC-SR04 (Generic)
Ultrasonic Sensor - HC-SR04 (Generic)
×1
Resistor 2.21k ohm
Resistor 2.21k ohm
×4
Pushbutton Switch, Momentary
Pushbutton Switch, Momentary
×4
Stepper Motor, Mini Step
Stepper Motor, Mini Step
×2
SG90 Micro-servo motor
SG90 Micro-servo motor
×1
HC-05 Bluetooth Module
HC-05 Bluetooth Module
×1

Story

Read more

Code

PIN scheme of Arduino Nano (movement unit)

Arduino
/* Movement unit
 * PIN 0 - RX of BT module HC-05 for Arduino Nano (PIN 1 for Arduino Uno)
 * PIN 1 - TX of BT module HC-05 for Arduino Nano (PIN 0 for Arduino Uno)
 * 
 * PIN 2 - PIN 4 of Brain unit (interruption if no floor)
 * 
 * PIN 3 - Servo motor SG09 (orange wire) / PWM pin
 * 
 * PIN 4 - INT1 of right stepper motor module ULN2003
 * PIN 5 - INT2 of right stepper motor module ULN2003
 * PIN 6 - INT3 of right stepper motor module ULN2003
 * PIN 7 - INT4 of right stepper motor module ULN2003
 * 
 * PIN 8 - INT1 of left stepper motor module ULN2003
 * PIN 9 - INT2 of left stepper motor module ULN2003
 * PIN 10 - INT3 of left stepper motor module ULN2003
 * PIN 11 - INT4 of left stepper motor module ULN2003
 * 
 * PIN 12 - Echo of utrasonic sensor HC-SR04
 * PIN 13 - Trig of ultrasonic sensor HC-SR04
 * 
 * PIN A0 - left front bumper (switch ON/OFF)
 * PIN A1 - right front bumper (switch ON/OFF)
 * PIN A2 //reserved for rear lef bumper (switch ON/OFF)
 * PIN A3 //reserved for rear right bumper (switch ON/OFF)
 * 
 * PIN A4 //reserved for communication between Arduinos
 * PIN A5 //reserved for communication between Arduinos
 * PIN A6 //not used yet
 * PIN A7 //not used yet
 */

Credits

viliamk

viliamk

14 projects • 5 followers

Comments