Skip to content

Latest commit

 

History

History
228 lines (150 loc) · 8.28 KB

README.md

File metadata and controls

228 lines (150 loc) · 8.28 KB

Raspberry Pi IoT Journey

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!

Projects

Table of Contents

  1. Getting Started
  2. Hardware Setup
  3. Software Setup
  4. Basics
  5. Projects
  6. Resources
  7. Contributing
  8. License

Getting Started

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.

Hardware Setup

The basic hardware to use for the basic segment of this repository:

Basic Parts list
  1. Raspberry PI 4 model b
  2. SD Card (32Gb minimum)
  3. 5V Power Source (wall/ stored power)
  4. Bread Board(s)
  5. LEDs(s)
  6. Resistors(s)
  7. Connectors(MM, MF, FF)
  8. Push Button(s)
  9. Capacitor(s)
  10. Motors(s)
  11. Dot matrix display(s)
  12. Digital Display(s)
  13. LCD display(s)

Software Setup

Raspberry OS setup

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

    Selecting

  • Setup the configuration for the device

    config

  • Write to disk and vertify

Write

Vertify

Complete

  • 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

Extension

  • Add a remote host

Extension

  • Enter the SSH information

Extension

  • VS Code will setup the remote server

Extension

Extension

With the hardware and software setup, you can proceed to the basics section

Basics

  1. Lighting an LED

    A hello world of sorts.

  2. RGB LED

    A way to control RGB LED configurations to achieve any colour.

  3. Blinking an LED

    An improvement of the above that uses python logic to blink the led indefinately or for a set number of times.

  4. 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.

  5. Toggle Switch

    A way to toggle an LED on or off.

  6. Pulse Width Modulation

    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.

  7. Servo Motor

    A servo motor is a sensory actuator that allows for precise control of angular or linear position.

  8. Ultrasonic Sensor

    Using ultrasonic waves to measure distances. Using the HC-SRO4 ultrasonic sensor(range 2cm to 400cm) Operating voltage is 5V.

  9. Displays

    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.

  10. 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.

  11. 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.

  12. 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.

Projects

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.

Resources

1. Fritzing

Fritzing. (Version 0.9.3b). Fritzing. Retrieved from https://fritzing.org

2. Youtube @paulmcwhorter

Awsome video series on RPi stuff. https://youtube.com/playlist?list=PLGs0VKk2DiYxdMjCJmcP6jt4Yw6OHK85O

Contributing

License

This project is licensed under the MIT License. You can find the full text of the license in the LICENSE file.