아두이노 조이스틱 컨트롤
코드 int JoyStick_X = A1; //x int JoyStick_Y = A2; //y int JoyStick_Z = 3; //key void setup() { Serial.begin(9600); pinMode(JoyStick_Z, INPUT); } void loop() { int x,y,z; x=analogRead(JoyStick_X); y=analogRead(JoyStick_Y); z=digitalRead(JoyStick_Z); JoyStick(x, y) ; Serial.println(z, DEC); delay(500); } int JoyStick(int x, int y) { /* 7 8 9 * 4 5 6 * 1 2 3 */ int x_ = map(x, 0, 990, 0, 6); int y_=..