3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Conducting foam controlled servo's

video Conducting foam controlled servo's
This video shows the use of conducting foam as an input for the Arduino Duemilanove. The output consists of 2 servo's which, eventually, will control a robotic hand.
The conducting foam was taken from a pcb-case (originally to prevent static build up).
The Arduino scetch is found in extended->servo->knob and doubled (or tripled etc.) for control of more than 1 servo.

http://www.youtube.com/watch?v=Yfiv_CDozds
10 comments
Jul 2, 2011. 12:44 PMrenaissanceman says:
Thanks very much for the code, I'll try it later, no time this week. Anyway I'll let you know how it works !
Jun 30, 2011. 12:10 PMetopsirhc says:
nice idea , but u might wanna smooth out the shakiness in the servos
witch can easily be done with an if statement and some math .
lemme know if u want to know the code , even though idk if it is arduino compatable ( c++ code like)
Jul 2, 2011. 4:01 AMrenaissanceman says:
I'm an electronics man myself so any code to improve the electronics is welcome !
Jul 2, 2011. 9:59 AMetopsirhc says:
heres an example for a single servo and input

i did a little research on how arduino works  so it may actualy work right away , but its compleatly untested


#include <Servo.h>

Servo myservo;

void setup() 
{ 
  myservo.attach(9);
  myservo.write(90);  // set servo to mid-point
} 
void loop() {

int calibrate = [ a number to mess around with ]
int an0 = map(analogRead(0) , 0,1025 ,0,180)

If (an0 => (an0 + calibrate )  )
{
   myservo.write(an0 )
}
else if ( an0 =< (an0 - calibrate ) )
{
   myservo.write(an0 )
}

}


what this does is checks to see if the the analog pin ( after being mapped to work with a servo ) is within [calibrate] range . if its not in that area , it will change the servo's position ... i hope

lemme know if it works =D
Jul 2, 2011. 10:04 AMetopsirhc says:
>< just noticed

add a semi colon to the end of every statement except the if , and else if

example :

void loop() { <--- not here

int calibrate = 5 ; <---- here

If (an0 => (an0 + calibrate ) ) <--- not here
{
myservo.write(an0 ) ; <--- here too
}
Jun 21, 2011. 3:16 AMBongmaster says:
what vid?
Jun 21, 2011. 6:47 AMBongmaster says:
kools, im in the north XD
Jun 21, 2011. 6:48 AMBongmaster says:
yup its there

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
1
Followers
1
Author:Renaissance-man