Idea to Build: An ESP32 NASA Desk Display With Asteroid Flybys, Fireballs and Space Weather on a 2.8 Inch TFT
Share
NASA publishes a lot of its data through open web APIs: today's asteroid flybys, natural events on Earth, solar storms, fresh photos of the whole planet, even fireballs burning up in the sky. I wanted all of that on my desk, on a little screen that just keeps flipping through it.
So I described the idea to Soldr: an ESP32 with a 2.8 inch ILI9341 TFT that joins Wi-Fi and shows NASA data. Soldr designed it, picked the parts, drew the wiring and wrote the firmware. A few rounds of "now add this" later it was a six-page dashboard running on my bench. Here's how it went together.

What you need
Soldr's first plan was just four parts: the ESP32, the TFT, jumper wires and a USB cable, all matched to the catalog. I added the OLED later and used a breadboard to keep it tidy.
- ESP32 30-Pin Development Board (CP2102)
- 2.8 Inch TFT LCD Display ILI9341 (SPI, 240x320)
- 0.96 Inch OLED Display 128x64 I2C (SSD1306), for the optional second screen
- Jumper Wire Combo (M-M, M-F, F-F)
- USB to Micro-USB Data Cable (1 m)
- MB102 830-Point Breadboard
Step 1: Wire it up
The diagram above is straight from Soldr's Wiring tab. The TFT talks SPI to the ESP32:
| TFT pin | ESP32 |
|---|---|
| VCC | 3V3 |
| GND | GND |
| LED (backlight) | 3V3 |
| SCK | GPIO18 |
| SDI (MOSI) | GPIO23 |
| SDO (MISO) | GPIO19 |
| CS | GPIO5 |
| DC | GPIO4 |
| RESET | GPIO13 |
The optional OLED goes on I2C:
| OLED pin | ESP32 |
|---|---|
| VCC / GND | 3V3 / GND |
| SDA | GPIO21 |
| SCL | GPIO22 |
| Address | 0x3C |
A few notes so it works the first time:
- Everything runs on 3.3V. The ILI9341 board and the SSD1306 both take 3.3V logic, so they connect straight to the ESP32 with no level shifter. Power the board from its micro-USB port.
- CS, DC and RESET can move. On my bench I had the TFT on CS 4, DC 16 and RESET 17. I told Soldr which pins I'd actually used and it kept them in every later version of the code. SCK, MOSI and MISO stay on the ESP32's hardware SPI pins (18, 23, 19).
- Leave the touch and SD pins alone. The 2.8 inch board has touch (T_) and SD_ pins on the other header. This build doesn't use them.
The six pages
- Asteroids: today's 5 closest flybys from NASA's NeoWs feed, with name, size in metres, miss distance in lunar distances and speed.
- Earth events: the 5 latest open natural events from EONET (wildfires, storms, volcanoes), title and category.
- Space weather: coronal mass ejections and geomagnetic storms from the last 3 days, from DONKI. The night I filmed it, everything was quiet.
- Earth from space: the date of the latest EPIC full-disk image, how many were taken that day, and the centre point.
- Fireballs: the 4 most recent fireballs from the JPL fireball API, with date, impact energy and location.
- Exoplanets: the confirmed count from the NASA Exoplanet Archive as one big number. It read 6,464 the day I shot it.
How it works
- The pages flip every 15 seconds, and each feed is fetched at most once every 30 minutes, so the board makes only about 8 requests an hour.
- If one feed fails, that page says "Feed unavailable" and the rest keep running. The failed feed is retried after 60 seconds.
- NeoWs and DONKI need an api.nasa.gov key. DEMO_KEY works for a first test but is capped at 30 requests an hour, so sign up for your own key. EONET, EPIC, the fireball feed and the exoplanet count don't use it.
- The OLED was a later add-on, one more message to Soldr. It shows a short text summary of the current page.
What happened on the bench
It didn't all work on the first flash, and that part is worth telling:
- First flash: the fireball and exoplanet pages worked straight away, but the four bigger feeds (10 KB and up) showed "Feed unavailable - Bad JSON".
- I told Soldr exactly that, in plain words. It rewrote the shared fetch code to download each response completely before parsing it with a filter, kept my pins and settings, and added the 60 second retry.
- Reflashed from Soldr, and all six pages came up with live data.
Step 2: Flash it
- In the Arduino IDE, install the esp32 board package and choose ESP32 Dev Module. Install Adafruit GFX Library, Adafruit ILI9341, Adafruit SSD1306 and ArduinoJson (7.x) from Library Manager.
- Put your Wi-Fi name, password and api.nasa.gov key into the settings lines at the top of the sketch Soldr gives you. Use a 2.4 GHz network.
- Upload, then watch the screen: the first round of feeds takes a little while, then the pages start rotating.
How Soldr designs this from the idea
Want a page for something else, say the ISS position or a picture of the day? Describe it at soldr.ai. Soldr designs hardware from the idea: it asks which board you want, picks parts from the Compoden catalog, assigns the pins, gives you the wiring diagram and writes the firmware, then compiles it for your board. You can keep talking to it, like I did here, to add a screen or fix a problem. For this one the idea was simply a NASA data display for my desk on an ESP32 and a 2.8 inch TFT.
Not affiliated with or endorsed by NASA. Just a very nice set of open data that looks great on a desk.