“Microduino-Joypad Getting start”的版本间的差异
853387039@qq.com(讨论 | 贡献) (→Test) |
|||
(未显示2个用户的2个中间版本) | |||
第1行: | 第1行: | ||
+ | {{Language|Microduino-Joypad Getting start}} | ||
{| style="width: 800px;" | {| style="width: 800px;" | ||
|- | |- | ||
第85行: | 第86行: | ||
===Program Description=== | ===Program Description=== | ||
*Read: | *Read: | ||
− | **Read the value of A and B about illumination, MIC, extension interface. The return value should be within int(0~1023); <source lang="cpp"> | + | **Read the value of A and B about illumination, MIC, extension interface. The return value should be within int(0~1023); |
+ | |||
+ | <source lang="cpp"> | ||
//Illumination---------------------- | //Illumination---------------------- | ||
Joypad.readLightSensor(); | Joypad.readLightSensor(); |
2016年1月6日 (三) 01:36的最新版本
Language | English |
---|
Test
You'll need _01_Microduino_TFT and _08_Microduino_Shield_Joypad
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 |