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.

Sing & Set Radio

Sing & Set Radio
Listen, sing & Listen again, S&S will Tune itself.

Details at http://atari.uniandes.edu.co/medios/cursos/dise-3117-061/persona.php?p_id=404
 
Remove these adsRemove these ads by Signing Up
 

Step 1Code

//CAMBIO EN MOVIMIENTO EN LA ORDEN PRESIONE +
int antesx= 0;
int x = 0;
int val;

void setup () {
antesx = analogRead (0);
pinMode(0, OUTPUT);
Serial.begin(9600);
}

void loop () {
if( Serial.available() ) // if data is available to read
{
val = Serial.read(); // read it and store it in 'val'
if( val == 'H' ) {
digitalWrite(1, HIGH); // turn ON the LED
delay(2000);
digitalWrite(1, LOW); // otherwise turn it OFF
}
}

x = analogRead(0);
if((x <= antesx-10)||(x>= antesx+10)) {
digitalWrite (0, HIGH);
delay (500);
digitalWrite (0, LOW);
antesx = x;
}
/*Serial.print(" x es ");
Serial.print(x, DEC);
Serial.print(" antes x es ");
Serial.println(antesx, DEC);
*/

//sonia

//delay(50);
}
« Previous StepDownload PDFView All StepsNext Step »
3 comments
May 30, 2006. 12:04 PMradiorental says:
more details on the i/o board please, and post up the code. Thank you
May 30, 2006. 9:35 AMBeanwaur says:
interesting concept, a more detailed explanatiopn would be nice. i seem to be missing something wih this whole wiring board that eveeryone seems to have magicly gotten within the last 3 days

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:Ivonne
student