KR2 ROV

What are you working on .... Show off your Rov's Projects here.
User avatar
zotta
Posts: 14
Joined: Jul 22nd, 2013, 12:41 pm
Location: Palermo Italy

Re: KR2 ROV

Post by zotta »

KR2_Diving wrote:
zotta wrote:Hello,
which pins of arduino uses to connect ps2.
Hello zotta,
the ps2 controller can connect to any pin in theory.


in my case, I use the analog pins as I am not using any analog sensors on my top side rov.
tanks
User avatar
zotta
Posts: 14
Joined: Jul 22nd, 2013, 12:41 pm
Location: Palermo Italy

Re: KR2 ROV

Post by zotta »

Help, I can not connect the PS2 with arduino1.

This is the connection of the wires to arduino PWM 1:
brown pin 2
orange pin 3
yellow pin 4
blue pin 5
green pin 6

This is the code:

/ * # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # DEFINE PINS PS2 CONTROLLER OF HERE # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # * /
  
  ps2x.config_gamepad error = (A2, A3, A4, A5, true, false); / / setup pins and settings
# define PS2_DAT 2 / / 14
# define PS2_CMD 3 / / 15
# define PS2_SEL 4 / / 16
# define PS2_CLK 5 / / 17

  / / GamePad (clock (blue), command (orange), attention (yellow), date (brown), Pressures?, Rumble?) Check for error

/ * # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # Define other pins here # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # * /

/ / Currently blank
/ / Remaining Pins: D2, D3, D11, D12, D13, A1

/ * # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #


what is the error?
User avatar
KR2_Diving
Posts: 391
Joined: Aug 30th, 2012, 11:43 am
Location: Currently: NW Suburbs of Chicago. Originally: NE Wisconsin

Re: KR2 ROV

Post by KR2_Diving »

zotta wrote:Help, I can not connect the PS2 with arduino1.

This is the connection of the wires to arduino PWM 1:
brown pin 2
orange pin 3
yellow pin 4
blue pin 5
green pin 6

This is the code:

/ * # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # DEFINE PINS PS2 CONTROLLER OF HERE # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # * /
  
  ps2x.config_gamepad error = (A2, A3, A4, A5, true, false); / / setup pins and settings
# define PS2_DAT 2 / / 14
# define PS2_CMD 3 / / 15
# define PS2_SEL 4 / / 16
# define PS2_CLK 5 / / 17

  / / GamePad (clock (blue), command (orange), attention (yellow), date (brown), Pressures?, Rumble?) Check for error

/ * # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # Define other pins here # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # * /

/ / Currently blank
/ / Remaining Pins: D2, D3, D11, D12, D13, A1

/ * # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #


what is the error?
Hello zotta,
From what I can tell, it looks like you just have the pins in the wrong order.

This line:
  ps2x.config_gamepad error = (A2, A3, A4, A5, true, false); / / setup pins and settings

controls which pin is connected where. In the parenthesis, there are 6 arguments that need to be defined. Another way to look at that line of code is:

ps2x.config_gamepad error = (clock (blue), command (orange), attention (yellow), date (brown), Pressures?, Rumble?) // Check for error

This means that the first number in the brackets is the pin number that the "clock" wire is connected to. The second number is the pin that the "command" wire is connected to... and so on.

In summary, it looks like you have your pins wired up in the wrong order...

Hope this helps.

Ryan
"KR2_Diving"
User avatar
zotta
Posts: 14
Joined: Jul 22nd, 2013, 12:41 pm
Location: Palermo Italy

Re: KR2 ROV

Post by zotta »

Now everything works

Thanks Rayan
User avatar
zotta
Posts: 14
Joined: Jul 22nd, 2013, 12:41 pm
Location: Palermo Italy

Re: KR2 ROV

Post by zotta »

Deakel wrote:The esc is treated like a servo using the servo library. But I'm scraping the esc. its just to hard to get mapped correctly. I have been struggling with it since the begining and just when i get it running the way it should something changes and im back to tuning it.
I ordered one of these http://www.pololu.com/catalog/product/707 per one of our own derelicte and his pool rover. It works much better takes more Arduino pins but its worth it. Im ordering a http://www.pololu.com/catalog/product/706 to control the dive surface motor. they are really nice little boards. If you want or anyone else wants the code i can post it. I currently have camera control pan and tilt, thermistor temp sensor printing out to lcd, forward, reverse and turn on the drive motors, I have yet to figure out the serial communication between 2 Arduinos 1 topside 1 bottom side. so the code will have to be split up between the 2.
hello i am using Pololu vnh 5019 and I'm getting crazy. Can you send me the codes for arduinio, so i understand
User avatar
zotta
Posts: 14
Joined: Jul 22nd, 2013, 12:41 pm
Location: Palermo Italy

