AxisJoystic1 조이스틱 AxisJoystic 코드 정보 : (주의! 출력이 서보모터와 연동되어 있습니다.) #include #include #include #define PIN_PWM 9 #define MIN 0 #define MAX 180 #define SW_PIN 5 #define VRX_PIN A1 #define VRY_PIN A2 Joystick* joystic; Servo moter; int theta; void setup() { Serial.begin(9600); joystic = new AxisJoystick(SW_PIN, VRX_PIN, VRY_PIN); moter.attach(PIN_PWM, MIN,MAX); moter.writeMicroseconds(20); } void loop() { Serial.print(joystic->re.. 아두이노 2022. 1. 17. 이전 1 다음