Complete code PS2 controller

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

Complete code PS2 controller

Post by Tjup »

Im stuggeling to make it work at all, i tryied tons of codes, but i dont know much about coding, exsept pins..
im planning to build a ROV, 2 trusters, and up and down truster, and light button.
the codes from techmonkeys etc i simply cant make em work at all, i tryied whit Nano and Uno, nothing help..
the Uno i could read the outputs, but where are the output data pins?
so my question is, is there are complete code out there? or a good working guide? this is my 4th day trying, and im about to give up.. :/
User avatar
PhilA
Posts: 42
Joined: Oct 1st, 2017, 12:53 am
Location: Australia

Re: Complete code PS2 controller

Post by PhilA »

Hi there, I run my Rov on techmonkey code. Post your code and connections so we can see what's going on.
Tjup
Posts: 11
Joined: Jul 30th, 2019, 9:53 am

Re: Complete code PS2 controller

Post by Tjup »

thats the problem, i followed the instructions from site, but it wont work at all, i made this setup http://www.techmonkeybusiness.com/ps2-c ... stuff.html
and several others..
from the site it seems simple and forward, but nothing happends..
Maybe i upload wrong or missing something..
User avatar
Bennachie
Posts: 113
Joined: Jul 6th, 2018, 11:38 am

Re: Complete code PS2 controller

Post by Bennachie »

Did you install the libraries properly first?
Does the code compile successfully? If not, what errors come up in the window at the bottom of the Arduino app?
Tjup
Posts: 11
Joined: Jul 30th, 2019, 9:53 am

Re: Complete code PS2 controller

Post by Tjup »

everything compile fine, but still no movement or output..
User avatar
PhilA
Posts: 42
Joined: Oct 1st, 2017, 12:53 am
Location: Australia

Re: Complete code PS2 controller

Post by PhilA »

Do any of the functions work? ie LEDs lighting up when you press buttons on the PS2 controller etc.

If the code compiles fine, double check all your connections / ports with the diagram and code.

If you get no response from the PS2 controller at all, it may be that the controller is the issue.

I had one that stopped working, I checked everything and I took me a while to realise that it was actually the PS2 controller that had stopped working. I replaced it with another and all was good.
Tjup
Posts: 11
Joined: Jul 30th, 2019, 9:53 am

Re: Complete code PS2 controller

Post by Tjup »

Thx, i am starting to wounder the same many times, but then again, what could possible go wrong whit the controller..
i will try get another one, for now i orderd som joysticks https://create.arduino.cc/projecthub/ut ... tes-e38629 so i will try this build when i get them, 4 days and getting nowhere :|
User avatar
PhilA
Posts: 42
Joined: Oct 1st, 2017, 12:53 am
Location: Australia

Re: Complete code PS2 controller

Post by PhilA »

4 days is not bad, however you must persist. I couldn't even read code before I started this project. My build has been in the making for a couple of years now. Finally got a prototype that is usable :D :D
User avatar
PhilA
Posts: 42
Joined: Oct 1st, 2017, 12:53 am
Location: Australia

Re: Complete code PS2 controller

Post by PhilA »

Hi,
So here is the amended techmonkey code I have used. Basically I got rid of the cam on/off functions as I run a $20 ebay dash cam with continuous feed, and factored in a flood sensors, laser measure, white light and blue light. I use arduino Nanos set into Nano breakout boards, which essentially makes it a kind off plug and play set up. Is the Nano dies I can just unplug it and replace it as well as any other inputs/ouputs.
I can't get the 2ic sensors to work but haven't worried to much about it. Over the next few days I will try to add some functions to better fine tune my turning control so that if I press a the R1 or L1 button on the ps2 controller it just spins one prop only.

MASTER:

