ArduinoGeneral

DFRobot Gamepad v2.0 with XBee S2C - how to interrogate/configure via gamepad USB?

userHead Account cancelled 2018-01-06 00:58:30 2576 Views1 Replies
I recently purchased a DFRobot Gamepad 2.0 (from PiHut in the UK) with the intention of using it with a standard XBee S2C wireless transmitter module, communicating with another XBee connected to a Teensy 3.2 robotic project. I'm fairly conversant with Arduino/Teensy and XBee programming but I seem to be struggling to get the Gamepad to work. The DFRobot wiki page provides no useful details on wireless comms and I can see from the forum that I'm not alone in having difficulties.

I've updated and configured the transmitting and receiving XBee modules (mounted in UBS adapters) using the latest XCTU console (6.3.11) and they both appear to be working fine. I've then mounted one of the two modules into the socket provided in the gamepad.

I can connect the gamepad to a PC using the USB adapter provided and successfully run the test Arduino sketch with the gamepad configured as an Arduino Leonardo on (in my case) COM 8. But I don't seem to be able to communicate with the XBee module via the Arduino at all, as for example I would expect to if the module were connected via the Arduino's UART ports. XCTU will not detect the presence of the XBee module when set up to interrogate the Arduino USB comm port. I have no way of knowing if the XBee is alive or not?

Can anyone offer any advice, or provide a sample sketch, illustrating how to interrogate or configure an XBee module mounted in the gamepad in this way?

Many thanks in advance.
2018-01-10 16:06:27 Hi
Because in this gamepad, there is an Atmega32U4 which is like Leonardo, it uses Serial1 to communicate with Xbee, and serial to communicate with USB port, if you want to realize data communication, you need to make serial and serial1 communicate with each other.
userHeadPic robert.chen