Complete code PS2 controller

Anything to do with programing the Arduino Platform.
Tjup
Posts: 11
Joined: Jul 30th, 2019, 9:53 am

Re: Complete code PS2 controller

Post by Tjup »

well i cant break down the code, i dont know programming, thats why i need so much help on it..
anyway, i got yet another controller today from china, brand new, i had a tiny progress, on the master 1 led i could make lid up, for the front light on rov, but only indicator i turn it on, on the slave Nano, it dident work at all, nothing happend..
then i set display on, maybe i could see whats going on, well, that dident help me anything, it was all rubbish..
i put a led on the pins for motors output, those where just blinking like crazy, so that dident work either..
cant believe its this hard to make this work..
i just need a simple solution for some motors to work and lights...

this code seemed so awsome....
User avatar
PhilA
Posts: 42
Joined: Oct 1st, 2017, 12:53 am
Location: Australia

Re: Complete code PS2 controller

Post by PhilA »

So you seem to be getting some progress, if the PS2 controller is switching the master LED on/off then the controller is working fine.
You won't get much response from the pins for the motors as they are programmed to control the ESC's for the motors.

The LED you connected to the headlight pin on the slave should have turned on as well when the PS2 button was pressed.

Things you need to check are - When uploading the code to the master and slave nano's ensure the TX/RX wires are disconnected between the two.

- Once code is uploaded and TX/RX wires reconnected, turn on the Master first, then the Slave. Check the the TX/RX LEDs are flashing on both nano's.

Retry pressing PS2 button for turning on headlight LED.
asesorplaza1
Posts: 187
Joined: Mar 4th, 2018, 6:11 pm
Location: Valverde de Júcar, Cuenca, España

Re: Complete code PS2 controller

Post by asesorplaza1 »

The same thing happened to me, until I discovered that it was a power problem, if you have connected to the Arduino to the USB port of the computer, does not give enough volts or amps, for the consumption that the Arduino has, the controller, the motors, the servos, the sensors , I almost went crazy, I thought I was the dumbest in the galaxy, because everyone worked by following in the footsteps of TechMonkeyBusiness and I didn't, until I connected an external power supply.
Do some research on how PC power supplies work, and you'll get something like a simple, inexpensive lab power supply, so you don't have to spend a fortune on stacks
In my post I have the photo of an ATX source, and since I'm using it, I haven't had any current problems, and I can connect whatever I want

viewtopic.php?f=18&t=1908&start=10

Connect the Arduino to the PC just to raise the code on it, then feed it to the external source, you'll see how it works best
Post Reply