1234567891011121314151617181920212223242526 |
- #include <FR_Joystick.h>
- FR_Joystick js(A5,A4,A3,A2); //DCMotor Board
- //FR_Joystick js(12,2,A0,A1); //Servo Board
- void setup() {
- // put your setup code here, to run once:
- Serial.begin(9600);
- }
- void loop() {
- // put your main code here, to run repeatedly:
- Serial.print("LX:");
- Serial.print(js.readJoystick(js.LX));
- Serial.print(" LY:");
- Serial.print(js.readJoystick(js.LY));
- Serial.print(" RX:");
- Serial.print(js.readJoystick(js.RX));
- Serial.print(" RY:");
- Serial.print(js.readJoystick(js.RY));
- Serial.print(" LB:");
- Serial.print(js.readJoystick(js.LBtn));
- Serial.print(" RB:");
- Serial.println(js.readJoystick(js.RBtn));
- }
|