Adding sensors


I want to add a temperature sensor and pressure sensor to my ROV. I have it working in the water but need more input back to the operator (me). I have lots of analog LM235 temperatures sensors that I have been using for projects for years. And a number of analog or I2C pressure sensors laying around. I have only been changing code on the arduino processor or cape board which is easy. What I would like is to add my sensors and code to the cape board and have a window for text show up on the OpenCockpit screen to display them. Or another way to say it, is to pass ASCI text from the cape board to the operator screen of the ROV. Has anyone done this and have the java script code to do it? This is being done now with the time and voltage.

1542-rov8a.jpg (157 KB) 1543-rovend.jpg (296 KB) 1544-setup.JPG (334 KB)


This is in the OpenROV software code that got updated today. If you add them to the Arduino sensors, you just have to update the OpenROV.ino file to sample the sensor and then write the "Sensor:value;" to the stream. It will now show up on the opencockpit automatically.


where is this code located? I cannot find it and am looking for it. I am looking in the github section.




From what I can see in a quick browse of the code:
If you go to the index.html file in /openrov-software/src/static, there is code at line 58 to display "telemetry data". The data comes from line 44 of of the OpenROVController.js which handles the serial messages Brian described.


thanks, I will play with it



Nice work Brian, as we discussed this should be of great help for the Arduino/EE/hacker that wants to add a sensor and can cut and paste some code into the sketch. It gives them a sw hook (just write the "Sensor:value;" to the stream) to have their data automatically display in the cockpit without having to program at the node or html/web app side of the stack.




Could you upload your code here? i'm still in the learing phase of arduino programming, so it would be nice how you have adapted the sensors into the code.


Here is the code it works with the newer Open Cockpit code that was released last weekend. The math may need tweeking. Remember you need to disconnect 2 of the a/d channels on the cape board hooked 5v and 3.3v. I am sending the depth in feet and the temperature in degrees C to the Open Cockpit screen.


1545-OpenROV.ino (7.4 KB)