Hi, I am totally vexed with trying to set up two xbee's, two dc motors and gyroscope - gy-521.
I am using two xbee series 1
Two xbee pro shields
One Arduino Uno, that is going to control two dc motors in a toy rc car with L298n dual motor module
One Arduino Mega 2560, with gy-521 gyroscope
Also using MacBook Pro El Capitan.
I have set up the xbee's so that they are communicating and have used them to control a micro servo, via a potentiometer - one of Jeremy Blum's tutorials.
I have searched online, but unless I'm missing something, I cannot find a suitable program.
What I am trying to achieve, is to be able to control the rc car's two DC motors - one for steering left, right, straight. And the other for forward, reverse, stop - with the gy-521, so I can tilt my hand left and right for steering and up and down for forward, reverse etc.
Some of the codes that I have found (mainly hand gesture rc cars etc.) haven't worked for me, mainly because I cannot work out the parts of code to use for DC motors. I have tried so hard before asking for help.
I have only been using Arduino since July this year, and can usually work things out, but this has done me!
Most of the codes on line, have connections for x & y, and x,y, z. The gy-521 doesn't state these, so have been connecting SCL and SDA to the Mega 2560 respectively, and also tried Analog pins 4&5. I don't know exactly what's x & y, or z pins are on the gy-521.
I hope I have made things clear in this post and put it on the correct forum, as this is my first time!
Any help will be most appreciated and I thank you in advance.
(MOD. removed empty lines)