2019-06-30, 11:12 PM
Hello World,
For a number of reasons, I'm interested in controlling my wheel running pypilot on openplotter from the pilot's desk with a wifi link. To that end I picked up an Arduino Uno Wifi (first developers' edition). I'm seasoned in building and operating linux/unix systems, with good networking and server skills, but I have no experience with these arduino controllers, and scant exposure to coding.
I understand that I need this controller to exchange duplex serial data with pypilot on the openplotter box as either signalk or nmea0183 sentences.( I know this would be trivial if I was hardwiring it with 3 conductors + shield/ground, but on our Tartan, the cockpit is exposed, and the installation will need to be tucked tightly into the lazarette ).
The Uno Wifi has native support for MQTT messages. I've been able to configure it to connect with the MQTT node on openplotter; that is, the Arduino webpage confirms a connection to the Pi ip on port 1883, but that is the extent of my progress. I haven't gotten to where I've actually made a sketch that exchanges messages. Clearly, I've got much yet to learn.
So, here's what I'm asking, if anyone can help:
1. Am I spinning my wheels with this? Is MQTT a protocol suited to controlling the arduino from pypilot? Can the motorcontroller's messages be passed back to pypilot via MQTT? If so, how to begin? Can MQTT messages be passed into the signalk bus?
2. Am I overlooking something much simpler? Is there a way to configure this Uno WiFi to directly establish a serial connection via its wifi device? Has someone modified Sean's motor.ino to try this already?
3. Oh, and one last question: In Pypilot on OpenPlotter, the field in which the controller device or port is configured doesn't accept entries. I can put a cursor in there, but typing in the field only produces a <bonk!> with every keystroke? Is my build of pypilot broken? It is fully updated.
Thanks in advance for whatever you can share. Pointers, code samples, warnings, sympathy et al are appreciated.
Elliott
For a number of reasons, I'm interested in controlling my wheel running pypilot on openplotter from the pilot's desk with a wifi link. To that end I picked up an Arduino Uno Wifi (first developers' edition). I'm seasoned in building and operating linux/unix systems, with good networking and server skills, but I have no experience with these arduino controllers, and scant exposure to coding.
I understand that I need this controller to exchange duplex serial data with pypilot on the openplotter box as either signalk or nmea0183 sentences.( I know this would be trivial if I was hardwiring it with 3 conductors + shield/ground, but on our Tartan, the cockpit is exposed, and the installation will need to be tucked tightly into the lazarette ).
The Uno Wifi has native support for MQTT messages. I've been able to configure it to connect with the MQTT node on openplotter; that is, the Arduino webpage confirms a connection to the Pi ip on port 1883, but that is the extent of my progress. I haven't gotten to where I've actually made a sketch that exchanges messages. Clearly, I've got much yet to learn.
So, here's what I'm asking, if anyone can help:
1. Am I spinning my wheels with this? Is MQTT a protocol suited to controlling the arduino from pypilot? Can the motorcontroller's messages be passed back to pypilot via MQTT? If so, how to begin? Can MQTT messages be passed into the signalk bus?
2. Am I overlooking something much simpler? Is there a way to configure this Uno WiFi to directly establish a serial connection via its wifi device? Has someone modified Sean's motor.ino to try this already?
3. Oh, and one last question: In Pypilot on OpenPlotter, the field in which the controller device or port is configured doesn't accept entries. I can put a cursor in there, but typing in the field only produces a <bonk!> with every keystroke? Is my build of pypilot broken? It is fully updated.
Thanks in advance for whatever you can share. Pointers, code samples, warnings, sympathy et al are appreciated.
Elliott