
Smart Plant
JGAguado/Smart_Plant
The Smart Plant is a board that can be plugged directly on the soil, close to the plant, that allows the measurement of the environment (soil moisture, environment temperature & illuminance), and presents the…

A real‑time FLIP fluid simulation for a 2‑inch round LED pocket watch.
FluidSim2d is an open-source printed circuit board by laizie, from the laizie/FluidSim2d repository on GitHub, published under the MIT licence. It is a 2-layer board with 14 parts on 25 nets, routed with 93 tracks and 19 vias.
It is built around the TP4056. Its parts include 5 capacitors and 5 connectors. It belongs with the wearables boards of this library.
A real‑time FLIP fluid simulation for a 2‑inch round LED pocket watch. Water that sloshes, pools, and beads up as you tilt it, running on a microcontroller you can fit under a coin.
The solver started in the browser, where the physics is easy to watch and tune, then moved to a Waveshare RA4M1‑Zero Mini driving a round display on a custom PCB.
src/sim.js) and
hand‑translated to C++ (src/main.cpp) for the hardware.No build step. learn/led-matrix-10.html loads the solver from src/sim.js and the harness
from src/engine.js.
learn/led-matrix-10.html in a browser and pull the rotate slider
around. That's the watch being tilted, and the fluid follows.npx live-server from the repo root (so the
src/ scripts resolve), then open /learn/led-matrix-10.html.Speed, rotate, and grid are all live. Grid runs from 10×10 up to 24×24, and the LED layout, the serpentine data chain, and the particle count all rebuild to match, so you can see what the sim looks like at the resolution the real panel will run.
It's a FLIP (Fluid‑Implicit‑Particle) solver:
This runs twice per frame (two substeps) at 60 Hz. The constants at the top of
src/sim.js are the knobs that decide how the water feels: the FLIP/PIC
blend, bounciness off the wall, and how stiff the pressure solve is.
While learning this, I had Claude help write up an explanation of FLIP fluids pitched at
exactly what I needed to understand: learn/physics-and-code.html.
learn/porting-guide.html walks through the current solver
function by function, how to port each part to C++ for the RA4M1, and how and why it
changed from the first version.
float
(0.5f, not 0.5) because the FPU doesn't do double.gravityDir directly)pcb/)All parts run at 3.3 V, so power them from the RA4M1‑Zero's 3V3 pin (not 5 V) and tie
all grounds together. The board's logic level defaults to 3.3 V (set by a jumper resistor);
leave it there. Pins below match the #defines and begin() calls in
src/main.cpp.
GC9A01A round TFT → RA4M1‑Zero (hardware SPI)
| Display pin | Signal | RA4M1‑Zero |
|---|---|---|
| SCL | SPI clock (SCK) | D13 |
| SDA | SPI data (MOSI) | D11 |
| CS | Chip select | D10 |
| DC | Data/command | D5 |
| RES | Reset | D4 |
| BLK | Backlight | 3V3 |
| VIN | Power | 3V3 |
| GND | Ground | GND |
MPU6050 accelerometer → RA4M1‑Zero (I²C)
| MPU6050 pin | Signal | RA4M1‑Zero |
|---|---|---|
| SDA | I²C data | A4 |
| SCL | I²C clock | A5 |
| VCC | Power | 3V3 |
| GND | Ground | GND |
SPI (D13/D11) and I²C (A4/A5) are fixed hardware pins on the RA4M1, so SPI.begin() and
Wire.begin() take no pin arguments. This leaves D6 (the onboard WS2812 RGB LED) free.
The RA4M1‑Zero's pins match the Arduino UNO R4 Minima's, so that board in the Arduino
"UNO R4" (Renesas) core works for uploading. Most MPU6050 breakouts
have onboard I²C pull‑ups, so no extra resistors are needed; leave AD0 unconnected
for the default address 0x68.
Complete:
src/main.cpptest/ for the display and screen test sketches)In Progress:
pcb/)Idea credit fully given to mitxela. First given the idea from his video here.
The physics comes from the standard PIC/FLIP literature: Bridson's Fluid Simulation for Computer Graphics, Zhu & Bridson's Animating Sand as a Fluid, and Matthias Müller's "Ten Minute Physics" FLIP video. The implementation here is my own.
MIT. Copyright (c) 2026 laizie.
This is a personal build I'm sharing so people can read it and learn from it. If it's useful to you, keep the copyright notice with it, and I'd appreciate a link back.
| Qty | Value | Footprint | References |
|---|---|---|---|
| 3 | 100nF | Capacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolder | C1, C2, C3 |
| 2 | 10uF | Capacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolder | C4, C5 |
| 1 | Conn_01x02 | Connector_JST:JST_PH_S2B-PH-K_1x02_P2.00mm_Horizontal | J4 |
| 1 | Conn_02x09_Odd_Even | Footprints:RA4M1_Zero_SMD | J5 |
| 1 | GC9A01 Display | Connector_PinHeader_2.54mm:PinHeader_1x08_P2.54mm_Vertical | J1 |
| 1 | MPU6050 | Connector_PinHeader_2.54mm:PinHeader_1x08_P2.54mm_Vertical | J2 |
| 1 | TP4056 | Footprints:TP4056 | J3 |
The 10 most common of 14 parts.
14 parts, built around the TP4056. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.
From the laizie/FluidSim2d repository on GitHub, at the commit this page was made from: the board is pcb/fluidsim2d/fluidsim2d.kicad_pcb and its schematic pcb/fluidsim2d/fluidsim2d.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Its repository publishes it under the MIT licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).

JGAguado/Smart_Plant
The Smart Plant is a board that can be plugged directly on the soil, close to the plant, that allows the measurement of the environment (soil moisture, environment temperature & illuminance), and presents the…


hhuysqt/esp32s3-keyboard
USB/BLE keyboard driver based on ESP32S3-WROOM-1


jerry20091103/Teensy_Grovebox
A portable synth and music multi-tool made with Teensy 4.1