/*
ROVPS2Control_Masterv8.ino
Hamish Trolove - 30 March 2016
http://www.techmonkeybusiness.com
This sketch takes control commands from a PS2 handset and transmits the
commands using Bill Porter's EasyTransfer Library over a 9600 baud serial
link (100m tether).

This sketch is designed for an Arduino Nano with only one Serial Port.

Pin assignments are:

3.3V output to PS2 red Pin
Pin D10 to PS2 yellow pin
Pin D11 to PS2 orange pin
Pin D12 to PS2 brown pin
Pin D13 to PS2 blue pin

Pin D3 to LED UV light indicator
Pin D4 to LED Main Lights Indicator
Pin D5 to LED ROV Battery Low Voltage Warning
Pin D6 to LED ROV Interior high temperature warning
Pin D7 to Twin laser LED indicator
Pin D8 to Flood warning LED indicator
Pin D9 to

Communications
Serial Connection: Topside D1 (TX) to ROV D0 (RX)
Serial Connection: Topside D0 (RX) to ROV D1 (TX)
Connect the GND on both

A 16x2 LCD screen is connected as follows
VSS to GND
VDD to 5V output of MC78T05CT regulator
VO to sweep arm of 10kohm variable resistor
RS to Arduino Nano pin A0
RW to GND
E to Arduino Nano pin A1
D4 to Arduino Nano pin A2
D5 to Arduino Nano pin A3
D6 to Arduino Nano pin A4
D7 to Arduino Nano pin A5
A to 5V output of MC78T05CT regulator
K to GND via a 330ohm resistor

5V is supplied from a regulator to the 1Kohm pull up resistors
for PS2 as well as the LCD screen and it's backlight

The coding pulls on the PSX library developed by Bill Porter.
See http://www.billporter.info for the latest from Bill Porter and to
download the library.

The controls for the ROV are;
Left Stick - X-axis = Roll, Y-axis = Up/down
Right Stick - X-axis = Yaw, Y-axis = forward/back
Direction button pad left = LED Main lights On/Off toggle
Direction button pad up = turn camera upwards
Direction button pad down = turn camera downwards
Direction button pad right = Change reading on display
Triangle = Start/Stop video recording
Circle = Take photo

*/


#include <PS2X_lib.h> // Bill Porter's PS2 Library
#include <EasyTransfer.h> // Bill Porter's Easy Transfer Library
#include <LiquidCrystal.h>

PS2X ps2x; //The PS2 Controller Class
EasyTransfer ETin, ETout; //Create the two Easy transfer Objects for
// Two way communication

LiquidCrystal lcd(A0,A1,A2,A3,A4,4); //Pins for the LCD display

const int UvLEDpin = 3; // UV light indicator LED
const int LaserLEDpin = 7; // Twin laser measurement LED indicator
const int FwarnLEDpin = 8; // Flood warning LED
const int yelLEDpin = 2; //yellow LED is on Digital pin 2 headlight indicator
const int VwarnLEDpin = 5; //Voltage warning LED is on Pin D5
const int TwarnLEDpin = 6; //ROV temp warning LED is on Pin D6
const int LowBatVolts10 = 96; //This is for holding the value of the
//Low Battery Voltage warning Voltage threshold x10.
int ForwardVal = 0; //Value read off the PS2 Right Stick up/down.
int YawLeftVal = 0; //Value read off the PS2 Right Stick left/right
int UpVal = 0; //Value read off the PS2 Left Stick up/down
int RollLeftVal = 0; // Value read off the PS2 Left Stick left/right
float ROVTMP = 0; //Variable to hold the converted ROV interior temperature.
int DispOpt = 0; //Variable to signal which value to show on the display

struct RECEIVE_DATA_STRUCTURE{
int BattVolt; //Battery Voltage message from the ROV.
int ROVTemp; //ROV interior temperature back from the ROV
int ROVDepth; //ROV depth reading (m)
int ROVHDG; //ROV direction (Degrees)
int ROVFlood; // ROV water leaking in
};

struct SEND_DATA_STRUCTURE{
int upLraw; //Variables to carry the actual raw data for the ESCs
int upRraw;
int HLraw;
int HRraw;
int CamPitch; //Angle of the camera servo.
volatile boolean Twinlaser; // Laser measurement on/off toggle
volatile boolean UVlight; //UV LED light on/off toggle
volatile boolean LEDHdlts; //LED headlights on/off toggle
};

//give a name to the group of data
RECEIVE_DATA_STRUCTURE rxdata;
SEND_DATA_STRUCTURE txdata;

