Arun Biju avatar

DIY automated Moon phase light using ESP8266, LEDs

arunbiju969

Published: 24 Feb 2023 › Updated: 24 Feb 2023DIY automated Moon phase light using ESP8266, LEDs

DIY automated Moon phase light using ESP8266, LEDs

DIY WEBSITE S SD SD.png

I have made an automated MOON Phase display using an esp8266 as the brain and using a few LEDs and reusing an old cardboard box.

Items used

  • NodeMCU(esp8266)
  • Bunch of LEDs
  • A couple of insulated wires
  • Tissue Paper
  • Glue

Steps

1.png

I started by cutting out a circle from an old cardboard box and putting some holes to hold the led that we will add later

2.png

Then I went on to divide the circle to make some crescent-shaped divisions and added led and used some tissue paper to spread the light within shapes.

3.png

Finally, I closed the whole face using another tissue paper and some glue, I used tissue because it kinda gives the texture of the moon's surface and it glow well when everything is lit.

Wiring

The is quite simple I use a couple of LEDs in parallel connection and connected the anode to the GPIO pins in esp8266 and cathode to a common GND pin. Here, I use micropython to write the code that manages the automation.

DFD.png

I have used these pins for connections, each anode to the D1,D2,D6 and D7. Then I used the G pins to common ground all the cathodes.

Code

As I've said before the code is written in python as my board run on micropython.

from machine import Pin
import time

# create a pin object 
pins=[5,4,12,13]

while True:
   for pin in pins:
      pin = Pin(pin, Pin.OUT)
      pin.value(1)
      time.sleep(1)
   for pin in pins:
      pin = Pin(pin, Pin.OUT)
      pin.value(0)
      time.sleep(1)

Nothing fancy here, Simple loop to trigger the GPIO pins which inturn lights various sections.

Result

PXL_20230224_154500743.gif

This is how it looks in a dark room, don't expect a lot of light from this but looks cool in my opinion, thank you for reading.

Leave DIY automated Moon phase light using ESP8266, LEDs to:

Written by

Gamer | Tech Savy | Loves Crypto | Discord - Neo_Punk#8806

Read more #diy posts


Best Posts From Arun Biju

We have not curated any of arunbiju969's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.

More Posts From Arun Biju