Forum >Wireless GamePad V2.0 for Arduino receive code
Wireless GamePad V2.0 for Arduino receive code

I posted something on an old thread on this topic "hidden" in 3D printing a few days ago but thought a new thread here might get more attention.
I purchased the Wireless GamePad V2.0 for Arduino and 2 XBEE modules.
I successfully configured the modules and plugged one into the gamepad and one into an Xbee shield on UNO.
The sketch for the gamepad is running (I checked on Serial then switched to Serial1 and looked at the output on the XCTU monitor.
In my UNO receiver I cannot look at the serial monitor so I have an I2C LCD screen to show the results. Using a simple Serial.read() and lcd.print() I can tell when the gampad is switched on and transmitting. All I get is random numbers of course because I have done nothing to decode the string. That's where I need help.
So my questions are:
1) Do you have an example or a code snippet to show how to translate the serial data on the receiver end to variable values?
2) I see in the documentation that the vibrate motor can be set and turned off by transmitting the the gamepad, but what about the green LED? In my application it would be useful to manipulate this to show "ready" etc.
Anyone with working receiver code of any time would be a great help.
Ultimately I intend to use a Pi as my receiver but thought I would do the "easy" stuff first.
Any help appreciated as always
Bob
I purchased the Wireless GamePad V2.0 for Arduino and 2 XBEE modules.
I successfully configured the modules and plugged one into the gamepad and one into an Xbee shield on UNO.
The sketch for the gamepad is running (I checked on Serial then switched to Serial1 and looked at the output on the XCTU monitor.
In my UNO receiver I cannot look at the serial monitor so I have an I2C LCD screen to show the results. Using a simple Serial.read() and lcd.print() I can tell when the gampad is switched on and transmitting. All I get is random numbers of course because I have done nothing to decode the string. That's where I need help.
So my questions are:
1) Do you have an example or a code snippet to show how to translate the serial data on the receiver end to variable values?
2) I see in the documentation that the vibrate motor can be set and turned off by transmitting the the gamepad, but what about the green LED? In my application it would be useful to manipulate this to show "ready" etc.
Anyone with working receiver code of any time would be a great help.
Ultimately I intend to use a Pi as my receiver but thought I would do the "easy" stuff first.
Any help appreciated as always
Bob
2017-08-28 13:02:06 Is there still no receiver code example?
Here is a good sample code for transmitting data from GamePad, and it would be wonderful if besides this example you post code to parse the receiving data from this controller.
Please, guys, it is so easy for you. This product has a huge potential, but there are really not many real-world examples.
I am working on a project, which is required a wireless control of a 6-axis robot and expecting to find any similar example on your website.
s.pakhotin
Here is a good sample code for transmitting data from GamePad, and it would be wonderful if besides this example you post code to parse the receiving data from this controller.
Please, guys, it is so easy for you. This product has a huge potential, but there are really not many real-world examples.
I am working on a project, which is required a wireless control of a 6-axis robot and expecting to find any similar example on your website.

2016-07-13 01:15:39 Hi Smith Bob,
Sorry for the delay. To your question:
1. sorry, we dont have an example to show how to translate, maybe you need to use "sprintf" fuction in C++
2. as for the green LED, which is a programable LED and connected to the pin8, you can define it in the code.
Hope it will help you.
Wendy.Hu
Sorry for the delay. To your question:
1. sorry, we dont have an example to show how to translate, maybe you need to use "sprintf" fuction in C++
2. as for the green LED, which is a programable LED and connected to the pin8, you can define it in the code.
Hope it will help you.
