Category: Programming

  • How to generate PPM signal with ESP32 and Arduino

    How to generate PPM signal with ESP32 and Arduino

    The PPM protocol for encoding Remote Control channel values is now a legacy. Still, it is widely accepted by different hardware and when tinkering with Arduino, remote control, and working on own accessories for flight controllers, PPM is still a valid option. A few years ago I presented a code that allows generating PPM stream…

  • ESP32, Arduino and Timer/Alerts

    Because of completely different architecture, ISR and Timer solutions known from other Arduino compatible platforms, especially AVR/ATmega does not work on ESP32. They don’t. At all. If you would like to port any code that uses timers from AVR Arduino to ESP32 Arduino, you would have to rewrite them completely. However, timers and alarms with…

  • ESP32 and multiple I2C buses

    One of the advantages of the ESP32 microcontrollers over the competitions is dual-core architecture and two I2C buses. Yes, the I2C bus allows connecting multiple slave devices to single pair of SCL SDA wires. As long as slave device addresses are unique, everything will work just fine: OLED display, LM75 temperature sensor, MPU6050 gyroscope. However,…

  • How to connect GPS to ESP32

    How to connect GPS to ESP32

    Thanks to a very versatile Input/Output matrix, it is quite simple to connect NMEA GPS modules to ESP32 MCUs. Not only ESP32 boards have 3 serial ports you can choose from, they can be assigned to almost any pin you want. In this example we will connect a popular Ublox NEO-M8N like Beitian BN-880 or…

  • ESP32, Arduino and 3 hardware serial ports

    When working with ESP32 WiFi/Bluetooth MCU under Arduino SDK for ESP32, you will notice that Serial work just fine. But Serial1 and Serial2 do not. ESP32 has 3 hardware serial ports that can be mapped to almost any pin. But, Serial1 and Serial2 will not work. In case of ESP32 this just has to be…

  • Generate S.Bus with Arduino in a simple way

    Generate S.Bus with Arduino in a simple way

    Did you noticed that lately I write about radios quite often? Well, I do and it’s not a coincidence. Proper introduction for what I’m working on will happen in a next few days, but now I will only write that this will be a mid-range, cheap, DIY radio link for UAVs. By mid-range I mean…

  • JavaScript PID controller

    JavaScript PID controller

    I suppose this is the first time programing topic came up on this blog. Probably not the last time, since this is what I do most of the time. While working on serial port usage balancing for INAV Configurator I’ve quite accidentally created a PID controller in JavaScript. Maybe it’s not the most advanced PID…