Thumbnail image

BLUETOOTH IN MICROPYTHON ON THE ESP32-C3 SUPER MINI

In my previous post, I discussed getting MicroPython installed on the ESP32 and provided some sample code to make the on-board LED blink. In this post, we’ll be diving into something much more advanced: using with the Bluetooth hardware on the ESP32-C3.

Since this is a post about Python, I’ll assume that you are familiar with Python and already have MicroPython running on your ESP32. I will assume that you are familiar with asynchronous programming in Python, as we will be working with highly asynchronous code written using the async/await syntax.

Thumbnail image

RUNNING MICROPYTHON ON THE ESP32-C3 SUPER MINI

I had my first experiences programming a microcontroller when I completed the course work for my high school computer engineering class a few weeks early. Instead of allowing me to sit idle, my teacher handed me a PicKit 1 flash starter kit to play with. That development kit contained a PIC12F675 with a mere 64 bytes of RAM, one working register, and had to be programmed in assembly as the C compiler was not included in the kit. Learning assembly and getting an LED to blink under program control was a fantastic first experience, but microcontroller platforms have taken great strides since the days of being exclusively programmed in C or assembly.

BUILDING A LOW COST OPNSENSE FIREWALL/ROUTER THAT RIVALS COMMERCIAL UNITS AT A FRACTION OF THE PRICE

Are you getting what you pay for from your ISP? Many people with advertised connection speeds exceeding 1Gbps are getting less than what they pay for and don’t even realize it.

ISP-provided consumer network hardware is often limited in both features and performance. It is fairly common for these devices to be unable to achieve their full advertised speeds except under narrow and sometimes unreasonable circumstances.

In my case, the particular device my ISP provided was only equipped with gigabit LAN ports and could not achieve the full 1.5Gbps offered by my internet service provider over a single port. This means that despite paying for a 1.5Gbps connection, the maximum speed I could effectively hope for over a single wired connection was 1Gbps! One way to address this problem would be to use link aggregation to combine two or more network interfaces for increased bandwidth. However, the ISP-provided device unsurprisingly did not seem to have this feature. The manufacturer of my particular device or my ISP might argue that it is able to achieve those speeds over WiFi to support their advertised speeds, but this is unrealistic in an urban environment where there are many neighboring access points causing wireless interference.

GIMOTHY, A GIT IDENTITY MANAGER

See the source code on GitHub

Gimothy is an easy to use tool that helps you manage multiple git identities. At a mere ~100 lines of code, it’s easy to audit, too!

The Problem

As a software contractor, I frequently had to juggle multiple git accounts, usernames, and ssh keys. This quickly became a huge annoyance, so I chose to automate it. Of course, I was far from the first to encounter this problem and found many existing solutions, but none of those existing solutions seemed to meet all of my needs.

WRITING A SIMPLE TELNET HONEYPOT IN PYTHON

Introduction

A honeypot is a device that poses as a vulnerable system, making it an irresistible target for an attacker. But in reality, the honeypot is a trap that can be used to detect an attacker. This makes honeypots an extremely valuable tool for detecting when your network has been compromised since attackers will often try to pivot from one machine to another within a network.

Honeypots also have uses in malware research and threat intelligence because they can be used to capture malicious software or gather information about attackers while posing as a vulnerable system.

PROJECT BOXY

See the source code on GitHub

An OpenSCAD script that can parametrically generate custom 3D-printable enclosures for electronics projects

An example of the lid and enclosure generated by project boxy.

Creating a new custom enclosure for a project with this script is often as easy as changing a few variables in the script and rendering the model. This is often far faster and easier than designing an enclosure by hand in a CAD application.

MANCHESTER CODE VISUALIZER

This web application creates a visual representation of the Manchester coded form of the input data.

An example of the lid and enclosure generated by project boxy.

Manchester code is used in a large number of data transmission and storage applications. It is very popular as it is relatively simple implement and has a property that makes it possible to recover the clock signal from the transmitted signal. This “self clocking” property improves robustness and reduces or eliminates the need for expensive timing components in the system.

QB ON A STRETCHER

See the source code on GitHub

QB on a stretcher (QBONAS) is a CGI web framework written in QB64, which is a language intended to be compatible with Microsoft QuickBasic.

A browser displaying unit tests run inside of QBONAS

A full description of this project is available on its GitHub page.

ANIMATRONICS CONTROLLER

An easy to use animatronics controller that can be programmed in the field by the end user without the use of a computer and control up to two servos.

circuit schematic

I had a need for some means of controlling a servo or two for an animatronics project, so I decided to design a general purpose animatronics controller that could also be used for future projects. After some consideration, I came up with a short list of requirements for the project:

GRAPHICAL GUESTBOOK

See the source code on GitHub

Screenshot of the guestbook in action showing several test drawings.

A guestbook inspired by the guestbooks commonly found on websites of the 90s and early 2000s, but it allows visitors of a website to leave a drawing instead of a text message.

Overview

This project was created over a weekend as a hobby project. It is a lightweight MVC style web application based on Web.py that uses a Sqlite database. The data models for the application do not use an ORM and instead use custom classes for database abstraction. It was initially written in Python 2.7 and then ported to Python 3x.