Xw0rkS

Xw0rkS Podržite stranicu www.xw0rks.tk i donirajte putem paypala ako želite da pomognete nove projekte. Please support www.xw0rks.tk and by donating via paypal.

Servisiranje kompjutera
Instalacija kompjuterskih mreza
Informacioni sistemi za mala preduzeca
Instalacija Windows i Linux server

----------------
Auto elektronika i diagnostika
Dekodiranje radio uredjaja. Instalacija navigacionih sistema i mapa

Otvaranje Laptopa HP 250 G6
07/04/2020

Otvaranje Laptopa HP 250 G6

Popravka Samsung S4 utičnice za napajanjeEMSystems
07/04/2020

Popravka Samsung S4 utičnice za napajanje
EMSystems

Naučite komande za Linux Terminal
07/04/2020

Naučite komande za Linux Terminal

BMW E34 - Start Engine Button
23/08/2019

BMW E34 - Start Engine Button

On video you can see me turning the ignition, ECU and starting the engine with little button.

Stripped dash, wiring, driving - BMW E34 M50B20
23/08/2019

Stripped dash, wiring, driving - BMW E34 M50B20

Mono windshield wiper hack for BMW E34
23/08/2019

Mono windshield wiper hack for BMW E34

Short shifter for BMW E34
23/08/2019

Short shifter for BMW E34

BMW E34 - TFT - Raspberry Pi - RVC
23/08/2019

BMW E34 - TFT - Raspberry Pi - RVC

10/03/2018

Input button to execute   system command on Raspberry Piwith  . In this case it's   or   command to safely turn off or r...
16/02/2018

Input button to execute system command on Raspberry Pi
with . In this case it's or command to safely turn off or restart your in case you don't have display and have no time to . But you can use any system command you want.

Connecting:
Pin 1 (3.3v) > 1 kOhm resistor > Pin 11 (GPIO 17) > Button > Ground

Here is , name it as you want with ".py" extension (for example button.py) and later run it with privileges ("sudo python button.py")

import RPi.GPIO as gpio
import os
up pin 17 as an input
gpio.setmode(gpio.BCM)
gpio.setup(17, gpio.IN)

while True:
input_value = gpio.input(17)
if input_value == False:
os.system("sudo poweroff") "sudo reboot"
while input_value == False:
input_value = gpio.input(17)

Python programming language Raspberry Pi Projects and Resources Raspbian Linux
www.xw0rks.tk

Address

Dubrovacka 100
Novi Pazar
36300

Alerts

Be the first to know and let us send you an email when Xw0rkS posts news and promotions. Your email address will not be used for any other purpose, and you can unsubscribe at any time.

Contact The Business

Send a message to Xw0rkS:

Share