1.
Write an application to detect obstacle and notify user using
LEDs
import [Link] as GPIO
import time
[Link]([Link])
[Link](3,[Link])
try:
while True:
i= [Link](3)
if i==1:
print("No Obstacle")
[Link](0.1)
else:
print("Obstacle Found")
[Link](0.1)
[Link] an application to read the environment temperature.
import [Link] as GPIO
import dht11
import time
# initialize GPIO
[Link](False)
[Link]([Link])
#[Link]()
# read data using Pin GPIO21
instance = dht11.DHT11(pin=21)
while True:
result = [Link]()
if result.is_valid():
print("Temp: %d C" % [Link] +' '+"Humid: %d %%"
% [Link])
[Link](1)
[Link] an application to capture and store the image.
import picamera, time
camera = [Link]()
camera.start_preview()
[Link](5) # hang for preview for 5 seconds
[Link]('[Link]')
camera.stop_preview()