Data Sheet
4/27/2018 OpenCR1.0
http://emanual.robotis.com/docs/en/parts/controller/opencr10/ 46/50
Specification
Joystic Sensor Specification
Interface : Analog
7. 7. 6. 1. Code
Joystic is to get the output value according to the input.
We will look at the X Y Z values that change depending on how we move.
Signal of x,y and z is connected to A0, A1, A2 of Arduino.
7. 7. 6. 2. Result
#define X A0
#define Y A1
#define Z A2
void setup()
{
Serial.begin(9600);
}
void loop()
{
int x,y,z;
x=analogRead(X);
y=analogRead(Y);
z=analogRead(Z);
.
Serial.print(" X = ");
Serial.print(x,DEC);
Serial.print(" Y = ");
Serial.print(y,DEC);
Serial.print(" Z = ");
Serial.println(z,DEC);
delay(100);
}
OpenCR1.0
Back to Top ▲