# IoT Moon Phase Guide

## Overview

https://youtu.be/NLtVKXIhyEQ

Build an internet-connected Moon Phase clock displaying the current moon cycle on a 3D printed topographical relief of the lunar surface!

Powered by CircuitPython, this clock runs on a QT Py ESP32-S2 with a diffused, high density NeoPixel LED strip.&nbsp;

The NeoPixel strip cycles to show the new moon, waxing crescent, first quarter, waxing gibbous, full moon, waning gibbous, third quarter, and waning crescent.

![](https://cdn-learn.adafruit.com/assets/assets/000/135/798/medium640thumb/3d_printing_phase-loop.jpg?1742229324)

This project uses the US Navy Moon Phase API to get the phase of the moon and Adafruit IO to get the ISO timestamp. A request is made every 6 hours (tracked with ticks) to Adafruit IO and the API.

![](https://cdn-learn.adafruit.com/assets/assets/000/135/799/medium640/3d_printing_hero-qtpy.jpg?1742229880)

![](https://cdn-learn.adafruit.com/assets/assets/000/135/800/medium800/3d_printing_hero-moon-close.jpg?1742229960)

This project is inspired by&nbsp;the [Moon Lamp](https://makerworld.com/en/models/955117-moon-lamp) project, originally posted by [Martin Kozak](https://makerworld.com/en/@MartinKozak)

## Parts
Featured
### Adafruit QT Py ESP32-S2 WiFi Dev Board with STEMMA QT

[Adafruit QT Py ESP32-S2 WiFi Dev Board with STEMMA QT](https://www.adafruit.com/product/5325)
What has your favorite Espressif WiFi microcontroller, comes with&nbsp;[our favorite connector - the STEMMA QT](http://adafruit.com/stemma), a chainable I2C port, and has lots of Flash and RAM memory for your next IoT project? What will make your next IoT project flyyyyy? What a...

In Stock
[Buy Now](https://www.adafruit.com/product/5325)
[Related Guides to the Product](https://learn.adafruit.com/products/5325/guides)
![Angled shot of small square purple dev board.](https://cdn-shop.adafruit.com/640x480/5325-12.jpg)

Featured
### Adafruit NeoPixel Silicone Bead LED Strip - 180 LEDs per Meter

[Adafruit NeoPixel Silicone Bead LED Strip - 180 LEDs per Meter](https://www.adafruit.com/product/6016)
Plug in and glow with this incredible, ultra-high-density NeoPixel strip with an astonishing 180 LEDs/meter. That's no typo; this meter-long strip has 180 miniature NeoPixels crammed together and coated with a milky silicone bead to give it a smooth and continuous color gradient compared...

In Stock
[Buy Now](https://www.adafruit.com/product/6016)
[Related Guides to the Product](https://learn.adafruit.com/products/6016/guides)
![Angled shot of LED strip in a spiral, emitting pink and blue colors.](https://cdn-shop.adafruit.com/640x480/6016-00.jpg)

Featured
### 3-pin JST SM Plug + Receptacle Cable Set

[3-pin JST SM Plug + Receptacle Cable Set](https://www.adafruit.com/product/1663)
These 3-wire cables are 163mm (6.4") long and come as a set. One cable has a JST SM type connector plug on the end. The other cable has a matching JST SM type receptacle connector. They are good for whenever you have 3 wires you want to be able to plug and unplug. We like the solid and...

In Stock
[Buy Now](https://www.adafruit.com/product/1663)
[Related Guides to the Product](https://learn.adafruit.com/products/1663/guides)
![Angled shot of 2 3-pin JST SM Plug + Receptacle Cable.](https://cdn-shop.adafruit.com/640x480/1663-00.jpg)

Featured
### Pink and Purple Woven USB A to USB C Cable - 2 meters long

[Pink and Purple Woven USB A to USB C Cable - 2 meters long](https://www.adafruit.com/product/5044)
This cable is not only super-fashionable, with a woven pink and purple Blinka-like pattern, it's also made for USB C for our modernized breakout boards, Feathers and more.&nbsp; [If you want something just like it but for Micro B, we have a B...](https://www.adafruit.com/product/4111)

Out of Stock
[Buy Now](https://www.adafruit.com/product/5044)
[Related Guides to the Product](https://learn.adafruit.com/products/5044/guides)
![Angled shot of a pink/purple woven USB cable plugged into a laptop port and a small dev board.](https://cdn-shop.adafruit.com/640x480/5044-04.jpg)

Featured
### 5V 1A (1000mA) USB port power supply - UL Listed

[5V 1A (1000mA) USB port power supply - UL Listed](https://www.adafruit.com/product/501)
Need a USB jack for charging or powering a project, but don't want to lug around a computer? This switching supply gives a clean regulated output at up to 1000mA! 110 or 240 input, so it works in any country. The plugs are "US 2-prong" style so you may need a plug adapter, but...

In Stock
[Buy Now](https://www.adafruit.com/product/501)
[Related Guides to the Product](https://learn.adafruit.com/products/501/guides)
![Wall wart power supply with 2 US prong power](https://cdn-shop.adafruit.com/640x480/501-05.jpg)

To have the moon semi-transparent, the following white PLA filament was used. The black PLA is generic.

### Part: White PLA Filament
quantity: 1
White PLA Filament
[White PLA Filament](https://amzn.to/4bC2FcP)

- [Next Page](https://learn.adafruit.com/moon-phase/circuit-diagram.md)

## Guide Products

### Adafruit QT Py ESP32-S2 WiFi Dev Board with STEMMA QT

[Adafruit QT Py ESP32-S2 WiFi Dev Board with STEMMA QT](https://www.adafruit.com/product/5325)
What has your favorite Espressif WiFi microcontroller, comes with&nbsp;[our favorite connector - the STEMMA QT](http://adafruit.com/stemma), a chainable I2C port, and has lots of Flash and RAM memory for your next IoT project? What will make your next IoT project flyyyyy? What a...

In Stock
[Buy Now](https://www.adafruit.com/product/5325)
[Related Guides to the Product](https://learn.adafruit.com/products/5325/guides)
### Adafruit NeoPixel Silicone Bead LED Strip - 180 LEDs per Meter

[Adafruit NeoPixel Silicone Bead LED Strip - 180 LEDs per Meter](https://www.adafruit.com/product/6016)
Plug in and glow with this incredible, ultra-high-density NeoPixel strip with an astonishing 180 LEDs/meter. That's no typo; this meter-long strip has 180 miniature NeoPixels crammed together and coated with a milky silicone bead to give it a smooth and continuous color gradient compared...

In Stock
[Buy Now](https://www.adafruit.com/product/6016)
[Related Guides to the Product](https://learn.adafruit.com/products/6016/guides)
### 3-pin JST SM Plug + Receptacle Cable Set

[3-pin JST SM Plug + Receptacle Cable Set](https://www.adafruit.com/product/1663)
These 3-wire cables are 163mm (6.4") long and come as a set. One cable has a JST SM type connector plug on the end. The other cable has a matching JST SM type receptacle connector. They are good for whenever you have 3 wires you want to be able to plug and unplug. We like the solid and...

In Stock
[Buy Now](https://www.adafruit.com/product/1663)
[Related Guides to the Product](https://learn.adafruit.com/products/1663/guides)
### Pink and Purple Woven USB A to USB C Cable - 2 meters long

[Pink and Purple Woven USB A to USB C Cable - 2 meters long](https://www.adafruit.com/product/5044)
This cable is not only super-fashionable, with a woven pink and purple Blinka-like pattern, it's also made for USB C for our modernized breakout boards, Feathers and more.&nbsp; [If you want something just like it but for Micro B, we have a B...](https://www.adafruit.com/product/4111)

Out of Stock
[Buy Now](https://www.adafruit.com/product/5044)
[Related Guides to the Product](https://learn.adafruit.com/products/5044/guides)
### 5V 1A (1000mA) USB port power supply - UL Listed

[5V 1A (1000mA) USB port power supply - UL Listed](https://www.adafruit.com/product/501)
Need a USB jack for charging or powering a project, but don't want to lug around a computer? This switching supply gives a clean regulated output at up to 1000mA! 110 or 240 input, so it works in any country. The plugs are "US 2-prong" style so you may need a plug adapter, but...

In Stock
[Buy Now](https://www.adafruit.com/product/501)
[Related Guides to the Product](https://learn.adafruit.com/products/501/guides)

## Related Guides

- [Adafruit QT Py ESP32-S2 and QT Py ESP32-S2 with uFL Antenna](https://learn.adafruit.com/adafruit-qt-py-esp32-s2.md)
- [IoT Food Scale with Azure and CircuitPython](https://learn.adafruit.com/iot-food-scale-with-azure-and-circuitpython.md)
- [3D Printed Dragon Lamp](https://learn.adafruit.com/dragon-lamp.md)
- [Holiday IoT Switch](https://learn.adafruit.com/holiday-iot-switch.md)
- [Motorized POV LED Display](https://learn.adafruit.com/motorized-pov-led-display.md)
- [Solderless Robot Toy Xylophone](https://learn.adafruit.com/solderless-robot-toy-xylophone.md)
- [PyPortal Titano Weather Station](https://learn.adafruit.com/pyportal-titano-weather-station.md)
- [PyPortal Pet Planter with Adafruit IO](https://learn.adafruit.com/pyportal-pet-planter-with-adafruit-io.md)
- [Adafruit IO Home: Lights and Temperature ](https://learn.adafruit.com/adafruit-io-house-lights-and-temperature.md)
- [MIDI Foot Pedal](https://learn.adafruit.com/midi-foot-pedal.md)
- [LED Shoji Lamp](https://learn.adafruit.com/led-shoji-lamp.md)
- [3D Print Ratcatcher 2 Controller Device](https://learn.adafruit.com/3d-print-ratcatcher-2-controller-device-wand.md)
- [Ikea Vindriktning Hack with QT Py ESP32-S3 and Adafruit IO](https://learn.adafruit.com/ikea-vindriktning-hack-with-qt-py-esp32-s3-and-adafruit-io.md)
- [Super Simple Sunrise Lamp](https://learn.adafruit.com/super-simple-sunrise-lamp.md)
- [Light Up Bubble Wand with WLED](https://learn.adafruit.com/light-up-bubble-wand-with-wled.md)
- [No-Code IoT Soil Sensor](https://learn.adafruit.com/soil-node.md)
