Introduction: 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.


renaissanceman (author)2011-07-02

Thanks very much for the code, I'll try it later, no time this week. Anyway I'll let you know how it works !

etopsirhc (author)2011-06-30

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)

renaissanceman (author)etopsirhc2011-07-02

I'm an electronics man myself so any code to improve the electronics is welcome !

etopsirhc (author)renaissanceman2011-07-02
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.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
etopsirhc (author)etopsirhc2011-07-02

>< 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

Bongmaster (author)2011-06-21

what vid?

Sorry, I'm a newbie here, must be ok now !

yup its there

!!!! Coincidence : I see you're in Norway, so am I at the moment (well out on the North Sea that is...).

kools, im in the north XD

About This Instructable




Add instructable to: