I don't think tinypilot really plays well with node red... So pypilot_hat will configure the io pins as input and read from them. You don't have to assign actions to all of them, so your shutdown should still work but output on one of these may need to slightly modify pypilot/hat/gpio.py
(2020-06-11, 12:01 PM)xfactor99 Wrote: [ -> ] (2020-06-11, 11:00 AM)drbarritt Wrote: [ -> ]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?
Hi David
most awnsers to all of your questions concernig the tinypilot/pypilot (basicly the same) you will find by searching the wiki, the forum and the code on github.
Also simple trying will learn you a lot and is great fun. At the end when all these did not help others will be pleased to do so ....
You are absolutely right in wanting save control over the autpilot ..... best by more then one way ....
I leave you a picture of my control at the helm wich is wired (except the clutch-swich for savety) to the GPIO´s:
(and reported in this forum erlier)
Greetings and save sailing
Andreas
Hi Andreas, this looks great. Can you share the connections for each push switch to the TinyPilot? Auto and Menu are clear, but tehe remaining pins on the Pi are up, down, and select. How do you handle the double-left/double-right?
Thanks
Phil
The future versions of pypilot uses the same pins, but also offers 7 more external pins (via arduino)
All of the pins can have customized functions as well via the web interface to reconfigure them.
(2020-06-11, 11:00 AM)drbarritt Wrote: [ -> ]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?
Not sure if you have the service set-up, but you can run a python script just by adding it in /etc/rc.local:
- start terminal
- sudo nano /etc/rc.local
- Just before the exit command, type the command you run to open the script (usually: python3 /pathtoscript/scriptname.py
- Don't forget to close with & after the script name
Hope this helps until the next version launches.
(2020-06-09, 03:52 AM)CapnKernel Wrote: [ -> ]Are you talking about buttons onto tinypilot, or buttons onto OpenCPN?
(I use a keypad like this with tinypilot)
Did you need to adjust anything software wise to get this switch array to work? Can you show my how you wired it to the gpio pins?
You don't need to change software to use this switch. It just needs to be plugged in the right way, and the led won't work, and the 'power' will be select/back.
(2020-10-09, 11:14 PM)seandepagnier Wrote: [ -> ]You don't need to change software to use this switch. It just needs to be plugged in the right way, and the led won't work, and the 'power' will be select/back.
Thanks Sean, That would work fine, so what value of resistor should I put in series and what side of the switch should the resistor be placed? Between the gpio pin and the switch or between the switch and ground?
(2020-10-09, 10:03 PM)rastam4n Wrote: [ -> ]Did you need to adjust anything software wise to get this switch array to work? Can you show my how you wired it to the gpio pins?
No, just connected it, like this:
https://forum.openmarine.net/showthread....3#pid11963
(2020-10-10, 01:04 AM)rastam4n Wrote: [ -> ]Thanks Sean, That would work fine, so what value of resistor should I put in series and what side of the switch should the resistor be placed? Between the gpio pin and the switch or between the switch and ground?
In another thread, Sean suggested a resistor between the GPIO and the keypad pin to provide some protection against possible short circuits. I used a 1k resistor array and it works ok:
[
attachment=1084]
I've connected the LED to GPIO7, but I don't know if that's the recommended pin, or if the pin has sufficient drive current.
(2020-10-12, 02:10 AM)CapnKernel Wrote: [ -> ] (2020-10-09, 10:03 PM)rastam4n Wrote: [ -> ]Did you need to adjust anything software wise to get this switch array to work? Can you show my how you wired it to the gpio pins?
No, just connected it, like this:
https://forum.openmarine.net/showthread....3#pid11963
(2020-10-10, 01:04 AM)rastam4n Wrote: [ -> ]Thanks Sean, That would work fine, so what value of resistor should I put in series and what side of the switch should the resistor be placed? Between the gpio pin and the switch or between the switch and ground?
In another thread, Sean suggested a resistor between the GPIO and the keypad pin to provide some protection against possible short circuits. I used a 1k resistor array and it works ok:
I've connected the LED to GPIO7, but I don't know if that's the recommended pin, or if the pin has sufficient drive current.
I believe the resistor Sean suggested was a current limiting resistor to GND avoiding a direct short to ground by the switch.
I have a number of these membrane keypads and they all have a resistance from 27-47 Ohm per switch, so no need for the resistor to GND.
My keypad has an LED as well with a separate wire for the power, not using it at the moment.