void setup()
{
ps2x.config_gamepad(13,11,10,12, false, false);
//setup pins and settings: GamePad(clock, command, attention, data, Pressures?, Rumble?)
//We have disabled the pressure sensitivity and rumble in this instance and
//we know the controller type so we have not bothered with the error checks
pinMode(FwarnLEDpin, OUTPUT);
pinMode(yelLEDpin, OUTPUT); //Sets the yelLEDpin to output.
pinMode(VwarnLEDpin, OUTPUT); //Sets the low voltage warning pin to output
pinMode(TwarnLEDpin, OUTPUT); //Sets the overtemperature warning pin to output.
pinMode(UvLEDpin, OUTPUT); // Sets the UV LED pin to output
pinMode(LaserLEDpin, OUTPUT); // Sets the Twin laser LED pin to output.
txdata.CamPitch =90; //Sets the Camera Pitch to be level
lcd.begin(16,2);
lcd.clear(); //make sure screen is clear.
lcd.setCursor(0,0); //Move cursor to top left corner
lcd.print("Initialising");

delay(10000); //The 10 second delay to allow opportunity to upload new programs.
Serial.begin(9600); //Begin Serial to talk to the Slave Arduino
ETin.begin(details(rxdata), &Serial); //Get the Easy Transfer Library happening through the Serial
ETout.begin(details(txdata), &Serial);
lcd.clear(); //make sure screen is clear again.
lcd.setCursor(0,0); //Move cursor to top left corner
lcd.print("Ready");
}

void loop()
{
ps2x.read_gamepad(); //This needs to be called at least once a second
// to get data from the controller.
if(ps2x.Button(PSB_PAD_UP)) //Pressed and held
{
txdata.CamPitch = txdata.CamPitch + 2; //increase the camera pitch
}

if(ps2x.Button(PSB_PAD_DOWN)) //Pressed and Held
{
txdata.CamPitch = txdata.CamPitch - 2; //decrease the camera pitch
}
txdata.CamPitch = constrain(txdata.CamPitch,20,160); //Constrain the camera pitch
//to within range servo can handle.

if (ps2x.ButtonPressed(PSB_GREEN)) //Pressed
{
txdata.LEDHdlts = !txdata.LEDHdlts; // Toggle the lights on and off
}
if (ps2x.ButtonPressed(PSB_RED)) //Pressed
{
txdata.Twinlaser = !txdata.Twinlaser; // Toggle the Twin laser lights on and off
}

if (ps2x.ButtonPressed(PSB_PINK)) //Pressed
{
txdata.UVlight = !txdata.UVlight; // Toggle the UV light on and off
}

if(ps2x.Button(PSB_PAD_RIGHT)) //Pressed and Held
{
DispOpt = DispOpt + 1; //step through the data to display.
if(DispOpt == 2) //At the moment there are only two items of
//data to display. This will need to be changed as extra data is added
//This just resets the data to be displayed to the start of the list.
{
DispOpt = 0;
}
}

//Analogue Stick readings
ForwardVal = ps2x.Analog(PSS_RY);
YawLeftVal = ps2x.Analog(PSS_RX);
UpVal = ps2x.Analog(PSS_LY);
RollLeftVal = ps2x.Analog(PSS_LX);

//Translate the Stick readings to servo instructions
//Readings from PS2 Controller Sticks are from 0 to 255
//with the neutral being 128. The zero positions are to
//the left for X-axis movements and up for Y-axis movements.

//Variables to carry the actual raw data for the ESCs
txdata.upLraw = (128-UpVal)-(128-RollLeftVal)/2; //This will be up to a value of 192
txdata.upRraw = (128-UpVal)+(128-RollLeftVal)/2; //This will be up to a value of 192
txdata.HLraw = -(128-ForwardVal)+(128-YawLeftVal); //This will be up to a value of 256
txdata.HRraw = -(128-ForwardVal)-(128-YawLeftVal); //This will be up to a value of 256

//Scale the values to be suitable for ESCs and Servos
// These values will be able to be written directly to the ESCs and Servos
txdata.upLraw=map(txdata.upLraw,-193,193,0,179);
txdata.upRraw=map(txdata.upRraw,-193,193,0,179);
txdata.HLraw=map(txdata.HLraw,-256,256,0,179);
txdata.HRraw=map(txdata.HRraw,-256,256,0,179);



// Send the message to the serial port for the ROV Arduino
ETout.sendData();

//Based on Bill Porter's example for the Two Way Easy Transfer Library
//We will include a loop here to make sure the receive part of the
//process runs smoothly.
for(int i=0; i<5; i++){
ETin.receiveData();

if(rxdata.ROVFlood == HIGH)
{
digitalWrite(FwarnLEDpin,HIGH);
}
else
{
digitalWrite(FwarnLEDpin,LOW);
}

if(rxdata.BattVolt < LowBatVolts10) //The factor of 10 is included to
// match the factor of 10 used in the reported value which is an int multiplied
//by 10 to give 0.1 precision to the value. Make sense?
{
digitalWrite(VwarnLEDpin,HIGH); //If the battery voltage too low,
//trigger the warning LED
}
else
{
digitalWrite(VwarnLEDpin,LOW); //Otherwise if voltage above the
//defined low voltage threshhold
//leave the LED off.
}
ROVTMP = (rxdata.ROVTemp * 0.004882814-0.5)*100; //converts the 0-1024
//data value into temperature.
if(ROVTMP > 50)
{
digitalWrite(TwarnLEDpin,HIGH); //If the Interior temp too high (over 50 degC),
//trigger the warning LED
}
else
{
digitalWrite(TwarnLEDpin,LOW); //Otherwise if interior temperature within the
//acceptable level, leave the LED off.
}


if(DispOpt == 1)
{
lcd.clear(); //A nice clean screen with no remnants from previous
//messages.
lcd.setCursor(0,0); //Top left hand corner
lcd.print("ROV Volts:");
lcd.setCursor(0,1); //Bottom left corner
lcd.print("ROV Temp:");
lcd.setCursor(11,0);
lcd.print(float(rxdata.BattVolt)/10,1); //factor of 10 used to get
//extra precision from Integer value and then displayed to 1 decimal place.
lcd.setCursor(11,1);
lcd.print(ROVTMP); // Display the ROV temperature
}
else
{
lcd.clear(); //A nice clean screen with no remnants from previous
//messages.
lcd.setCursor(0,0); //Top left hand corner
lcd.print("Depth:");
lcd.setCursor(0,1); //Bottom left corner
lcd.print("Heading:");
lcd.setCursor(11,0);
lcd.print(rxdata.ROVDepth); // Display ROV depth in metres
lcd.setCursor(11,1);
lcd.print(rxdata.ROVHDG); // Display the Water temperature


}
delay(18);
}

digitalWrite(yelLEDpin,txdata.LEDHdlts); //Light the LED based on headlights status flag
delay(18);
digitalWrite(UvLEDpin,txdata.UVlight); //Light the UV LED based on status flag
delay(18);
digitalWrite(LaserLEDpin,txdata.Twinlaser); //Light the Twin Laser LED based on status flag
delay(18);
}





