Skip to content

Commit ac40709

Browse files
committed
Update readme
1 parent 0175f2a commit ac40709

File tree

15 files changed

+145
-58
lines changed

15 files changed

+145
-58
lines changed

backend/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: 'dslideshow_backend'
2-
version: 7.2.0+8
2+
version: 7.2.0+9
33
description: A sample command-line application
44
publish_to: none
55
environment:

common/lib/version.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
abstract class ApplicationInfo{
2-
static const String frontendVersion = '7.1.0+39';
3-
static const String backendVersion = '7.2.0+8';
2+
static const String frontendVersion = '7.2.0+1';
3+
static const String backendVersion = '7.2.0+9';
44
}

doc/hw_test/LD2410

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit 7b65089bf26e19f280a977f94113b87e38ec5149
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import RPi.GPIO as GPIO # Import Raspberry Pi GPIO library
2+
from time import sleep # Import the sleep function from the time module
3+
GPIO.setwarnings(False) # Ignore warning for now
4+
GPIO.setmode(GPIO.BOARD) # Use physical pin numbering
5+
GPIO.setup(8, GPIO.OUT, initial=GPIO.LOW) # Set pin 8 to be an output pin and set initial value to low (off)
6+
while True: # Run forever
7+
GPIO.output(8, GPIO.HIGH) # Turn on
8+
sleep(2) # Sleep for 1 second
9+
GPIO.output(8, GPIO.LOW) # Turn off
10+
sleep(1) # Sleep for 1 second
11+

doc/hw_test/py_gpio/ld2410.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
python3 ./test_LD2410.py

doc/hw_test/py_gpio/led.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
python blinking_led.py

doc/hw_test/py_gpio/pir.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import RPi.GPIO as GPIO
2+
import time
3+
GPIO.setwarnings(False)
4+
GPIO.setmode(GPIO.BOARD)
5+
GPIO.setup(32, GPIO.IN) #Read output from PIR motion sensor
6+
GPIO.setup(8, GPIO.OUT) #LED output pin
7+
while True:
8+
i=GPIO.input(32)
9+
if i==0: #When output from motion sensor is LOW
10+
print ("No intruders",i)
11+
GPIO.output(8, 0) #Turn OFF LED
12+
time.sleep(0.1)
13+
elif i==1: #When output from motion sensor is HIGH
14+
print ("Intruder detected",i)
15+
GPIO.output(8, 1) #Turn ON LED
16+
time.sleep(0.1)

doc/hw_test/py_gpio/pir.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
python pir.py

doc/hw_test/py_gpio/pir_v2.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import RPi.GPIO as GPIO
2+
import time
3+
GPIO.setwarnings(False)
4+
GPIO.setmode(GPIO.BOARD)
5+
GPIO.setup(32, GPIO.IN) #Read output from PIR motion sensor
6+
def on_detect(channel):
7+
if GPIO.input(channel):
8+
print('Input was HIGH')
9+
else:
10+
print('Input was LOW')
11+
GPIO.add_event_detect(32,GPIO.BOTH,callback=on_detect)
12+
13+
print('Start state:')
14+
on_detect(32)
15+
16+
print('')
17+
message = input("Press enter to quit\n\n") # Run until someone presses enter
18+
GPIO.cleanup() # Clean up

doc/hw_test/py_gpio/push_button.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import RPi.GPIO as GPIO # Import Raspberry Pi GPIO library
2+
def button_callback(channel):
3+
print("Button was pushed!")
4+
GPIO.setwarnings(False) # Ignore warning for now
5+
GPIO.setmode(GPIO.BOARD) # Use physical pin numbering
6+
GPIO.setup(11, GPIO.IN, pull_up_down=GPIO.PUD_UP) # Set pin 11 to be an input pin and set initial value to be pulled low (off)
7+
GPIO.add_event_detect(11,GPIO.RISING,callback=button_callback) # Setup event on pin 10 rising edge
8+
GPIO.setup(13, GPIO.IN, pull_up_down=GPIO.PUD_UP) # Set pin 13 to be an input pin and set initial value to be pulled low (off)
9+
GPIO.add_event_detect(13,GPIO.RISING,callback=button_callback) # Setup event on pin 10 rising edge
10+
GPIO.setup(15, GPIO.IN, pull_up_down=GPIO.PUD_UP) # Set pin 15 to be an input pin and set initial value to be pulled low (off)
11+
GPIO.add_event_detect(15,GPIO.RISING,callback=button_callback) # Setup event on pin 10 rising edge
12+
GPIO.setup(16, GPIO.IN, pull_up_down=GPIO.PUD_UP) # Set pin 15 to be an input pin and set initial value to be pulled low (off)
13+
GPIO.add_event_detect(16,GPIO.RISING,callback=button_callback) # Setup event on pin 10 rising edge
14+
15+
16+
message = input("Press enter to quit\n\n") # Run until someone presses enter
17+
GPIO.cleanup() # Clean up

0 commit comments

Comments
 (0)