Candle fire with Arduino and p5.js

View Code

2019

Medium: HTML, CSS, p5.js, Arduino

A project for a multimedia programming class using p5.js and Arduino. The P5 sketch responds to input from a DHT humidity sensor connected to the microcontroller. I wanted to make something related to fire so I chose the humidity sensor. I made a candle and flame graphic in Adobe Illustrator and used the values from the sensor to control the size of the fire and the number of fireflies on the screen.

Final Output-try it

With Arduino and dht humidity sensor connected, the humidity change can cause fire on the candle to change, when humidity is too high the fire will be put out.
If Arduino and dht humidity sensor isn't connected you can use arrow key on the your keyboard to change the value.