HomePage/assetList/Microduino Joypad
Microduino Joypad
2410 0
Production process

Hardware building

If you are not familiar with Microduino, please refer to:  Microduino_Getting_start,  otherwise, go ahead.
  • Required modules
Microduino-Joypad Schematic:Microduino-Joypad-sch.zip
Step 1: Install Microduino-TFT on Microduino-Joypad panel;
Step 2: Install the nylon screw on Microduino-Joypad

Step 3: Stack the Microduino-USBTTL and Microduino-Core on Microduino-Joypad

Step 4: Connect the Microduino-TFT and Microduino-Joypad with wires. 
Step 5: Fastened the panel and baseboard with nylon screw.
Step 6(Optional): Please install vibrate motor as needed.

Step 7: Install battery box on the baseboard, there’s sign of plus or minus on the back of the baseboard,
please stick the  foam board on the bottom of Joypad.
Step 8: You may turn on the power switch to check the battery function.
Addition:  For Microduino-Joypad-Game installation, please take off the right rocker bar first.
and connect the panel jack with baseboard jack 
and then screwed the panel 

Test

  • 2 parallel Upin27 bedframes
  • 2 waved switchs
  • 4 buttions
  • Detect MIC sound input
  • Detect photosensitive input
  • Buzzer output, connected to Microduino D6 pin
  • Vibrate motor output, connected to Microduino D8 pin
  • Onboard Microusb power supply, charge management, 3.3V stabilization
  • 2.54 spacing battery powered interface
  • Download Library:

  • library needed
  • Please make sure installed Microduino hardware support Package and library support package inMicroduino_Getting_start
  • please make sure there are _01_Microduino_TFT library and _08_Microduino_Shield_Joypad library in Ardino\arduino-1.0.6\libraries Folder.

  • debug:
  • Prepare:Microduino-USBTTL、、Microduino-Core、Microduino-Joypad
  • software:library support package、Arduino IDE;
  • unzip library support package,copy to librariesFolder inArduino IDE;
  • re-open “Arduino-IDE”,you can choose example of “_08_Microduino_Shield_Joypad\examples”,Compiled by the board select Microduino Core (Atmega328P @ 16M, 5V), can be downloaded directly;
Program Specification:

  • read:
  • read lightsensor, MIC,  IntA, IntB,returned value:int(0~1023);
//lightsensor———————-

       Joypad.readLightSensor();
Joypad.readMicrophone();
       //MIC--------------------
//INTB———————-
       //INTA----------------------

       Joypad.readIntA();
Joypad.readIntB();
  • read left and right Joystick X & Y,returned value:int(-512~512);
//left joystick—————-

       Joypad.readJoystickX();

//right joystick—————-
       Joypad.readJoystickY();

Joypad.readJoystick1Y();
       Joypad.readJoystick1X();
  • read left, right Joystick;switchs、4 buttons,returned value:Boolean(HIGH、LOW)
Joypad.readButton(byte ch);
//left joystick—————-

              JOYSTICK_UP;
JOYSTICK_LEFT;
              JOYSTICK_DOWN;
//left joystick press down————
              JOYSTICK_RIGHT;
//right joystick—————-
              CH_JOYSTICK_SW          


              JOYSTICK1_UP;
JOYSTICK1_RIGHT;
              JOYSTICK1_DOWN;

              JOYSTICK1_LEFT;
//switch——————
       //right joystick press down------------

              CH_JOYSTICK1_SW


              CH_SWITCH_L;
CH_SWITCH_2;
              CH_SWITCH_R;
             

       //4 buttons------------------

              CH_SWITCH_1;


              CH_SWITCH_3;
CH_SWITCH_4;

  • read in:
  • Control buzzer, vibrate;
//==========================
//buzzer———————
Joypad.tone(unsigned int freq);
Joypad.tone(unsigned int freq, unsigned long duration);

  Joypad.noTone();



//vibrate------------------------

“unsigned int motor_vol”:Vibration strength
Joypad.motor(unsigned int motor_vol);

Application

Required hardware
No data
Code show
No data
Attachment download
No data
0
Chris
Asset info

Creation time:11/08/2018

Author:chris
Course recommendation
No data
Master, don't look at it silently. Please login to help me comment.

Register now