Does anyone have example code for Arduino eye mech?
Hey all,
Currently learning the arduino IDE. Using an arduino MEGA for servo control. I wanted to cut some cost and just download a Bluetooth Joystick app instead of buying an RC controller with joysticks, etc. I found a few great ones but since I am so new to writing code, I'm not quite sure where to begin.
Joyslick and push button apps:
1. hhtps://play.google.com/store/apps/details?id=ca.uwaterloo.arduimote&hl=en
2. https://play.google.com/store/apps/details?id=org.projectproto.btjoystick&hl=en
3. https://play.google.com/store/apps/details?id=com.ymsoftlabs.btjoystick&hl=en
I'd like to use #3 because it has two joysticks and a few push buttons.
I plan to connect a HC-06 bluetooth module to the MEGA I'm just not sure how to write the sketch. My ideal would be to have the classic left, right, up down and blink movements. I'd also like the lids to do some tracking with the eye movement but also be controlled independently. If anyone has an example code or advice for the following that'd be awesome!
Cheers.
Currently learning the arduino IDE. Using an arduino MEGA for servo control. I wanted to cut some cost and just download a Bluetooth Joystick app instead of buying an RC controller with joysticks, etc. I found a few great ones but since I am so new to writing code, I'm not quite sure where to begin.
Joyslick and push button apps:
1. hhtps://play.google.com/store/apps/details?id=ca.uwaterloo.arduimote&hl=en
2. https://play.google.com/store/apps/details?id=org.projectproto.btjoystick&hl=en
3. https://play.google.com/store/apps/details?id=com.ymsoftlabs.btjoystick&hl=en
I'd like to use #3 because it has two joysticks and a few push buttons.
I plan to connect a HC-06 bluetooth module to the MEGA I'm just not sure how to write the sketch. My ideal would be to have the classic left, right, up down and blink movements. I'd also like the lids to do some tracking with the eye movement but also be controlled independently. If anyone has an example code or advice for the following that'd be awesome!
Cheers.
Post edited by Blake Bradley on
0
Comments
Arduino has some sample libraries to control servos:
https://www.arduino.cc/en/Reference/Servo
http://playground.arduino.cc/ComponentLib/Servo
From there it's just a matter of using the variable that sets the servo's position and apply it to 2 servos (one for each eye) for each servo pair.
/Chris