Difference between revisions of "Microduino-Joypad Getting start"
From Microduino Wiki
(→Program Description) |
|||
Line 75: | Line 75: | ||
[[File:Microduino-Joypad-Expansion.png|600px|thumb|center|Microduino-Joypad-Expansion]] | [[File:Microduino-Joypad-Expansion.png|600px|thumb|center|Microduino-Joypad-Expansion]] | ||
− | + | DOWNLOAD AND UPLOAD: | |
− | **https://github.com/wasdpkj/ | + | **https://github.com/wasdpkj/Joypad_RC |
− | |||
*Debugging: | *Debugging: | ||
**Hardware needed: Microduino-USBTTL, Microduino-Core and the equipped Microduino-Joypad | **Hardware needed: Microduino-USBTTL, Microduino-Core and the equipped Microduino-Joypad | ||
**Software needed: libraries and Arduino IDE; | **Software needed: libraries and Arduino IDE; | ||
− | + | ||
− | |||
===Program Description=== | ===Program Description=== | ||
*Read: | *Read: |
Revision as of 17:54, 16 May 2016
Test
DOWNLOAD AND UPLOAD:
Program Description
//Illumination----------------------
Joypad.readLightSensor();
//MIC--------------------
Joypad.readMicrophone();
//INTA----------------------
Joypad.readIntA();
//INTB----------------------
Joypad.readIntB();
//Left analog joystick----------------
Joypad.readJoystickX();
Joypad.readJoystickY();
//Right analog joystick----------------
Joypad.readJoystick1X();
Joypad.readJoystick1Y();
Joypad.readButton(byte ch);
//Left analog joystick----------------
JOYSTICK_UP;
JOYSTICK_DOWN;
JOYSTICK_LEFT;
JOYSTICK_RIGHT;
//Left analog joystick press------------
CH_JOYSTICK_SW
//Right analog joystick----------------
JOYSTICK1_UP;
JOYSTICK1_DOWN;
JOYSTICK1_LEFT;
JOYSTICK1_RIGHT;
//Right analog joystick press ------------
CH_JOYSTICK1_SW
//Switch ------------------
CH_SWITCH_L;
CH_SWITCH_R;
//Four groups of buttons------------------
CH_SWITCH_1;
CH_SWITCH_2;
CH_SWITCH_3;
CH_SWITCH_4;
//==========================
//Buzzer---------------------
Joypad.tone(unsigned int freq);
Joypad.tone(unsigned int freq, unsigned long duration);
Joypad.noTone();
//Vibration------------------------
Joypad.motor(unsigned int motor_vol);
“unsigned int motor_vol”:Vibration intensity Start Application |