Gist cad8e8eae331f4c1abef424db5879cf2
✓ Published0🌍 Public
IIoTeacher
Last edited May 20, 2025
Created on May 24, 2025
This example shows a Raspberry Pi Pico W microcontroller consulting an AI model to decide on greenhouse ventilation and displaying the response on an OLED screen. It simulates temperature and humidity sensor readings, sends them via the `urequests` library to OpenAI’s Chat Completions API (GPT-3.5-turbo), and renders the AI’s decision on an SSD1306 OLED display using `ssd1306` and the I2C protocol. The code also uses the `network` module to connect to Wi-Fi, with data refreshed every 15 seconds.
AI-generated description