SLAVE:
/*
ROVPS2Control_Slavev8.ino
Hamish Trolove - 30 March 2016
http://www.techmonkeybusiness.com
This sketch takes commands sent to it from the Master unit with
the PS2 Controller attached and converts it to motor commands,
servo commands, light controls etc. The data is sent from
the handset (Master) to the ROV(Slave) using Bill Porter's EasyTransfer
Library over a 9600 baud serial link (100m tether).
The MS5803_14 library is from Luke Miller http://github.com/millerlp

Data sent from the Master are raw settings for the ESC control.

This sketch is designed for an Arduino Nano with only one Serial Port.

The pin assignments are;
D13 =
D12 = Headlight Control
D11 =
D10 =
D9 = Flood water sensor
D8 = ESC Vertical Left
D7 = ESC Vertical Right
D6 = ESC Horizontal Left
D5 = ESC Horizontal Right
D4 = Camera Pitch Servo
D3 = UV light control
D2 = Twin laser control
A1 = Water temp sensor output pin
A7 = Voltage Divider connection
A6 = TMP36 temperature sensor output pin

i2c bus
GND pins on MS5803-14BA and BMP180 sensors to Nano GND pin
Vcc pins on MS5803-14BA and BMP180 sensors to Nano 3.3V pin
SDA pins on MS5803-14BA and BMP180 sensors to Nano A4 pin
SCL pins on MS5803-14BA and BMP180 sensors to Nano A5 pin

5V = Supply to the TMP36 temperature sensor.

Communications
Serial Connection: Topside D1 (TX) to ROV D0 (RX)
Serial Connection: Topside D0 (RX) to ROV D1 (TX)
Connect the GND on both

Please note that the ESCs will all have been programmed by this
point in the project.

The onboard voltage, heading, depth, and internal temperature
data is sent through the Serial link back to the Master
for display on a 16x2 LCD screen.

The heading is from an HMC5883L Digital Compass (i2c address 0x1E)
and the depth from a MS5803-14BA high pressure sensor (i2c address 0x76)

See also: HoryzonTrigger.ino, ROVPS2Control_Masterv0.ino,
ROVDoNothing.ino, ROVSubBv0.ino, DigitalCompassv2.ino,
PTLoggerv4.ino and TMP36_Temperature_Sensor.ino.


*/

