View: 6734|Reply: 3

Tact-switch on GPIO

[Copy link]

3

threads

46

posts

691

credits

Senior member

Rank: 4

credits
691
Published in 2016-3-20 18:12:37 | Show all floors |Read mode
Hello
I'd like to use tact-switch connected fo GPIO to control system - when I press button same commant will be send to console. It is for controll internet radio - MPC.
I use it on Raspberry Pi via Python. I am not programmer - if someone could show some example program and wiring...
Thank yoi in advance

10

threads

218

posts

2040

credits

Gold member

Rank: 6Rank: 6

credits
2040
Published in 2016-3-21 15:38:47 | Show all floors
Edited by nopnop2002 at 2016-3-21 17:03

python-rpi.gpio can't be installed in orange pi.
  1. orangepi@OrangePI:~$ sudo apt-get -y install python-rpi.gpio
  2. Reading package lists... Done
  3. Building dependency tree
  4. Reading state information... Done
  5. E: Unable to locate package python-rpi.gpio
  6. E: Couldn't find any package by regex 'python-rpi.gpio'
Copy code
You have to use a C language or you have to use orangepi_PC_gpio_pyH3.
  1. https://github.com/duxingkei33/orangepi_PC_gpio_pyH3
Copy code



3

threads

46

posts

691

credits

Senior member

Rank: 4

credits
691
 Author| Published in 2016-3-25 00:07:16 | Show all floors
Now I can use buttons in python program - a can control internet radio.
http://www.orangepi.org/orangepi ... page%3D1&page=2
But now I'd like to print some messages and menu on text LCD 2x16 on I2C (or directly connected to GPIO) - in python too.
Maybe someone has solution?

10

threads

218

posts

2040

credits

Gold member

Rank: 6Rank: 6

credits
2040
Published in 2016-3-26 09:43:44 | Show all floors
mswiniuch replied at 2016-3-25 00:07
Now I can use buttons in python program - a can control internet radio.
http://www.orangepi.org/oran ...

Directly connect to GPIO to 16x2 lcd.
Follow this thread.

http://www.orangepi.org/orangepi ... &extra=page%3D1



You need to log in before you can reply login | Register

Points Rule

Quick reply Top Return list