Often when you are working on a project, you will find that parts of the code pretty much repeat over and over, and life would be so much easier, if you could just combine all that code into one neat little package. Normally this is not that … [Read more]
FreeRTOS Mutex Example
Mutexes can be one of the harder parts of FreeRTOS to learn. They are slower than semaphores, but don't seem to do anything special. I am sure you have probably looked up what the difference is and heard about things like Priority inversion and … [Read more]
FreeRTOS Task Notification Example
FreeRTOS has many conventional tools like semaphores and queues available to it, but it also has an extremely powerful unconventional tool as well, notifications. Notifications were designed as a low level way to synchronize tasks. because of … [Read more]
FreeRTOS Queue Example
One of the big problems of creating multitasking programs is keeping all of the tasks in sync which is why there are so many systems in place to help with that. Today, I am going to show you a simple FreeRTOS example about one of those systems … [Read more]
FreeRTOS Semaphore Example
Examples are one of the best tools for learning a new library, and FreeRTOS is no exception, so to help you along in your journey of learning FreeRTOS and in particular FreeRTOS Semaphores here is a quick example. It works by taking two lists of … [Read more]
A Simple ESP32 FreeRTOS Example
FreeRTOS is a really useful library, but learning how to use it is a bit hard, so I have created this simple example that uses FreeRTOS to blink three LEDs at different frequencies. The main focus of this example is how to use task functions and pass … [Read more]
How to Program an ESP RC transmitter and Receiver
Because so many projects require a remote control, many people build there own. So I did the same. For my project, I chose to use an ESP8266 as the Transmitter and an ESP32 as the receiver. Then I quickly wiped up some code to run it with, and … [Read more]
Micropython with an ESP32 Camera
Putting an ESP32 camera in your projects is just fun, but programming one is not always that fun. Normally you would program a microcontroller camera with c++ which is a very powerful and very complicated language, but if you are just creating a … [Read more]
Running a Neural Net on an Arduino UNO
For a long time, I have wanted to run a neural net on an Arduino UNO, but when you start looking for libraries, you will find that most of them only work on the more powerful Arduino boards, and not the UNO. Because of that and because I … [Read more]
How to Repurpose A 16*2 LCD For a Breadboard Computer
Building a computer form scratch is one of the coolest things you could ever do. Unfortunately doing it, requires a ton of parts that are rarely just siting around. At least that is what I thought for a long time, but that is actually not true. A … [Read more]
How to Improve Your ESP32 Web Pages
Lets say you have just created a web page for your ESP32 and it does not really look right to you, but your not sure how to make it look better. This may or may not happen to you, but it definitely has happened to me, so today I will explain some … [Read more]
Creating a ESP32 Web Server with Text Input
Being able to send text to your board from a web page is extremely useful. With it, you could create a chat server, simple command line, or any number of other cool projects, so today I will show you a simple way to create a web page with text … [Read more]
Learning JavaScript For the ESP32
To create a web page for your ESP32, you need to know HTML, CSS, and JavaScript, and while I can't help you much with HTML and CSS, JavaScript is a different story. JavaScript is very similar to C++ (the Arduino IDE language) and if you already … [Read more]
The Tools Needed to Write HTML for Microcontrollers
Have you ever wanted to create a web page for an esp32, and I don't mean just have you esp32 host a web page, I mean have you ever wanted to write your own web page from scratch. The fact that your here, probably means you do, and just like you … [Read more]
How to Make a Robot Arm Draw a Straight Line
If you have ever tried to make a robot arm, one problem you have probably ran into is being able to draw straight lines. It turns out that robot arms love to draw arcs, so today I will show you the system I used to move my robot arm in straight … [Read more]
How to Control a Robot Arm With Arduino
Building a robot arm is hard, but controlling one can often be even harder, especially if you want to use real distances, like telling the motor to move 5cm to the right and 10cm up. Today we will look at the math need to control a supper simpler … [Read more]
How to Control Multiple Stepper Motors
In my journey to make a simple robot arm, I came across another problem. How do you control both stepper motors at the same time. Today I will show you the code I used, so you can use it or modify it to make your own. The Hardware Before we … [Read more]
Using an Arduino to Accurately Position a Stepper Motor In Degrees
Recently, I have been trying to make a simple robot arm. One of the first problems I ran into when writing the code was positioning the motors where I wanted them in degrees, so I created the code on this page and today we will look at how it works … [Read more]
How to Connect an ESP32 to a Raspberry Pi with WIFI
For a long time I have wanted a way to be able to run code on a raspberry pi and a esp32, and have the two programs talk to each other. Recently, I found a way to do that using sockets. Sockets can be used for a lot of things, so to be more … [Read more]
How to Use Micropython LVGL Windows
Its easy to make a ridged GUI. Everything has a place that it always stays in, and while this type of program is easy to build. Its not the funnest to use, so its best to allow the user to be able to customize the interface a bit. Windows are one … [Read more]
Making an Arduino Distance Sensor More Accurate
When I think of Arduino and measuring distance the readily available and cheep ultrasonic sensors come to mind. Add while these senors are great for most projects there are a few project that need a little more accuracy. So I ran a few experiments … [Read more]
How to Use LVGL Image Buttons
If you need a button that has a lot of detail, it is usually best to create it with an image instead of drawing it from scratch. Doing it this way can simplify the process . Today we will see how you can create a image button with LVGL. The images … [Read more]
How to Use Micropython LVGL Spinboxes
Many GUIs need a way to input a number. Normally this is done with a Keypad and a Textarea but that takes a lot of screen space. Spinboxes can do the same job but they are much smaller. Lets look at how you can create a spinbox and use some … [Read more]
How to Use Micropython LVGL Themes
Applying individual styles to every object on your screen is a lot of work. Because of how annoying this process is LVGL has super styles aka themes. You apply a theme to your display, and it styles every object on your screen. Today we will … [Read more]
How to use Micropython LVGL Spinners
Every now and then you will create a program that takes a while to complete. When that happens, it is best if you give the user some indicator of what is happening like a progress bar. One of the most common, indicators is the spinner. Today, … [Read more]
Building a Timer App with Micropython LVGL
Like all things, to get good at making GUIs you need practice. Creating a timers is a good place to start. They are simple enough to build, but they still contain a few complex elements to get you thinking. Below is some code that creates a … [Read more]
How to Use Micropython LVGL Bars
Output Bars are one of those things we see all of the time. You can find them in scroll bars, progress bars, etc. They are all over the place, because bars allow you to show numbers in a more visual way. Today I will show you how to create and … [Read more]
How to Use Micropython LVGL LEDs
LVGL has several widgets intended to polish off your projects. LEDs are one of them. They are very simple to use because they do all of the color math and styling for you. Today, I will show you how to create a LED and also how to use LEDs to … [Read more]
How to Change Micropython LVGL Fonts
Being able to change fonts is extremely important. Unfortunately It takes a bit of work to get new fonts onto microcontrollers. Thankfully once they are there, LVGL makes it easy to use them. Today I will show you how to add some extra fonts to … [Read more]
How to use Micropython LVGL Dropdown Boxes
When creating a GUI, there is never enough room on the screen. You want to add this list here or that button there and there is no room left. Dropdown boxes are the age old trick to free up some space. Dropdown boxes free space by shrinking … [Read more]
How to Draw Arcs and Circles with Micropython LVGL
Being able to draw basic shapes is extremely important in building a GUI. This tutorial is part of a series on drawing primitive shapes. Today we will explore arcs. If you are not familiar with LVGL descriptors then I would suggest looking at the … [Read more]
How to use Micropython LVGL Button Matrixes
If you have ever had to create a program that uses lots of buttons, you know what a pain it can be to have to create, style, and position each one. That is why button matrixes were created. The button matrix groups all the buttons together. This … [Read more]
How to Draw a Polygon with Micropython LVGL
Sometimes you need to be able to draw things that don't use LVGL's objects, buttons, sliders, etc. It is possible to do this, if you directly manipulate LVGL draw engine. This post is intended to explain some of the more complex features of LVGL's … [Read more]
How to Use Micropython LVGL Masks
Once you have created a project the normal way with buttons, sliders, and such, you sometimes would like to do a little more. Maybe you want to fade out a portion of your screen or darken parts of it. For that reason LVGL has masks. Masks allow … [Read more]
How to Draw a Rectangle with Micropython LVGL
No matter how long you have been using LVGL, you have probably wonder at some point how to draw shapes like rectangles or circles on a screen. While creating things like buttons and lists is easy, drawing basic shapes is a bit more complicated … [Read more]
How To Use Micropython LVGL Tables
If you want to organize a lot of text on your screen, then usually you need lots of processing power, but there is another way. LVGL has a widget called the table. The table organizes text into rows and columns. It generates and styles the text on … [Read more]
Micropython LVGL Calendar Example
Calendars are how we tell time, which is why they are needed so often. If you have ever tried to create a calendar, you will know that it's hard. You need lots of math and weird algorithms to pull it off. Thankfully LVGL has a widget that does all … [Read more]
How To Get A Microphone To Work With Micropython LVGL
Microphones add lots of important features to your project, but unfortunately, they can be a pain to get working. Today I would like to show you how to get an audio recording from a PDM microphone (there will be more on PDM later) and display it … [Read more]
How To Style Parts Of Text In Micropython LVGL
The LVGL library has a lot of powerful features for styling text. You can set the color, underline the text, set the opacity, etc., but if you want to style a small part of some text instead of the entire thing, that gets a little more complicated. … [Read more]
Micropython LVGL Buttons, Switches, and Checkboxes
Having good inputs for you projects is extremely important. Today I am going to show you three of the simplest yet most important inputs that the LVGL graphics library has to offer. The first example will explain how to create buttons and tell … [Read more]
Micropython LVGL Arc Example
It always seems difficult to make a GUI interesting. Thankfully, the LVGL library has some useful objects to help our projects. One of those objects is the arc. They are like sliders, but are curved and have a few more settings. Today, I am going … [Read more]
Micropython LVGL Roller Example
Trying to get a lot of information on a small screen is hard. Fortunately, LVGL has a widget called the roller. It allows you to let the user choose between a large amount of options, but at the same time, the roller only takes a small amount of your … [Read more]
How To Use A PNG Image With Micropython LVGL
Images are extremely important when building a GUI, but LVGL does not have a very simple way to add images to your project. I have been searching for awhile for a good way to add them to my projects, and today, I am going to show you the best way I … [Read more]
Micropython LVGL Style Example
If you have ever worked with LVGL, you've probably wondered how to change the color of text or the background color of the screen. The way you do that in micropython lvgl is with styles. When you are finished with this code tutorial today, you … [Read more]
Micropython LVGL Tileview Example
Today, I am going to show you how to create a program that will have multiple pages, and when you swipe the screen, it will change the visible page. Normally, it would take tons of code to pull this off, but with lvgl its a breeze. To get this … [Read more]
Micropython LVGL Msgbox Example
The micropython lvgl library can be hard to find any good information on, so today I am going to give you some code and explain it. When you finish, you will have a program that creates 3 different message boxes and by pressing different buttons you … [Read more]
Micropython LVGL List Example
As you probably already know, LVGL is a graphics library. What I'd like to show you today is how to create a list of items, and assign those items to a print command that you can see in the terminal window. This can be really helpful if you are … [Read more]
Micropython LVGL Layout Examples
What layouts are there? Lvgl currently supports two layouts: FLEX and GRID. The flex layout is simple, but not very controllable. The grid layout is more complicated, but gives you more control. This page has examples for both of them. How … [Read more]
Micropython LVGL Textarea Examples
What Are Textareas? Textareas are intended for places where you need to display text that changes often. They are usually used with keyboards or some input device. This post has examples on creating textareas, styling cursors, and creating … [Read more]
How To Get A LVGL Micropython Screen To Work
The ILI9341 Display This is some simple code to get a ili9341 display to work with micropython lvgl. You will want to add it, or your own screen code, to the beginning of most of the lvgl examples on this site. Instead of putting it at the … [Read more]