#include <Wire.h> //i2c library for the digital compass and depth sensor
#include <Servo.h>
#include <EasyTransfer.h> // Bill Porter's Easy Transfer Library
#include <MS5803_14.h> //Library for the MS5803-14BA

EasyTransfer ETin, ETout; //Create the two Easy transfer Objects for
// Two way communication

MS_5803 sensor = MS_5803(512);

Servo ESCVL; // Create Servo Object ESC Vertical Left
Servo ESCVR; // Create Servo Object ESC Vertical Right
Servo ESCHL; // Create Servo Object ESC Horizontal Left
Servo ESCHR; // Create Servo Object ESC Horizontal Right
Servo CamAng; // Create Servo Object for the Camera Pitch Servo.

const int HeadLts = 12; // The Headlight Control is on pin 12
const int UVLT = 3; //UV light control is on pin D3
const int TWIN = 2; //Twin laser control is on pin D2
const int Floodpin = 9; // Flood warning in through D9

const int hmc5883Address = 0x1E; //0011110b, I2C 7bit address for compass
const byte hmc5883ModeRegister = 0x02;
const byte hmcContinuousMode = 0x00;
const byte hmcDataOutputXMSBAddress = 0x03;

const int Voltpin = A7; // analogue pin used to read the battery voltage
const int Temppin = A6; // analogue pin used to read the TMP36 Temp sensor
//Analogue pins A4 and A5 are taken by the i2c bus.

int volts; // variable to read the voltage from the analog pin
int x,y,z; //triple axis data for the digital compass.
int angle; //calculated horizontal heading angle.

float MS5803Press; //Pressure from the MS5803 Sensor.
float MS5803Temp; //Temperature from the MS5803 Sensor.

const float RefVolts = 5.0; // 5-Volt board reference voltage on Nano
const float ResistFactor = 319.68; //Calculated from 1023.0*(R2/(R1 + R2)
//where R1 = 2200 ohms and R2 = 1000 ohms for a 15V max voltage.

struct RECEIVE_DATA_STRUCTURE{
int upLraw; //Variables to carry the actual raw data for the ESCs
int upRraw;
int HLraw;
int HRraw;
int CamPitch; //Angle of the camera servo.
volatile boolean LEDHdlts; //LED headlights on/off toggle
volatile boolean Twinlaser; // Twinlaser on/off toggle
volatile boolean UVlight; // UV light on/off toggle
};

struct SEND_DATA_STRUCTURE{
int BattVolt; //Battery Voltage message to the Master.
int ROVTemp; //ROV interior temperature back to Master
int ROVDepth; //ROV depth reading (m)
int ROVHDG; //ROV direction (Degrees)
int ROVFlood;
};

//give a name to the group of data
RECEIVE_DATA_STRUCTURE rxdata;
SEND_DATA_STRUCTURE txdata;



void setup()
{
pinMode(UVLT,OUTPUT);
pinMode(HeadLts,OUTPUT);
pinMode(TWIN,OUTPUT);
pinMode(Floodpin,INPUT);

digitalWrite(HeadLts, LOW); //Set the Headlights to Off
digitalWrite(UVLT,LOW); // Set the UV light to off
digitalWrite(TWIN,LOW); // Set the twin laser to off

ESCVL.attach(8,600,2250); //attach the ESCVL to pin 8
ESCVR.attach(7,600,2250); //attach the ESCVR to pin 7
ESCHL.attach(6,600,2250); //attach the ESCHL to pin 6
ESCHR.attach(5,600,2250); //attach the ESCHR to pin 5
//Due to problems with the ESC recognising the maximum
//position at the default settings, the figures after
//the pin number are the microsecond signals for the
//minimum and maximum that the ESC will recognise.
// 600 and 2250 work.
CamAng.attach(4); //Attach the camera Pitch Servo to pin 4

// throttle = 90; //Set throttle to the neutral position.
ESCVL.write(90); //Set the ESCVL signal to the neutral position.
ESCVR.write(90); //Set the ESCVL signal to the neutral position.
ESCHL.write(90); //Set the ESCVL signal to the neutral position.
ESCHR.write(90); //Set the ESCVL signal to the neutral position.
CamAng.write(90); //Set the camera servo pitch to be level.

Wire.begin(); // Start the i2c communication

//Initialise the Digital Compass
Wire.beginTransmission(hmc5883Address); //Begin communication with compass
Wire.write(hmc5883ModeRegister); //select the mode register
Wire.write(hmcContinuousMode); //continuous measurement mode
Wire.endTransmission();

// Initialize the MS5803 sensor.
sensor.initializeMS_5803();

delay(10000); //Ten second delay
//The ESC should now be initialised and ready to run.

Serial.begin(9600); //Begin Serial to talk to the Master Arduino
ETin.begin(details(rxdata), &Serial); //Get the Easy Transfer Library happening through the Serial
ETout.begin(details(txdata), &Serial);


//The camera starts in record mode probably due to Arduino startup signals
//and so this needs to be stopped. The sequence below sends a toggle to
//the camera to stop it from recording. obviously this will leave a small
//waste video file, but we will need to live with that.

}

