Posts: 48
Threads: 8
Joined: Feb 2020
Reputation:
0
Hi, the Tinypilot board supports push buttons directly wired to GPIO. Is there a way of doing the same on an RPi 3? I would like to have a simple push button control panel with Engage/Disengage, Add/Subtract from course, Tack etc. I know I can do this on a mobile phone using the webb app, but I would like a way of controlling Pypilot when my hands are cold and wet!
Thanks
David
Posts: 3
Threads: 1
Joined: Oct 2019
Reputation:
0
CapnKernel,
Your choice of keypad is great.
I was very concerned about using switches that are not waterproof . Is this a customised design?
Eric
Posts: 48
Threads: 8
Joined: Feb 2020
Reputation:
0
I don't have a TinyPilot. I have an RPi 3 running Open CPN (latest version) with the Pypilot plugin. This communicates via a serial link to an Arduino Nano that actually controls the steering motor (a hydraulic pump in my case via a Pololu H bridge controller). This is all working fine (on the bench anyway). So, yes I want to connect the buttons direct to the RPi 3. If this is not supported by the Pypilot plugin then I suppose I could add a keypad to the Arduino to take manual control of the motor, but this would not be as good a solution.
Cheers
David
Posts: 2,179
Threads: 20
Joined: Jun 2016
Reputation:
64
The service you need is either "pypilot_hat" or "pypilot_lcd" depending on the pypilot version. This service reads from gpio pins, IR and other inputs and optionally displays as well on a SPI display. This service communicates over a socket to pypilot to control the autopilot, and by default it is not running on openplotter.
Posts: 48
Threads: 8
Joined: Feb 2020
Reputation:
0
Sean, many thanks. I have Pypilot 2.0.8 so please can you tell me with service I need and how to load it. Also, is there a file that defines what each GPIO does?
Posts: 48
Threads: 8
Joined: Feb 2020
Reputation:
0
Success! I ran hat.py and browsed to port 33333 and set up the pins to do the actions I wanted. All working fine. All I need to do now is work out how to run hat.py as a service. I also need to stop the pop up lcd screen from appearing on the Pi , I assume it does this as I have no SPI lcd screen connected.
Many thanks for your help!
David
Posts: 17
Threads: 2
Joined: Mar 2020
Reputation:
0
Sean et al,
I upgraded from OP 1.2->2.0. Not sure now how to configure my GPIO actions as before? I have a hardware button on GPIO19 to shut down the system, and a status LED on GPIO16. Are these via NodeRED now?