Jump to content

use push button on orange pi, via GPIO


Go to solution Solved by usual user,

Recommended Posts

Posted

Hy guys

 

i want to use a push button on my orange pi.

 

if i press the button, the orange pi should run a script.

i only use esp8266 with arduino tu create some interactive tools.

does anybody know, how it works on the orange pi and which cheapy button you would prefer?

i only want to run sh script, when the button will be press.

 

thank you a lot!

  • Solution
Posted
1 hour ago, jumbo125 said:

i want to use a push button on my orange pi.

 

How to wait for a button press is outlined here.

If you want to be able to write code that is device-agnostic, you'll need to set up generic gpio-line-names.
See here for reference.

With that in place e.g.:

gpiomon --num-events=1 con1-08 && my-script

will be able to run on any device that has the gpio-line-names set up in the same way.
I.e. will wait at pin 8 of the first extention connector for an event.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines