This repository contains all the code I have written while learning about embedded systems development. I have used the Raspberry Pi 3 Model B+ as my embedded system development board, and I have used the C++ programming language to write the code for the Raspberry Pi.
To run the code in this repository, you need to have a Raspberry Pi 3 Model B+ and a breadboard with a Red LED, Yellow LED, and a push button.
- Clone the repository to your Raspberry Pi.
- You will need to have wires, a breadboard, a Red LED, Yellow LED, and a push button connected to the Raspberry Pi GPIO pins. The GPIO pins that wil be open at startup are defined in the export_gpio.sh file. Edit the file export_gpio.sh and main.cpp to match the GPIO pins you have connected to the Raspberry Pi.
- Once the above is completed, run the following command to open the GPIOs, compile the code and run the program:
make init # will open the GPIOs defined in the export_gpio.sh file, need to be done at startup only.
make run # will compile the code and run the program- Run the following command to get more options:
make help # will display the help menuThis file contain all the General Purposes Input/Output (GPIO) pins to be opened at startup of the raspberry pi.
This file contain the GPIO class that is used to control the GPIO pins on the raspberry pi.
This file contain the implementation of the GPIO class.
This file contain the main program for my study of semaphore, mutexes, polls and threads. This program contain a simple light show with a Red and Yellow LED when a physical button is pressed on the raspberry pi breadboard.