Hackster is hosting Hackster Holidays, Ep. 6: Livestream & Giveaway Drawing. Watch previous episodes or stream live on Monday!Stream Hackster Holidays, Ep. 6 on Monday!

ChatGPT and DALL-E Make Weather Reports Interesting

This display shows AI-generated piece of art that reflects the day's predicted weather.

As AI tools like ChatGPT become better-known and more accessible, enterprising makers find ever more creative uses for the technology. While it is a mistake to rely on these for anything objective (as we'll discuss in a moment), they can produce surprisingly sophisticated content. ChatGPT, for example, excels at creating content that looks like it was written by a human. Perhaps most interesting is its ability to incorporate humor β€” often better than self-identified comedians can. Alan turned that capability to his advantage in order to build this weather display that uses ChatGPT and DALL-E to make reports entertaining.

Alan's implementation, described below, makes sense when you're familiar with the limitations of ChatGPT and other AI writing tools. The biggest problem is that ChatGPT struggles with real-time data, because that information wouldn't have been present in its training data. But even aside from that, ChatGPT is prone to "hallucinations," which are what most of us would call "lies." ChatGPT will fabricate information whole cloth, then attempt to pass it off as legitimate. It will, for example, cite sources that do not exist. So when you need information that reflects reality and factual truth, you should not turn to ChatGPT.

That forced Alan to take a roundabout route to build this device. The device's purpose is to display an AI-generated piece of art in the style of Picasso that reflects the day's predicted weather. The workflow starts with a computer scraping the internet to find weather information for the day. It parses that to get a simplified description that includes the temperature and the general conditions, like "sunny" or "snowy." It then generates a prompt asking ChatGPT to write a creative story based on that information. From there, it takes the response and feeds it into DALL-E 2, which returns an artistic image that mirrors the story and therefore the weather.

The computer passes that image to a Raspberry Pi Pico development board with an Ethernet HAT attached through Alan's local network. The Pico can then show the image on a ILI9341-driven 2.2" 240x320 TFT LCD connected via SPI.

That's a fairly complicated series of steps, but the result is as intuitive as can be. Each day, the device's screen shows a fun little art piece that represents the predicted weather. This is a great example of working with the limitations of AI tools, instead of trying to force them to be something they aren't.

Cameron Coward
Writer for Hackster News. Proud husband and dog dad. Maker and serial hobbyist. Check out my YouTube channel: Serial Hobbyism
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles