Hi i'm asking for a big favour here i need a code for the following setup for my seafox rov:
arduino number 1 receives signals from ps2 controller on pins 13, 12, 11 and 10 and a current + voltage sensor on pins 0 and 1. once the signals from the ps2 controller have been decoded they need to be sent by serial to arduino number 2 which takes the signals so it can control 3 esc's (on pins 10, 9 and 6) and 3 relays (on pins 8, 7 and 4) (relays will be controlled with transistors).
Arduino number 2 also sends signals from a lm35 on pin 0 and 4 outputs from a digital compass on pins 4, 5, 6 and 7 which all need to be sent to arduino number 1 then onto a video overlay board as well as the signals from the current + voltage sensor.
esc's 1 and 2 will be forwarded by pushing the right joystick forward
esc's 1 and 2 will be reversed by pushing the right joystick backward
esc 1 will be forwarded by pushing the right joystick left
esc 2 will be forwarded by pushing the right joystick right
esc 3 will be forwarded by pushing the left joystick forward
esc 3 will be reversed by pushing the left joystick backward
relay 1 will be turned on when l1 is pressed and turned off when released
relay 2 will be turned on when r1 is pressed and turned off when released
relay 3 will be turned on when r2 is pressed and pressing r2 again will turn it off
all the readings from the sensors will be sent to the video overlay board
voltage + current sensor: http://www.coolcomponents.co.uk/catalog/product_info.php?products_id=433
video overlay board: http://www.coolcomponents.co.uk/catalog/product_info.php?products_id=723
digital compass: Dinsmore 1490 Digital Hall Effect Sensor (Compass)
would really appreciate some help