After getting the ESP32 talking to the local LLM the next stage was to do something more than just flashing an LED. I decided that I’d use the LLM to produce a ‘fortune’ for me and then display that on an OLED screen I’d connect to the ESP32.
The OLED screen in question was this White I2C OLED display (SSD1306).

To use this OLED you need the Adafruit_SSD1306 library.
Here is the prompt being sent to the local LLM:
You are a mystical fortune teller. Give one short fortune. Maximum 12 words. No introduction. No quotes.
The result from the LLM is then displayed on the OLED screen which is connected to the ESP32-C3-DevKitM-1 via GPIO6 and GPIO7 acting as SDA and SCL communication ports. I also left the external LED on GPIO4, from the last project, as well to aid troubleshooting.
The code is here:
https://github.com/directorcia/Azure/blob/master/Iot/LLM/llm-fortune.ino
and the results look like:
Video URL = ESP32 displaying results from local LLM