void loop()
{
// Send the message to the serial port for the ROV Arduino
ETout.sendData();

//Based on Bill Porter's example for the Two Way Easy Transfer Library
//We will include a loop here to make sure the receive part of the
//process runs smoothly.
for(int i=0; i<5; i++){
ETin.receiveData();
// We'll do something properly with the returned data at a later s
ESCVL.write(rxdata.upLraw); //Set the ESCVL signal to the defined throttle position.
ESCVR.write(rxdata.upRraw); //Set the ESCVR signal to the defined throttle position.
ESCHL.write(rxdata.HLraw); //Set the ESCHL signal to the defined throttle position.
ESCHR.write(rxdata.HRraw); //Set the ESCHR signal to the defined throttle position.
CamAng.write(rxdata.CamPitch); //Set the camera servo pitch to the defined angle.
digitalWrite(HeadLts,rxdata.LEDHdlts);//Light the headlights based on the Message data
delay(18);
digitalWrite(UVLT,rxdata.UVlight);//Light the UV light based on the Message data
delay(18);
digitalWrite(TWIN,rxdata.Twinlaser);//Light the Twinlaser light based on the Message data
delay(18);
}


delay(18); //This delay is added to give the ROV a chance to
//return data
volts = analogRead(Voltpin)/ResistFactor*RefVolts*10; //Read the voltage
//from the battery through the voltage divider. Factor of 10 used
//to help achieve an integer with 0.1V accuracy.
txdata.BattVolt = volts; //Send back the onboard battery voltage.
txdata.ROVTemp=analogRead(Temppin); //This reads the pin keeps it as a 0-1024 value.
txdata.ROVFlood=digitalRead(Floodpin);//This reads the pin

//Read the digital compass
//Tell the HMC5883L where to begin reading the data
Wire.beginTransmission(hmc5883Address);
Wire.write(hmcDataOutputXMSBAddress); //Select register 3, X MSB register
Wire.endTransmission();

//Read data from each axis
Wire.requestFrom(hmc5883Address,6);
if(6<=Wire.available())
{
x = Wire.read()<<8; //X msb
x |= Wire.read(); //X lsb
z = Wire.read()<<8; //Z msb
z |= Wire.read(); //Z lsb
y = Wire.read()<<8; //Y msb
y |= Wire.read(); //Y lsb
}

angle = atan2(-y,x)/M_PI*180;
if (angle < 0)
{
angle = angle + 360;
}
txdata.ROVHDG = angle; //ROV direction (Degrees)

//Reading and MS5803-14BA Sensor
// Use readSensor() function to get pressure and temperature reading from the MS5803.
sensor.readSensor();
MS5803Press = sensor.pressure(); //Pressure in mbar absolute
MS5803Temp = sensor.temperature(); //Although we have gathered this
//it won't be used at this stage.

txdata.ROVDepth = (MS5803Press-1013)/98.1; //ROV depth reading (m)
}
Tjup
Posts: 11
Joined: Jul 30th, 2019, 9:53 am

Re: Complete code PS2 controller

Post by Tjup »

OMG, Thank you, i think this will be very usefull, and now i can see what pins to use, i couldent see it in the Techmonkeys code, i will try this out and return, i really apreciate it :) :D
Post Reply