The Raspberry Pi is a small single board computer that was originally intended for education and developing countries. In the last 5 years, it achieved way more than this, as it is now one of the best and easiest platforms for tinkerers and DIYers. It is basically a full Linux computer with a small form factor and energy consumption, making it ideal for homemade projects. Most of the time, you can use the Raspberry Pi as a headless machine, without a monitor, keyboard or mouse, and just use Telnet or SSH to access it. This considerably reduces the total cost of a project, as there will be no need to buy a screen, keyboard or mouse. However, the tricky part of this setup is the first installation of the OS. In this tutorial we’ll learn how to set up a Raspberry Pi in a fully headless way.
When working with a Raspberry Pi, it is often convenient to give it a static IP address. For example, if you use it as a DNS server to block ads with Pi-Hole, you don’t want its IP address to change over time. Let’s learn how to give your Raspberry Pi a static IP address!
It is often useful to connect a Raspberry Pi to a Wifi network, and with the latest models, there is no need for a Wifi dongle anymore, as it is integrated into the board. It can however be tricky to set up the Wifi when there is no desktop interface. In this tutorial we’re going to learn how to configure a Raspberry Pi to connect to a Wifi network, with the command line interface.
Most of the time, embedded systems have time sensitive inputs that need to be handled as soon as they are triggered, with minimal delay. This is usually done by using interrupts. Interrupts are pieces of code that are run when an event occurs on one of the microcontroller’s ports, or internal components such as a timer. The execution of the main program is paused, and the microcontroller jumps to the interrupt code (in reality, it jumps to a given address in the program memory, reserved to the interrupt instructions). Once it finishes executing the interrupt code, it will go back to where it stopped in the main program. In this tutorial we’re going to learn how to implement an interrupt when a user pushes on a button.
The number of pins is often limited on microcontrollers, and when we have a significant number of outputs to control, we can quickly run out of pins. An easy solution to fix this problem is to use a shift register. In this tutorial we’re going to learn how to use a 74HC595 shift register, to output 8 bits of data with only 3 bits from the PIC.
As we’ve seen in the tutorial about creating a distance sensor for your garage, it’s important to have a convenient method to debug the systems we’re developing. This allows us to quickly access the values of variables, and lets us know the state of our program. In the distance sensor tutorial we used a LCD display, which is very user-friendly, but not the most efficient as it uses many pins of the PIC, and a lot of space on the board. In this tutorial, we’ll learn how to use one of the easiest and most lightweight embedded communication interface, the UART interface.
We learned in the first part of this tutorial how to measure a distance with a HC-SR04 ultrasonic sensor. In this second part, we’ll get rid of the LCD display, and instead show the distance on a custom meter made with LEDs. The idea is to turn colored LEDs ON/OFF depending on how close the car is from the wall.
If you don’t have a reverse backup radar system in your car, or if you park forward in your garage, you probably know this feeling of “am I too close, am I gonna hit the wall??”. Well, in this 2 part tutorial, we’re going to create a simple system to detect how close to the wall your car is.
In this tutorial we’ll learn how to control a LCD display from a PIC microcontroller. LCD displays are one of the most used devices to display information. It allows an electronic system to show text and is easily programmable using a microcontroller. We’ll use a PIC16F88 from Microchip. This tutorial can be used to control any LCD display based on a HD44780 controller. Let’s create a little library to control a LCD display!
As we’ve seen in the previous tutorial, it’s pretty easy to display a single digit number on a seven segment display. If you want to display two digits though, you’ll quickly see it’s a bit more complicated. Today we’ll learn how to multiplex two 7-segment displays in order to display a 2-digit number.