Started work on a raspi

This commit is contained in:
Boyan 2022-07-20 17:02:17 +03:00
parent 05562e425b
commit 66bc040ba8
3 changed files with 19 additions and 1 deletions

1
.gitignore vendored
View File

@ -3,6 +3,7 @@
__pycache__/
*.py[cod]
*$py.class
checklist.json
# C extensions
*.so

View File

@ -1,7 +1,7 @@
* [x] implement ssb
* [x] create main.py
* [x] eat dinner
* [ ] start working on an actual raspberry pi
* [x] start working on an actual raspberry pi
* [ ] get all parts needed
* [x] calculate the entire cost, so you can boast that it's probably two-three times cheaper than the cheapest QRP out there
* [ ] write the code for the screen/leds/buttons

17
main.py
View File

@ -0,0 +1,17 @@
import RPi.GPIO as GPIO
def button_press(pin:int):
def button_callback(channel):
GPIO.cleanup()
return True
GPIO.setwarnings(False)
GPIO.setmode(GPIO.BOARD) # physical numbers
GPIO.setup(pin, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)
GPIO.add_event_detect(pin,GPIO.RISING,callback=button_callback)
GPIO.cleanup()
return False
if __name__ == "__main__":
print(button_press(19))