A repository where I teach myself IoT technology based on the Raspberry Pi 4 Model B. The repository contains resources, tutorials and projects I have acquired developed along the way.
This repository should be treated as a way to showcase projects as well as serve as a 'how to' that guides people to replicate said projects, not to be confused as an educative authority on the subject matter.
¡Vamonos! Let's go!
My current setup involves interacting with the pi using the General Purpose Input/Output pins (GPIO) pins connected to components which are driven by Python programming logic.
To interact with the pi, I used headless 32-Bit Raspberry OS lite install running VS-Code Server over SSH (on the same LAN connection) to program and interact with the system. (Details to achieve this is in the software setup section).
The hardware component setup will be in the form of simulated diagrams.
The basic hardware to use for the basic segment of this repository:
- Raspberry PI 4 model b
- SD Card (32Gb minimum)
- 5V Power Source (wall/ stored power)
- Bread Board(s)
- LEDs(s)
- Resistors(s)
- Connectors(MM, MF, FF)
- Push Button(s)
- Capacitor(s)
- Motors(s)
- Dot matrix display(s)
- Digital Display(s)
- LCD display(s)
Setting up the headless 32-bit Raspberry OS lite. Steps
-
Install Raspberry Pi Imager [Link to the official site]
Windows systems
Install the setup from the link above
For Linux systems
Debian
$ sudo apt install rpi-imager
Fedora
$ sudo dnf install rpi-imager
-
Plug in your SD card to your pc
-
Run the Raspberry Pi Imager Be sure to run the program on sudo mode or as administrator to enable write operations to disks (in this case, the SD card)
Windows systems
Run the Raspberry Pi Imager as Administrator For Linux systems
$ sudo rpi-imager
-
Select the 32-bit image and the relevant SD card
-
Setup the configuration for the device
-
Write to disk and vertify
-
SSH into the Pi
Aquire your Pi's local IP address from your router and use it to SSH into the board.
$ ssh [YOUR USER NAME]@[YOUR HOST NAME/ Local IP]
Update the firmware before proceeding
$ sudo apt-get update && sudo apt-get upgrade
-
Setup VS Code server
- On your PC's VS Code, install the extention below remote-ssh (marketplace link)
- Add a remote host
- Enter the SSH information
- VS Code will setup the remote server
With the hardware and software setup, you can proceed to the basics section
-
A hello world of sorts.
-
A way to control RGB LED configurations to achieve any colour.
-
An improvement of the above that uses python logic to blink the led indefinately or for a set number of times.
-
Step Up and Step Down resistors
Why when expecting input from a GPIO pin, it is good to consider a step up or step down resistor to avoid the indeterminate state (Ƶα) link.
-
A way to toggle an LED on or off.
-
Pulse Width Modulation (PWM) is a technique used to encode infromation in a signal or control power delivery of systems. By varying a signal (in this case a square wave signal) to regulate power supplied to a load.
-
A servo motor is a sensory actuator that allows for precise control of angular or linear position.
-
Using ultrasonic waves to measure distances. Using the HC-SRO4 ultrasonic sensor(range 2cm to 400cm) Operating voltage is 5V.
-
A guide on how to use an array of displays e.g., dot matrix displays, segment displays (1 digit and 4 digit displays), led bar segment display, lcd displays e.t.c.
-
Motion Sensor Using a Passive InfRared (PIR) motin senosr to detect target movement in front of the sensor. This can be used as a trigger mechanism for a larger operation. e.g., turning lights on/off, setting of an alarm etc.
-
Accelerometer Using a 3 axis digital motion sensor to detect changes in positioning relative to a 3D cartecian plane. It can be used to inform motors of theri relative position in hopes of stabilizing movement such as flying or staying upright.
-
Sound Sensor Using the KY-038 sound sensor, we can perform sound decible threshold measurements. If the surroungin sound exceeds a particular threshold, the sensor will detect and alert on this.
A project that shows real time ambient temperature and humidity captured by the DHT11 sensor and displayed on the 1602A LCD display.
Given a target area monitored by a Passive InfRared (PIR) sensor, this project reports the number of detected disruptions in the area.
Fritzing. (Version 0.9.3b). Fritzing. Retrieved from https://fritzing.org
Awsome video series on RPi stuff. https://youtube.com/playlist?list=PLGs0VKk2DiYxdMjCJmcP6jt4Yw6OHK85O
This project is licensed under the MIT License. You can find the full text of the license in the LICENSE file.