Sensor Projects with Raspberry Pi by Guillermo Guillen
Author:Guillermo Guillen
Language: eng
Format: epub
ISBN: 9781484252994
Publisher: Apress
# Use BCM GPIO references
# instead of physical pin numbers
GPIO.setmode(GPIO.BCM)
# Define GPIO to use on Pi
GPIO_PIR = 7
print "PIR Module Test (CTRL-C to exit)"
# Set pin as input
GPIO.setup(GPIO_PIR,GPIO.IN) # Echo
#Setup our API and delay
myAPI = "OVD5H5HULC90XH27" # API Key from thingSpeak.com channel
myDelay = 15 #how many seconds between posting data
def getSensorData():
Current_State = 0
Previous_State = 0
PIR = 0
try:
# Loop until users quits with CTRL-C
while True :
# Read PIR state
Current_State = GPIO.input(GPIO_PIR)
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Linux Device Driver Development Cookbook by Rodolfo Giometti(3936)
Embedded Programming with Modern C++ Cookbook by Igor Viarheichyk(3640)
Implementing Cellular IoT Solutions for Digital Transformation by Dennis McCain(3576)
Embedded Linux Development Using Yocto Project - Third Edition by Otavio Salvador & Daiane Angolini(3413)
TinyML Cookbook by Gian Marco Iodice(3340)
Simplifying 3D Printing with OpenSCAD by Colin Dow(2844)
TinyML Cookbook by Gian Marco Iodice & Ronan Naughton(2606)
Fusion 360 for Makers by Lydia Sloan Cline(2223)
Networking A Beginner's Guide by Bruce Hallberg(2212)
Hands-On Linux for Architects by Denis Salamanca(2054)
But How Do It Know? by J. Clark Scott(2035)
Computers For Seniors For Dummies by Nancy C. Muir(2005)
Raspberry Pi and MQTT Essentials by Dhairya Parikh(1956)
Arduino Project Handbook, Volume 2: 25 Simple Electronics Projects for Beginners by Geddes Mark(1953)
9781803246888-ENHANCING DEEP LEARNING WITH BAYESIAN INFERENCE by Unknown(1905)
Hack and HHVM by Owen Yamauchi(1885)
31 Days Before Your CompTIA A+ Exams (Shanette Luellen's Library) by Benjamin Patrick Conry(1864)
MicroPython Projects by Jacob Beningo(1743)
Hands-On Internet of Things with MQTT by Tim Pulver(1714)
