osd-contiki/examples/osd/lgb-train/Joystick/demo.ino

24 lines
432 B
Arduino
Raw Normal View History

2017-07-20 10:33:19 +02:00
/*
Thumb Joystick demo v1.0
by:http://www.seeedstudio.com
connect the module to A0&A1 for using;
*/
void setup()
{
Serial.begin(9600);
}
void loop()
{
int sensorValue1 = analogRead(A0);
int sensorValue2 = analogRead(A1);
Serial.print("The X and Y coordinate is:");
Serial.print(sensorValue1, DEC);
Serial.print(",");
Serial.println(sensorValue2, DEC);
Serial.println(" ");
delay(200);
}