Page 2 of 3

Re: Complete code PS2 controller

Posted: Aug 5th, 2019, 2:19 pm
by Tjup
im stuck on MASTER, did you upload on a NodeMCU v3?i cant upload to NodeMCU, but fine on a Uno,but then i need to change code right?

Re: Complete code PS2 controller

Posted: Aug 5th, 2019, 4:38 pm
by Tjup
im about to give up, i uploaded both codes , slave to a Nano, and Master to another Nano, wired some wires, to see if a led lights up when i press buttons, but nothing at all, i dont know what im doing wrong :cry:
i wired them togheter as shown, TX to RX, vis versa, still nothing..
I noticed the Master Nano, is lid red and yellow, and the salve just yellow, is this correct? or something wrong?

Re: Complete code PS2 controller

Posted: Aug 7th, 2019, 2:23 am
by PhilA
Both lights Tx/Rx on the master and slave Nano's should be flashing to show that it is sending and receiving. But the LED's connected to the Master actually operate independent of the slave. Their code is only written to the master nano, so will operate on/off regardless of comms between the master and slave.

I still think that if you haven't tried with a different PS2 controller then don't rule that out as being the issue.

I had trouble with different Nanos I got from China, but check the PS2 controller first.

Post a photo of your set up so we can see connections.

Re: Complete code PS2 controller

Posted: Aug 7th, 2019, 1:06 pm
by Tjup
i tryied whit 2 controllers, but to the same PS2, but none of em do anything, can it be because its Europe version or something?
i dosent mak sense 2 controllers dosent work

Re: Complete code PS2 controller

Posted: Aug 10th, 2019, 10:15 pm
by PhilA
Post a photo of your setup.

Re: Complete code PS2 controller

Posted: Aug 13th, 2019, 7:36 am
by Tjup
orderd 2 new controllers, so i have to wait to them to arrive, i preciate all ur help so fare :)

Re: Complete code PS2 controller

Posted: Aug 17th, 2019, 6:26 am
by Tjup
I give up, it simply cant be right 4 controllers aint working on this code, it totally pisses me of, so i better give up on this projekt.. :/

Re: Complete code PS2 controller

Posted: Aug 18th, 2019, 5:55 pm
by Ian MacKenzie
Don't give up yet. I've been trying to get my project to work for 6 months, and it's not very complicated. Many times I've wanted to toss it out the window(I live on the 4th floor, so probably not a good idea). Have you tried asking for advice in any Arduino forums, or a robotics forum? I'd bet anything that you could get the answers you need.

Re: Complete code PS2 controller

Posted: Aug 19th, 2019, 4:56 am
by PhilA
So without a picture to see your set up, try breaking it down to just getting an LED to turn on and off. Upload the 'master' code to the Arduino Nano which is connected to the PS2 controller (make sure there are no other connections to the second (Slave) Arduino Nano), ensure code compiles correctly and you have correct libraries installed. Wire up an LED with resistor to pin 2. Pressing the green triangle button will turn this led on/off.

Re: Complete code PS2 controller

Posted: Aug 21st, 2019, 7:52 pm
by Wolf91
Like PhilA says, break down your code. Also remember, with arduino you have the great option of using Serial for debugging (you can also attach leds to some ports and use them for debugging).

The easiest way is to write some code to print some text (or light an led) if the main code passes some point. If that works, then you know the problem is further on in the code.