## Lorenz Attractors

Numerical solution of the Lorenz system, a set of ordinary differential equations known for their chaotic behavior. Simulation of the chaotic solutions, also referred to as the Lorenz Attractror, using the Runge-Kutta method.

## Lloyd's Algorithm: Voronoi diagrams relaxation

Implementation of Lloyd’s Algorithm in JavaScript. Also referred to as Voronoi relaxation, it is often used to evenly distribute partitions of space. It also offers nice graphical effects

## ATtiny 1-series TWI library

Simple and lighweight library for using the ATtiny 1-series TWI (I2C) peripheral.

## Computing the convex hull of a set of points

Implementation of Gift wrapping and Graham scan algorithms in JavaScript for constructing the convex hull of a set of points.

## Voronoi diagrams with Fortune's algorithm

Voronoi diagrams are fascinating geometric object with numerous applications. However, the process for their generation may be slow and complex. Fortunately, there are elegant solutions to efficiently construct these diagrams. Here is my JavaScript implementation of the Fortune’s Algorithm.

## RunTinyRun: the smallest solar-powered game console

A solar-powered videogame console with the size of a keychain running the smallest videogame.

## Charging supercapacitors with small solar cells

Harvesting solar energy for low power applications using small photovoltaic cells and supercapacitors as a buffer.

## Programming the ATtiny 1-series

Getting started with the AVR ATtiny 1-series microcontrollers in an easy and inexpensive way. Compilation and firmware upload with PlatformIO and a USB to serial adapter.

## Tiny videogame for the ATtiny10

What can you fit into an ATtiny10 1kB flash memory? Certainly a lot, and it appears it’s enough for a videogame too! This is a game of 700 bytes that works with just three components: the ATtiny10, an OLED display and a button.

## AVR Optimization #2: Mixing C and and Assembly

Modern compilers are really good at translating programming language into machine code. At times, however, you may find useful to freely manipulate registers and CPU operations. GCC gives you the option to mix C and Assembly code but it’s helpful to follow certain guidelines.

## AVR Optimization #1 - Avoid floating-point and other considerations

Microcontrollers with 8-bit architectures have hard times dealing with floating-point maths. To do that, they need large functions that are really slow and occupy a lot of space. Here there are some examples on how to avoid it and other performance considerations.

## ATtiny85 push-button power switching: software-only solution

How do you power ON and OFF a microcontroller without a switch and complex electronics? The simplest solution is to use a low power sleep mode and a few lines of code.

## OLED Display driven by ATtiny10

I tried to fit the code to drive an OLED display into an ATtiny10. Is it possible? Yes! But how much space is left to actually make something useful?

## ATtiny10 Programming with Platformio and Terminal

The ATtiny10 is an intriguing little device with plenty of capabilities. It’s size pushes your creativity but first, it needs to be programmed. This can get a little tricky but here I suggest two easy ways to get started.

## USBASP firmware update

The USBASP is a popular and inexpensive programmer for AVR controllers. These are frequently sold with an outdated firmware. Find out below how to easily update it to support TPI and get rid of warning messages.

## Bit Bang I2C protocol

The I2C is a widely used serial bus to exchange data between two or more devices. There are many products equipped with such an interface and also several libraries to easily employ this protocol. However, the most common libraries are built to be robust and versatile. This may present limitations for some niche applications. Therefore, you may find necessary to write specific code for your project. Turns out that implementing this protocol is relatively simple and yields substantial benefits.

Recent Posts