This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Cockpit button control?
#1
My nav station is below and I would prefer not to have a phone in the cockpit to control PyPilot.  What I would like are three waterproof momentary buttons in the cockpit:

Standby, Port, Starboard.

Short press for 2 degrees, long press for 10 degrees and very long press to tack.

When standby on, press moves linear actuator.

My thought is a small Arduino to take button input and send to RPi via USB cable.

I know I could have cable to the nav station RPi, but one USB cable seems cleaner.

Comments?  I see it as a winter project.

Philip
Reply
#2
Here is esp32 based project which has
pypilot control screen (on waterproof touchscreen)

You can use it as is. Or adapt the code to use hardware buttons
attached to esp32.

https://github.com/bareboat-necessities/...tack-tough


Attached Files Image(s)
           
Download BBN Marine OS for raspberry pi 

https://bareboat-necessities.github.io/m...at-os.html

Video of actual installation:

https://www.youtube.com/watch?v=3zMjUs2X3qU


Reply
#3
(2023-09-24, 06:26 PM)mgrouch Wrote: Here is esp32 based project which has
pypilot control screen (on waterproof touchscreen)

You can use it as is. Or adapt the code to use hardware buttons
attached to esp32.

https://github.com/bareboat-necessities/...tack-tough

Very interesting. I'll have a close look at it.

My first thoughts, though, are that I am trying to simplify everything. I had OpenPlotter with PyPilot and had huge problems in getting it to work properly, so adding a different OS doesn't seem too attractive.  After many years of using Linux but not getting to grips with it, I've been putting my head into the internals, so hopefully will be a bit more expert.

I haven't heard of ESP32 boards and have just been delving into Arduino - which has a huge amount of information out there - but will have a look.

Buttons appeal - easy and basic. I'll take a look at your code and see how you have implemented things - very useful.

I am off sailing for a few weeks, so this winter is when I'll get down to the project.

Thanks,

Philip
Reply
#4
you do not need to download new OS, just burn ESP32 controller with the code provided and thats all
Reply
#5
If you just want buttons Philip, you don't need a separate microcontroller. You can just wire to the hat (https://pypilot.org/schematics/pypilot_tinypilot.pdf) and have the buttons short to ground. Have a look at the configuration options in the web interface to see if that'd suit you. According to Sean, holding +1/-1 for greater values is now supported (https://forum.openmarine.net/showthread....5#pid24145), so your idea of three buttons for a screen-less set of simple buttons could work fine and would only require 4 wires.
Reply
#6
(2023-12-06, 12:48 AM)kirren Wrote: If you just want buttons Philip, you don't need a separate microcontroller. You can just wire to the hat (https://pypilot.org/schematics/pypilot_tinypilot.pdf) and have the buttons short to ground. Have a look at the configuration options in the web interface to see if that'd suit you. According to Sean, holding +1/-1 for greater values is now supported (https://forum.openmarine.net/showthread....5#pid24145), so your idea of three buttons for a screen-less set of simple buttons could work fine and would only require 4 wires.
Kirren

Many thanks - just got back to this. Looks like your suggestion solves a lot of programming hassle. On the other hand, I won't learn how to link an arduino and RPi in this project.

Philip
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)