Home Companies Shenzhen Shanhai Technology Ltd.

3.3V / 5V ElecFreaks Arduino Module / Modules

Shenzhen Shanhai Technology Ltd.
Active Member

Contact Us

Address: Room 620 ,yutian building , song lin road , Futian district ,Shenzhen , China

Contact name:

Inquir Now

Shenzhen Shanhai Technology Ltd.

3.3V / 5V ElecFreaks Arduino Module / Modules

City & Province shenzhen guangdong
InquireNow

Product Details

Arduino joysticks expansion board ElecFreaks Joystick shield V1.0

Description:
Arduino JoyStick Shield with a cross PS2 joystick with buttons, as well as four radio buttons, 2 small buttons. Provides for the Arduino and the key input extension joystick. On-board switch can switch between 3.3V and 5V, 3.3V can use this module for other microcontroller platforms, such as the STM32.



All signals are transferred through standard pin 2.54 leads to facilitate the transfer to other microcontroller platforms.



 

Arduino test case Demo

/*********************************************************************
**  Device: Joystick                                                                                            **
**  File:   EF_Joystick_Test.c                                                                               **
**                                                                                                                   **
**  Created by ElecFreaks Robi.W /10 June 2011                                                    **
**                                                                                                                    **
**  Description:                                                                                                  **
**  This file is a sample code for your reference.                                                     **
**                                                                                                                    **
**  Copyright (C) 2011 ElecFreaks Corp.                                                                **
*********************************************************************/

iint FirstShotX , FirstShotY;

void setup()
{
  for(int i=0; i<19; i++)
  {
    pinMode(i, INPUT);
    digitalWrite(i, 1);
  }
 
  Serial.begin(9600);
  FirstShotX = 0;
  FirstShotY = 0;
 
}

void loop(){
 
  int i, someInt, flag = 0;
  for(i=4; i<11; i++)
  {
    someInt = digitalRead(i);
    if(someInt == 0)
    { 
      flag =1;
      break;
    }
   }
   if(flag == 1)
   {   
     switch(i)
     {
       case 4: Serial.println("--------> Button A"); break;
       case 5: Serial.println("--------> Button B"); break;
       case 6: Serial.println("--------> Button C"); break;
       case 7: Serial.println("--------> Button D"); break;
       case 8: Serial.println("--------> Button E"); break;
       case 9: Serial.println("--------> Button F"); break;
       case 10: Serial.println("--------> Button KEY"); break;
       default: break;
     }
     flag=0;
   }
  
   int sensorValue = analogRead(A0);
   if(FirstShotX == 0)
   { 
     FirstShotX = sensorValue;
     Serial.print("FirstShotX = ");
     Serial.println(FirstShotX);
   }
  
   Serial.print("X = ");
   Serial.println(sensorValue - FirstShotX);
  
   sensorValue = analogRead(A1);
   if(FirstShotY == 0)
   { 
     FirstShotY = sensorValue;
     Serial.print("FirstShotY = ");
     Serial.println(FirstShotY);
   }
   Serial.print("Y = ");
   Serial.println(sensorValue - FirstShotY);
  
   delay(200);
}

Hot Products

SZ11-GPRS Remote Module / RF Module / Wireless Transceiver Module Brand: SHUNCOM Transmission ...
Maestro 100 with Wavecom Q24 plus module quad band M2M application Maestro 100 Evolution series is ...
Easy to use maestro gsm modem with Wavecom Q24 plus module Maestro 100 Evolution series is the ...
Wavecom Q24 plus module quad band GSM GPRS Modem Maestro 100 Evolution series is the perfect ...
sim5218 3g module sim5218 3g ip camera module The SIM5218 series is a Tri-Band/Single-Band HSPA...
wcdma 3g module 3g module external 3g sim card module The SIM5218 series is a Tri-Band/Single-Band ...