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
Create action from switch attached to GPIO
#14
Hi, Maybe I'm doing something wrong. But somehow I can't really figure out what I'm doing wrong. I
hope one of you has the answer!What I'm trying to do is to let my pi shutdown whenever I push a button. And for the time being I have just put in a message box in order to give me some sort of feedback, instead that it keeps booting down.

   
The button I'm attaching
   
How I set up the GPIO pull-up
   
How I set up my action
   

And I get the message if I put the value to 1, but then it also shows the message when I boot, which means that it would go immediately into shutdown (that happened already once to me)

Hopefully you guys can help. I have the latest version of Openplotter v1.0.0

Quote:If you want to trigger when a pin is connected to ground then the gpio pin needs to be configured as pull up, otherwise it's always connected to ground internally. In this example there are 3 pins being used, when pin 26 is connected to ground it turns the LED on pin 16 on, then if pin 19 is connected to ground it turns the LED off again.
On openplotter V0.11.7 alpha.

[Image: jaxYtit.png]
[Image: 9CBBid0.png]
[Image: u0aebhZ.png]

Creating a waypoint in opencpn doesn't look so easy though:
From
https://opencpn.org/wiki/dokuwiki/doku.p..._sentences


Quote:xxWPL - Waypoint Location Used to send routes and waypoints up to a GPS receiver. OpenCPN does not process these sentences as input.

Edit: Though digging deeper...
https://opencpn.org/flyspray/index.php?d...sk_id=1595

Quote:I've just recently realised that, in theory, OCPN should read-in a WPL sentance in the context of APRS, and generate a specific AIS target. If this is the case, the contextual menu (right click on the AIS target/target query) should offer the possibility of creating a waypoint.
Actually creating the nmea sentence might be a job better suited to node-red - quite easy to get at the signalk data, or anyone know how to do that as bash?
Reply


Messages In This Thread
RE: Create action from switch attached to GPIO - by vriezenaar - 2018-07-15, 06:06 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)