Re: KR2 ROV

Post by zotta »

KR2_Diving wrote:
zotta wrote:Help, I can not connect the PS2 with arduino1.

This is the connection of the wires to arduino PWM 1:
brown pin 2
orange pin 3
yellow pin 4
blue pin 5
green pin 6

This is the code:

/ * # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # DEFINE PINS PS2 CONTROLLER OF HERE # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # * /
  
  ps2x.config_gamepad error = (A2, A3, A4, A5, true, false); / / setup pins and settings
# define PS2_DAT 2 / / 14
# define PS2_CMD 3 / / 15
# define PS2_SEL 4 / / 16
# define PS2_CLK 5 / / 17

  / / GamePad (clock (blue), command (orange), attention (yellow), date (brown), Pressures?, Rumble?) Check for error

/ * # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # Define other pins here # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # * /

/ / Currently blank
/ / Remaining Pins: D2, D3, D11, D12, D13, A1

/ * # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #


what is the error?
Hello zotta,
From what I can tell, it looks like you just have the pins in the wrong order.

This line:
  ps2x.config_gamepad error = (A2, A3, A4, A5, true, false); / / setup pins and settings

controls which pin is connected where. In the parenthesis, there are 6 arguments that need to be defined. Another way to look at that line of code is:

ps2x.config_gamepad error = (clock (blue), command (orange), attention (yellow), date (brown), Pressures?, Rumble?) // Check for error

This means that the first number in the brackets is the pin number that the "clock" wire is connected to. The second number is the pin that the "command" wire is connected to... and so on.

In summary, it looks like you have your pins wired up in the wrong order...

Hope this helps.

Ryan
"KR2_Diving"

Hello Raiyan ps2 controller was found but do not understand why in the serial monitor can not display the correct parameters. The serial speed is correct. What should I configure the code to arduino?

If I fell into this trap is beautiful because of you :lol:


Rayan helpme!!
User avatar
KR2_Diving
Posts: 391
Joined: Aug 30th, 2012, 11:43 am
Location: Currently: NW Suburbs of Chicago. Originally: NE Wisconsin

Re: KR2 ROV

Post by KR2_Diving »

Well after a short hiatus, I am back at it working on the ROV! Spend the day rebuilding my test rigs and updating some of the hardware! Now it is time for software debugging... Good thing the winters are long in Chicago... it is going to take that long I fear!
Attachments
Got the Test rigs rebuilt!
Got the Test rigs rebuilt!
ROV2pointO.jpg (617.59 KiB) Viewed 7447 times
User avatar
KR2_Diving
Posts: 391
Joined: Aug 30th, 2012, 11:43 am
Location: Currently: NW Suburbs of Chicago. Originally: NE Wisconsin

Re: KR2 ROV

Post by KR2_Diving »

Hey everyone! So... I am slowly working back into this project... started buying up my next batch of parts for testing... watch this space for updates!
scubersteve
Posts: 251
Joined: Jan 28th, 2013, 10:29 pm
Location: Milton, Florida

Re: KR2 ROV

Post by scubersteve »

Welcome back to the party!
Remember, post early, and post often!
:D
User avatar
KR2_Diving
Posts: 391
Joined: Aug 30th, 2012, 11:43 am
Location: Currently: NW Suburbs of Chicago. Originally: NE Wisconsin

Re: KR2 ROV

Post by KR2_Diving »

Been doing some shopping today and ordered my GPS modules, as well as some of the hardware for my camera system.
I plan on using a GoPro Hero2 for my primary camera. At this time, the tiny lag on the live feed is not enough to deter me from using this as my primary camera.

I found a really nice SMALL video switch that will allow me to have 3 camera's onboard, and be able to switch between the 3 sources to my display, as well as a nice little cable that will allow me to charge (power), turn on and off, as well as display my live feed from my GoPro.

Here is a link to the camera stuff I found:
ReadyMadeRC: GoPro MultiFunction Cable
ReadyMadeRD: RCCC (RC Camera Control) System v2

I now need to figure out a bit of trickery to get these to work with my Arduino... but I am sure I will figure that out!
Post Reply