Thanks for getting back to me with some help. I really appreciate it.
The draft looks interesting and importantly, has specific examples of how to configure. I’m not a programmer by nature, so the fine details of the syntax sometimes goes over my head. I’m going to try this, on my mac as well as my linux laptop, which will be my actual field control computer.
I’ll explore the netcat and socat to see what I get. I do have sort of a work-around, using the terminal available in the 192.168.2.2:8088 to create two terminal connections and opening ‘screen /dev/ttyUSB0’ for the USB-uart cable and 'screen /dev/ttyACM0 for the USB direct connection to the feather.
My work flow (I’m not sure what you mean by that) for the programming is to work on the lowest level, get something that works for each type of function, and with that working figure out how to pass parameters to the functions over the connection. What I intend to do is to have a stand-alone box that is sending serial communication packets to the UART port on the feather. The feather has a program running that 'uart.read(-something-) and puts it in a list type of sturcture. The thing it reads is probably an array of values derived from hardware. The dedicated box will probably be a beaglebone black (because it has a number of analog i/o pins) making a/d measurements from some analog potentiomenters. these will provide the digital values being put into the packets for the lights control. The beagleblack program will take the values and put them into a packet of values in a list format (byte array) and send that over the serial port, were the feather unpacks those and plugs the values into the functions.
I’ll probably be using python on the BBB and the feather is running circuitpython. Likewise for relays, I’ll have the state of switches (hardware) on the BBB box, read and also packed into the array which will be control the relays via the pins on the feather.
I’m doing the programing myself on the feather, using the tutorials and the onboard circuitpython. available on adafruit. It is a challenge learning how functions work and stuff. My biggest challenge, I think, is to figure out how to pack the data on one end and unpack it into the various variables on the other end. The readout of the sensors and state of the function variables is easily reported to the regular serial terminal with ‘print()’ statements somewhere in the various functions. Those happen every time the loops execute. Basically a ‘while True’ running on a top level program that calls functions in various separate sub-programs. The top level uart.read and then takes the values and does as above.
Right now it is mostly working, it writes out to the terminal and grabs data from the uart, but the data from the uart is formatted funny: "(b’data\r) so I’m going to have to figure out how to strip this to just the data, parse it into individual data fields and then write the various data to each variable I’m using.
Having a the values on the serial terminal read by something like vpython on the surface to create a display would be great. The control box with the switches and pots will likely have a HDMI display on it for the BBB to read from the UDP data and give a readout. No keyboard or anything.
The regular logitec 310 joystick and QGC running on the laptop will control 6 thrusters and 1 motor for a claw arm, plus a relay from the 8 main pwm outputs on the pixhawk, read from the Bar30 pressure sensor, and operate 2 servos to control pan/tilt on the attached USB camera to the RPi, trigger two relays for pneumatics on the claw/arm, read the leak sensor, all on the aux connectors.
I don’t yet know how to get the rangefinder sensor data into QGC so it can enable height-above-bottom hold mode, sending packets to the pixhawk. It is an I2C device, so theoretically It should connect directly to the pixhawk I2C port and just work, but I’m a bit confused on how to configure the parameters for the px4 software to use it.
So yes I write the software, bumbling as I am. It’s itterative/learning. I would love some Python examples of doing this kind of serial read/write stuff on the laptop and also on the BBB.
What I plan to do is publish on these forums all my code for the circuit python devices, all the specific parts I am using and diagrams of how I hook it up, once it is all working. Then of course I have to cram all this stuff into my custom housings, make all the physical wiring connections and that stuff. I plan to order more blue robotics penetrators and some flat windows for my housings. I’’ put up a build log with photos of it all, and the finished project. We will be using this ROV to support a scientific mission to some volcanic lakes, looking for hot spots using a temperature sensor array and taking bottom site samples of water and physical objects, and netting some organic material. The depth for all this is going to be around 20m to 65 or 75 meters.
Hope this answers your questions. I am acutely aware of my newbie status at programming and some things are not obvious because of that. I think the BR ArduSub is a fabulous resource and I realize that low budget operations like this won’t have professional programmers to make stuff like this work. So having concrete examples of working systems like this, (rather than handwaving) makes a massive difference to entry-level hobbyist and experimenters, or low budget scientific applications.
Thanks for your quick reply.