Home Page Icon
Home Page
Table of Contents for
DIY Microcontroller Projects for Hobbyists
Close
DIY Microcontroller Projects for Hobbyists
by
DIY Microcontroller Projects for Hobbyists
DIY Microcontroller Projects for Hobbyists
Contributors
About the authors
About the reviewers
Preface
Who this book is for
What this book covers
To get the most out of this book
Download the example code files
Code in Action
Download the color images
Conventions used
Get in touch
Share Your Thoughts
Chapter 1: Introduction to Microcontrollers and Microcontroller Boards
Technical requirements
Introduction to microcontrollers
Microcontroller boards
An overview of analog and digital electronics necessary for carrying out the book's projects
Basic electronic components
The diode
The solderless breadboard
Description of the Blue Pill and Curiosity Nano microcontroller boards
Installing the IDEs
Your first project – a blinking LED
Running the blinking LED example with the Blue Pill board
Running the blinking LED example on the Curiosity Nano board
Summary
Further reading
Chapter 2: Software Setup and C Programming for Microcontroller Boards
Technical requirements
Introducing the C programming language
The basic structure of the C language
Introducing Curiosity Nano microcontroller board programming
Introducing Blue Pill microcontroller board programming
Example – Programming and using the microcontroller board's internal LED
Programming the Blue Pill's internal LED
Summary
Further reading
Chapter 3: Turning an LED On or Off Using a Push Button
Technical requirements
Introducing push buttons
Understanding electrical noise from push buttons
Debouncing a push button via hardware
Debouncing a push button via software
Connecting an LED to a microcontroller board port and using an internal pull-up resistor
Debouncing a push button via software connected to the Blue Pill
Turning an LED on or off with a push button on the Curiosity Nano
Testing out the push button
Summary
Further reading
Chapter 4: Measuring the Amount of Light with a Photoresistor
Technical requirements
Understanding sensors
Defining sensors
What are sensor modules?
Introducing photoresistors
Connecting a photoresistor to a microcontroller board port
Connecting a photoresistor to a Blue Pill board
Coding the photoresistor values and setting up ports
Connecting a photoresistor to a Curiosity Nano board
Connecting a photoresistor sensor module to the microcontroller boards
Testing out the photoresistor
Summary
Further reading
Chapter 5: Humidity and Temperature Measurement
Technical requirements
Introducing the DHT11 humidity and temperature sensor module
What is relative humidity?
The DHT11 pins and their values
Connecting a DHT11 sensor module to the microcontroller boards
Connecting the DHT11 to the Blue Pill board
Connecting an LCD to the Blue Pill
Connecting an LM35 temperature sensor to the Curiosity Nano board
Coding to get data from the sensor module
Programming the DHT11 sensor for the Blue Pill board
Coding the sensor module and the 1602 LCD
Programming the LM35 sensor on the Curiosity Nano board
Showing the humidity and temperature data results on the serial port monitor
Plotting the data
Summary
Further reading
Chapter 6: Morse Code SOS Visual Alarm with a Bright LED
Technical requirements
Understanding Morse code and the SOS message
Introducing super-bright LEDs and calculating their necessary resistors
Connecting the resistor and the super-bright LED to the microcontroller board
Connecting the super-bright LED to the Curiosity Nano
Coding the SOS Morse code signal
The SOS message code for the Curiosity Nano
Testing the visual alarm
Summary
Further reading
Chapter 7: Creating a Clap Switch
Technical requirements
Connecting a microphone to a microcontroller board port
Understanding the electret microphone module
Connecting the components
Coding your clap switch sketch
Coding a clap switch with two clapping sounds
Coding a clap switch with a timer between claps
Improving the project performance
Summary
Further reading
Chapter 8: Gas Sensor
Technical requirements
Introducing the MQ-2 gas sensor
Connecting a gas sensor to the STM32 microcontroller board
Interfacing for digital reading
Interfacing for analog reading
Writing a program to read the gas concentration over the sensor board
Coding for digital reading
Coding for analog reading
Testing the system
Summary
Further reading
Chapter 9: IoT Temperature-Logging System
Technical requirements
Connecting a temperature sensor to the Blue Pill board
Introducing the DS18B20 temperature sensor module
Connecting the components
Coding a temperature reading system
Learning to connect the ESP8266 module
An introduction to the ESP8266 Wi-Fi module
Connecting an ESP8266 Wi-Fi module
Coding a program to send the sensed temperature to the internet
Connecting the STM32 Blue Pill board to the internet
Summary
Further reading
Chapter 10: IoT Plant Pot Moisture Sensor
Technical requirements
Connecting a soil moisture sensor to the Blue Pill board
Introducing soil moisture sensors
Connecting the components
Reading data from the soil moisture sensor module
Coding a program to send the sensed data to the internet
Showing sensor data results over the internet
Summary
Further reading
Chapter 11: IoT Solar Energy (Voltage) Measurement
Technical requirements
Connecting a solar panel to the Blue Pill board
Introducing the solar panel
The B25 voltage sensor
Connecting the components
Reading data from a voltage sensor module
Coding a program to send the sensed data to the internet
Showing sensor data results over the internet
Summary
Further reading
Chapter 12: COVID-19 Digital Body Temperature Measurement (Thermometer)
Technical requirements
Programming the I2C interface
The I2C protocol
I2C coding
Coding the Arduino Uno software (peripheral)
Coding the Blue Pill software (controller)
Connecting an IR temperature sensor to the microcontroller board
The MLX90614 IR sensor
The GY-906 sensor module
Connection of the IR sensor to an Arduino Uno
Connecting the Blue Pill to the Arduino Uno
Showing the temperature on an LCD
Testing the thermometer
Summary
Further reading
Chapter 13: COVID-19 Social-Distancing Alert
Technical requirements
Programming a piezoelectric buzzer
Connecting the components
Connecting an ultrasonic sensor to the microcontroller board
Connecting the components
Writing a program for getting data from the ultrasonic sensor
Testing the distance meter
Summary
Further reading
Chapter 14: COVID-19 20-Second Hand Washing Timer
Technical requirements
Programming the counter (timer)
Showing the timer on an LCD
Connecting an ultrasonic sensor to the microcontroller board
What is an ultrasonic sensor?
How does an ultrasonic sensor work?
Putting everything together – think of a protective case for the project!
Testing the timer
Summary
Further reading
Why subscribe?
Other Books You May Enjoy
Packt is searching for authors like you
Share Your Thoughts
Search in book...
Toggle Font Controls
Playlists
Add To
Create new playlist
Name your new playlist
Playlist description (optional)
Cancel
Create playlist
Sign In
Email address
Password
Forgot Password?
Create account
Login
or
Continue with Facebook
Continue with Google
Sign Up
Full Name
Email address
Confirm Email Address
Password
Login
Create account
or
Continue with Facebook
Continue with Google
Next
Next Chapter
DIY Microcontroller Projects for Hobbyists
Add Highlight
No Comment
..................Content has been hidden....................
You can't read the all page of ebook, please click
here
login for view all page.
Day Mode
Cloud Mode
Night Mode
Reset