Raspberry Pi Pico Lamp Sets The Mood Using ChatGPT

Raspberry Pi
(Image credit: Scarlet Lee)

Playing around with RGB color lamps can be fun but choosing a color takes time and effort. What if you could automate the process (with our favorite microcontroller, the Raspberry Pi Pico, of course)? That’s exactly what maker and developer Scarlet Lee has done with this AI-controlled Raspberry Pi Pico lamp that uses Chat GPT to help pick the right color for the best ambiance possible.

There are plenty of factors you could use as triggers to set the color. In this case, Lee is using things like the temperature, average humidity levels and the current amount of ambient light to set the color of the lamp. These details are parsed to ChatGPT which makes a suggestion for the light color. It also displays a message with good fortunes on the display panel.

Ash Hill
Contributing Writer

Ash Hill is a contributing writer for Tom's Hardware with a wealth of experience in the hobby electronics, 3D printing and PCs. She manages the Pi projects of the month and much of our daily Raspberry Pi reporting while also finding the best coupons and deals on all tech.

  • Interesting concept.

    For Temp and humid, it appears that the DHT11 module has a problem with reading pulses correctly when executing code written in lib (library). It was expected though.

    Due to ADC read timing for sure. Anyway, it's better we directly call DHT11 module and use it in the main file.

    # Class Init
    dht_sensor = dht.DHT11(Pin(11))
    # Measure Temp& Hum
    dht_sensor.measure()
    temperature = dht_sensor.temperature()
    humidity = dht_sensor.humidity()

    Although I'm not using Pico bricks module, I had to input the GPIO values in the initialization function though.

    from picobricks_utils import picobricks_neopixel as _PB_neopixel
    PB_neopixel= _PB_neopixel(neopixel_pin= 6)
    Reply
  • BTW, Just found another project while browsing hackster, and this one is so cool !

    https://www.hackster.io/ben-eagan/raspberry-pi-automated-plant-watering-with-website-8af2dc
    Reply