-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bf5102e
commit a914cc6
Showing
38 changed files
with
389 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
/* | ||
Gamepad module provides three different mode namely Digital, JoyStick and Accerleometer. | ||
You can reduce the size of library compiled by enabling only those modules that you want to | ||
use. For this first define CUSTOM_SETTINGS followed by defining INCLUDE_modulename. | ||
Explore more on: https://thestempedia.com/docs/dabble/game-pad-module/ | ||
*/ | ||
#define CUSTOM_SETTINGS | ||
#define INCLUDE_GAMEPAD_MODULE | ||
#include <Dabble.h> | ||
void setup() { | ||
// put your setup code here, to run once: | ||
Serial.begin(250000); // make sure your Serial Monitor is also set at this baud rate. | ||
Dabble.begin(9600); //Enter baudrate of your bluetooth.Connect bluetooth on Bluetooth port present on evive. | ||
} | ||
|
||
void loop() { | ||
Dabble.processInput(); //this function is used to refresh data obtained from smartphone.Hence calling this function is mandatory in order to get data properly from your mobile. | ||
Serial.print("KeyPressed: "); | ||
if (GamePad.isUpPressed()) | ||
{ | ||
Serial.print("UP"); | ||
} | ||
|
||
if (GamePad.isDownPressed()) | ||
{ | ||
Serial.print("DOWN"); | ||
} | ||
|
||
if (GamePad.isLeftPressed()) | ||
{ | ||
Serial.print("Left"); | ||
} | ||
|
||
if (GamePad.isRightPressed()) | ||
{ | ||
Serial.print("Right"); | ||
} | ||
|
||
if (GamePad.isSquarePressed()) | ||
{ | ||
Serial.print("Square"); | ||
} | ||
|
||
if (GamePad.isCirclePressed()) | ||
{ | ||
Serial.print("Circle"); | ||
} | ||
|
||
if (GamePad.isCrossPressed()) | ||
{ | ||
Serial.print("Cross"); | ||
} | ||
|
||
if (GamePad.isTrianglePressed()) | ||
{ | ||
Serial.print("Triangle"); | ||
} | ||
|
||
if (GamePad.isStartPressed()) | ||
{ | ||
Serial.print("Start"); | ||
} | ||
|
||
if (GamePad.isSelectPressed()) | ||
{ | ||
Serial.print("Select"); | ||
} | ||
Serial.print('\t'); | ||
|
||
int a = GamePad.getAngle(); | ||
Serial.print("Angle: "); | ||
Serial.print(a); | ||
Serial.print('\t'); | ||
int b = GamePad.getRadius(); | ||
Serial.print("Radius: "); | ||
Serial.print(b); | ||
Serial.print('\t'); | ||
float c = GamePad.getXaxisData(); | ||
Serial.print("x_axis: "); | ||
Serial.print(c); | ||
Serial.print('\t'); | ||
float d = GamePad.getYaxisData(); | ||
Serial.print("y_axis: "); | ||
Serial.println(d); | ||
Serial.println(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.