Fast string to integer conversion (C/C++)

This article presents a few fast and lightweight implementations of conversion from ASCII string to integer. It can be an interesting fit to use in a small microcontrollers like for example ATtiny13, which resources are very limited. All presented functions are simplified and require a null-terminated array of chars as an argument. Convert string to … Read more

Fast string comparison for microcontrollers (C/C++)

This short article presents trivial but fast and memory efficient function to compare two strings. Function returns “0” (zero) on success (strings are the same), otherwise function returns the position where different characters occurred. Example code #include <stdint.h> #include <assert.h> static int8_t xstrcmp(const char *s1, const char *s2) { while(*s1 != ‘\0’ && *s1 == … Read more

ESP32 – dockerized toolchain

Docker image built on top of espressif/idf with xtensa toolchain, ESP_IDF, and few additional tools: xtensa toolchain (2019; crosstool-NG esp-2019r2; 8.2.0) esptool.py (v2.9-dev) make (v4.1) cmake (v3.10.2) DockerHub: https://hub.docker.com/r/lpodkalicki/esp32-toolchain Installing Bellow you can find recommended simple one-line installer that pulls the newest docker-image and installs esp32-toolchainscript into “/usr/bin/” directory. curl https://raw.githubusercontent.com/lpodkalicki/esp32-toolchain-docker/master/install.sh | bash -s — Getting started Install toolchain … Read more

ESP32 – WiFi sniffer

This experimental project shows how to build a simple and inexpensive WiFi packet analyzer (also known as a WiFi sniffer). The heart of this project is WiFi module of ESP32 which is able to work in a promiscusous mode. It means that this clever chip allows IEEE802.11 network packets capturing for further analyzing. Because WiFi … Read more

ESP32 – blinky with delay function

This blinky project shows how to interface LED to the ESP32 and write a simple program to make the LED blink. The full code is on Github, click here. Parts List ESP-WROOM-32 module USB<->TTL converter (3.3.V) Efficient power supply (3.3V) R1 – resistor 560Ω, see LED Resistor Calculator LED1 – basic LED Circuit Diagram Firmware … Read more

ESP32 – flashing the chip

Once the ESP32 Toolchain is built, we’re ready to compile and flash the example program. This short tutorial shows how to compile and burn the code into ESP32. Compilation Before compilation part we’re able to change menu options, i.e. we can configure the serial port to be used for uploading, etc. For the test, let’s … Read more

ESP32 – building the toolchain for Linux (Ubuntu)

This quick tutorial shows how to build a complete development environment for the ESP32 processors on Linux (Ubuntu).  These instructions have been tested successfully on Ubuntu 16.04  (32 and 64 bit). Update: 18-05-2017. Building Toolchain with Bash One-Liner I recommend to use this handy bash one-liner command to build ESP32 Tolchain. To override ESP32 Toolchain … Read more

ESP32 – quick overview

The ESP32 is a low cost, low power microcontroller with integrated 2.4 GHz Wi-Fi (up to 150Mbps) and dual-mode Bluetooth (classic and BLE), which employs a dual-core Tensilica Xtensa LX6 microprocessor. ESP32 is created and developed by Espressif Systems, a Shanghai-based Chinese company, and is manufactured by TSMC using their 40 nm process. It is … Read more