CodeShorty: Serial Interrupt

Is it possible to capture inputs on the serial port via interrupt? The answer is probably more yes-and-no, it is possible to use the Serial Event function. This is executed after every loop, but does not interrupt it. Purpose User input via terminal Communication with other devices via the serial port Necessary libraries None Program There is in the Arduino GUI…

Continue reading "CodeShorty: Serieller Interrupt"
Bild einer kleinen Maus

ESP32-S2 playing with the mouse

A friend was recently complaining to me. He's now working from home and is worried that his employer is tracking his computer data. Since the computer goes into standby mode after a few minutes, he came up with the idea of constantly moving the mouse to prevent this. His wireless mouse even reaches the toilet, he said…

Continue reading "ESP32-S2 das Spiel mit der Mouse"

Preprocessor directives

Defining constants: Preprocessor constants are created using the #define command. These can simply exist as a name, as shown below: or they can be assigned a value. The pre-processor then inserts the corresponding value at every point where the constant ‘name’ is used. Expressions are also possible: Whether a …

Continue reading "Präprozessor-Direktiven"

Sunflower

Like a sunflower, this project stretches its bloom (solar panel) towards the sun. A laser-cut wooden frame with a bit of technology and you have a project that will excite not just children. The model can be found on the „quick“ Ali-Express under the term "Arduino Intelligent Solar Tracking" for around €25-50. After a quick search on the internet, I found...

Continue reading "Sunflower"

TTGO LORA32 OLED V1

I bought these LoRa boards some time ago as a double pack and forgot about them in a drawer. With more and more reports about LoRa (Long Range Radio) appearing, I wanted to try it out as well. I have documented my attempts here. There is now a version 2 of the board. Version 2 also has…

Continue reading "TTGO LORA32 OLED V1"

Espressif IDF – Tasks

A task is a (recurring) job for the processor. Multiple tasks compete for the CPU's attention. How these are created and which data structures are available for data transfer and synchronisation will be briefly outlined in this post. Tasks can become a very complex matter, which is why I can only scratch the surface here. Nevertheless…

Continue reading "Espressif IDF – Tasks"

Espressif IDF – Menuconfig

One of the nice achievements of the IDF is the menu-driven configuration. What I find even nicer is that custom configuration points can be created. These are then automatically integrated into the main menu. First off: the library „esp_system.h“ is needed in the source code, otherwise it won't work. After changes to the menu, run an idf.py clean. To create such a configuration point, take...

Continue reading "Espressif IDF – Menuconfig"

Espressif IDF – Log Messages

When developing on the microcontroller, it's often important to have the occasional output to gauge whether the developed code is doing the right thing. It's a shame when such outputs still burden the finished product. So that the debugging code makes it into the final product, or only to a limited extent, there are in nearly…

Continue reading "Espressif IDF – Lognachrichten"

Espressif IDF – Error Handling

Error handling in the IDF is one of the core functionalities. You'll encounter it in practically every example program, which is why I'd like to go into more detail here. All important IDF functions return error codes. These can either be handled manually (if condition + own handling) or they can be passed to a special macro (function) for...

Continue reading "Espressif IDF – Fehlerbehandlung"

Espressif IDF – Create Project

Here I describe how to create a new IDF project. How to use and install the IDF, also in conjunction with VS Code, has already been described by me at the following links and is not the subject of this post. Installing Espressif IDF for ESP32-S2 VS Code Espressif IDF LILYGO EP32 S2 V1.1 (1st Application) A good start is the IDF example…

Continue reading "Espressif IDF – Projekt erstellen"