What is the Internet of Things? How is Lincubate helping students learn about the Internet of Things?
Using basic Python code we can program these lights to flash just light traffic lights.
The Raspberry Pi is a low cost, credit-card sized computer that plugs into a computer monitor or TV, and uses a standard keyboard and mouse. It is a capable little device that enables people of all ages to explore computing, and to learn how to program in languages like Scratch and Python. It’s capable of doing everything
We’ll be working with this existing project code. https://github.com/adafruit/Raspberry_Pi_SQLite_Sensors Video overview long version: Part 1: https://www.youtube.com/watch?v=_TVP3iHyoqQ Part 2: https://www.youtube.com/watch?v=bLO8G21z8bY Part 3: https://www.youtube.com/watch?v=S_NNGgdYUZA Project instructions long version – https://github.com/adafruit/Raspberry_Pi_SQLite_Sensors Hooking up the DHt 11 sensor to the Raspberry Pi visual – https://www.techcoil.com/blog/how-to-read-temperature-and-humidity-from-a-dht11-sensor-that-is-connected-to-a-raspberry-pi-3/ Be sure to watch the YouTube videos and run through all 4 parts! Get to the Terminal.
To get your device up and running we need to install the Operating System. You can: 1) Use NOOBS, and copy NOOBS to a USB Keyfob and boot the device. This can be problematic when trying to re-install the OS. 2) Download the Raspian image and use RUFUS to burn the image to a USB
Sudo – generally you put sudo in front of everything that requires permissions to run, such as mkdir. sudo raspi-config this will give you a terminal based configuration interface. Very handy when using Putty remotely. Filesystem Commands ls The ls command lists the content of the current directory (or one that is specified). It can
Install Python https://www.raspberrypi.org/documentation/linux/software/python.md Source Location for PiTraffic – https://github.com/sbcshop/PiTraffic cd / cd optsudo mkdir trafficcd trafficsudo wget https://github.com/sbcshop/PiTraffic/blob/master/PiTraffic.py Run Wget command on the two .PY files – Here is the code that I came up with – import PiTrafficimport time SouthRed = PiTraffic.Traffic(“SOUTH”, “RED”)SouthYellow = PiTraffic.Traffic(“SOUTH”, “YELLOW”)SouthGreen = PiTraffic.Traffic(“SOUTH”, “GREEN”) EastRed = PiTraffic.Traffic(“EAST”, “RED”)EastYellow =