hiya,
right, the project i'm doing at the moment is change the hardware in a dancing machine... its an EZ2Dancer machine, very old hardware in it running on windows 98 XD
there are 8 hand sensors and 24 foot pressure sensors
the hand sensors are a simple analog switch, when you break the beam it changes the resistance...
i've managed to get the arduino to pick up the hand sensor which is brilliant, but now i want to output it to a joypad as a digital signal so i can use it like a button press
here's an image of the wiring..
i'll post as a reply
Orange - 5v
Green - Analog pin 0
Resistor - gnd
Blue - gnd on hand sensor
Blue/White - output on hand sensor
here's the code
#define LED 13
int val = 0;
void setup()
{
pinMode(LED, OUTPUT);
Serial.begin(9600);
}
void loop()
{
val = analogRead(0);
if (val >= 1)
{
digitalWrite(LED,HIGH);
}
else
{
digitalWrite(LED,LOW);
}
Serial.println(val);
}
any ideas?? i'm quite stumped on this now XD
