Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • DIY Microcontroller Projects for Hobbyists
  • Toc
  • feedback
DIY Microcontroller Projects for Hobbyists

DIY Microcontroller Projects for Hobbyists

By : Garcia-Ruiz, Pedro Cesar Santana Mancilla
4.5 (17)
close
DIY Microcontroller Projects for Hobbyists

DIY Microcontroller Projects for Hobbyists

4.5 (17)
By: Garcia-Ruiz, Pedro Cesar Santana Mancilla

Overview of this book

We live in a world surrounded by electronic devices, and microcontrollers are the brains of these devices. Microcontroller programming is an essential skill in the era of the Internet of Things (IoT), and this book helps you to get up to speed with it by working through projects for designing and developing embedded apps with microcontroller boards. DIY Microcontroller Projects for Hobbyists are filled with microcontroller programming C and C++ language constructs. You'll discover how to use the Blue Pill (containing a type of STM32 microcontroller) and Curiosity Nano (containing a type of PIC microcontroller) boards for executing your projects as PIC is a beginner-level board and STM-32 is an ARM Cortex-based board. Later, you'll explore the fundamentals of digital electronics and microcontroller board programming. The book uses examples such as measuring humidity and temperature in an environment to help you gain hands-on project experience. You'll build on your knowledge as you create IoT projects by applying more complex sensors. Finally, you'll find out how to plan for a microcontroller-based project and troubleshoot it. By the end of this book, you'll have developed a firm foundation in electronics and practical PIC and STM32 microcontroller programming and interfacing, adding valuable skills to your professional portfolio.
Table of Contents (16 chapters)
close

What this book covers

This book covers technical topics on the programming of the Blue Pill and Curiosity Nano microcontroller boards using C++, including descriptions of commonly used sensors and how they are electronically connected to the microcontroller boards. The book consists of 14 chapters, as follows:

Chapter 1, Introduction to Microcontrollers and Microcontroller Boards, introduces the reader to microcontroller technology and explains how to install the integrated development environments (IDEs) necessary for programming the Blue Pill and Curiosity Nano microcontroller boards that are used in the book.

Chapter 2, Software Setup and C Programming for Microcontroller Boards, provides an overview of C and an introduction to Blue Pill and Curiosity Nano microcontroller board programming, which are used for coding examples in most of the book chapters.

Chapter 3, Turning an LED On or Off Using a Push Button, explains how to use push buttons with microcontroller boards to start a process, such as turning an LED on or off, and how electrical noise from a push button can be minimized.

Chapter 4, Measuring the Amount of Light with a Photoresistor, focuses on how to connect a photoresistor to the Blue Pill and Curiosity Nano microcontroller boards to measure the amount of light within an environment. The result is shown on red, green, and blue LEDs also connected to those boards.

Chapter 5, Humidity and Temperature Measurement, describes how to connect a practical DHT11 sensor to measure the humidity and temperature of an environment, how to display its values on a computer, and also how to use the easy-to-use LM35 temperature sensor, showing its values on two LEDs.

Chapter 6, Morse Code SOS Visual Alarm with a Bright LED, shows how to code the Blue Pill and Curiosity Nano microcontroller boards to display a Morse code SOS signal using a high-intensity LED, increasing its visibility. This chapter also explains how to use a transistor as a switch to increase the LED's brightness.

Chapter 7, Creating a Clap Switch, describes to the reader how to make an electronic wireless control using sounds (claps). When two claps are detected by a microphone connected to a microcontroller board, a signal will be transmitted to activate a device connected to it and an LED will light up.

Chapter 8, Gas Sensor, introduces the reader to the use of a sensor connected to a microcontroller board that reacts with the presence of a specific gas in an environment.

Chapter 9, IoT Temperature-Logging System, shows the reader how to build an Internet of Things (IoT) temperature logger using the Blue Pill microcontroller board and a temperature sensor. Its data will be transmitted via Wi-Fi using an ESP8266 module.

Chapter 10, IoT Plant Pot Moisture Sensor, explains how to build a digital device with a microcontroller board and a moisture sensor to monitor a plant pot's soil and determine if it needs water, sending an alert wirelessly to notify the user if it's too dry.

Chapter 11, IoT Solar Energy (Voltage) Measurement, continues applying IoT software running on a microcontroller board using the ESP8266 WiFi module to measure voltage obtained from a solar panel through a sensor. The application will send sensor data to the internet using the ESP8266 WiFi signal.

Chapter 12, COVID-19 Digital Body Temperature Measurement (Thermometer), looks at an interesting project to develop a contactless thermometer using an infrared temperature sensor. Its measured temperature data is sent through the I2C protocol to a Blue Pill microcontroller board, displaying it on an I2C LCD.

Chapter 13, COVID-19 Social Distancing Alert, explains how to program a microcontroller board that measures a distance of two meters between two or more people. Within the new normal of COVID-19, we need to maintain social distance due to the higher risk of catching the virus if you are close to someone who is infected. The World Health Organization recommends keeping a distance of at least two meters; this rule varies depending on the country, but it is generally accepted that a distance of two meters is safe.

Chapter 14, COVID-19 20-Second Hand Washing Timer, contains a practical project to make a timer running on a Blue Pill microcontroller board that ensures that people wash their hands for twenty seconds, as per World Health Organization recommendations, to prevent COVID-19 infection. This project shows the time count on a liquid-crystal display (LCD). An ultrasonic sensor detects if the user is waving at it to initiate the count.

Unlock full access

Continue reading for free

A Packt free trial gives you instant online access to our library of over 7000 practical eBooks and videos, constantly updated with the latest in tech
bookmark search playlist download font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete