RPi 3 Pypilot control via GPIO push buttons - Printable Version +- OpenMarine (https://forum.openmarine.net) +-- Forum: Pypilot (https://forum.openmarine.net/forumdisplay.php?fid=17) +--- Forum: General discussion (https://forum.openmarine.net/forumdisplay.php?fid=18) +--- Thread: RPi 3 Pypilot control via GPIO push buttons (/showthread.php?tid=2636) |
RE: RPi 3 Pypilot control via GPIO push buttons - seandepagnier - 2020-06-16 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 RE: RPi 3 Pypilot control via GPIO push buttons - Phil_Shotton - 2020-07-01 (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 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 RE: RPi 3 Pypilot control via GPIO push buttons - xfactor99 - 2020-07-01 (2020-07-01, 08:25 PM)Phil_Shotton Wrote:(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 Phil the gpio's are keys with switch to ground gpio (17, 27, 22, 18, 23, 5, 6, 26) so if I remember well the 5 and 6 is the double left and right. up and down is single left and right 27 and 22. Select I dont use and there is also a posibility to tack .... Just try the above pins by shortening them just a short time to ground and see what happens. Greetings Andreas RE: RPi 3 Pypilot control via GPIO push buttons - seandepagnier - 2020-07-02 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. RE: RPi 3 Pypilot control via GPIO push buttons - jamos.tan@gmail.com - 2020-07-28 (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. RE: RPi 3 Pypilot control via GPIO push buttons - rastam4n - 2020-10-09 (2020-06-09, 03:52 AM)CapnKernel Wrote: Are you talking about buttons onto tinypilot, or buttons onto OpenCPN? 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? RE: RPi 3 Pypilot control via GPIO push buttons - seandepagnier - 2020-10-09 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. RE: RPi 3 Pypilot control via GPIO push buttons - rastam4n - 2020-10-10 (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? RE: RPi 3 Pypilot control via GPIO push buttons - CapnKernel - 2020-10-12 (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.php?tid=2228&pid=11963#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. RE: RPi 3 Pypilot control via GPIO push buttons - SYWindveer - 2020-10-12 (2020-10-12, 02:10 AM)CapnKernel Wrote:I believe the resistor Sean suggested was a current limiting resistor to GND avoiding a direct short to ground by the switch.(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? 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. |