Introduction: LED Lamp Out of a Glass Container (Raspberry Pi Pico)

About: Hi my name is Nick. I'm a computer scientist. My projects are beautiful and useful. Every step in my instructables made for everyone can understand what to do.

LED Lamp out of a Glass Container is a Raspberry Pi Pico based LED strip Controller, that has different modes that you can change using only a single button.

I decided to make LED lamp with modes because I got a useless glass container. If you afraid of darkness, LED lamp can help you to fall asleep. LED lamp might be stylish thing in your room.

I added different modes, that you can control using a single button.

  • RED;
  • GREEN;
  • BLUE;
  • ORANGE;
  • RAINBOW;

It's really better to use something useless than kick it out to trash can.

Supplies

  • Raspberry Pi Pico x1;
  • Button x1;
  • Capacitor 1000uF x1;
  • Resistor 4.7k x1;
  • Accumulator (Min 1.8v. Max 5.5v) x1;
  • RGB LED Strip WS2812b x1;

Step 1: Install and Configure Arduino IDE *Optional

If you have never used Arduino IDE, you will need to download and install it. We'll need to download and install Arduino IDE to upload the code into a microcontroller.

ATTENSION!!! Do not download 2.x versions, at the moment of 10/6/2023 there are still a lot of bugs. It better to download a 1.8.19 version.

Download it here - https://www.arduino.cc/en/software

  • After Installing, navigate to File > Preferences
  • Find Additional Boards Manager URLs, and paste this link into a text field - https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json
  • Then, navigate to Tools > Board: > Boards Manager
  • Type the "Raspberry Pi Pico" in a search field, find and Install.


Step 2: Download and Install Libraries

Install libraries is necessary to work with the microcontrollers, encoders, displays, thermometers, other components, and get the information from there.

  • Navigate to Sketch > Include library > Manage Libraries
  • Type every single library one by one and download:
  1. EncButton
  2. Adafruit NeoPixel

Step 3: Download Firmware

The Firmware folder is the main folder of the project because it contains the code, that we'll upload into a microcontroller.

GitHub Repositoryhttps://github.com/NickProgrammerOffical/LED-Lamp-with-different-modes/tree/main/Firmware

  • Download the .zip on my GitHub.
  • Extract the Firmware folder, then open Firmware.ino file with Arduino IDE.

Step 4: Install Arduino-pico-littlefs-plugin

The primary purpose of the arduino-pico-littlefs-plugin is to let you upload the files into the RPI's flash memory. In this tutorial, the purpose of this tool is to format the RPI's flash.

Download the file called PicoLittleFS-0.2.0.zip from https://github.com/earlephilhower/arduino-pico-littlefs-plugin/releases/tag/0.2.0

And then extract the content of the archive into the "...\Arduino\Tools\" folder.

After that, restart the Arduino IDE.

Step 5: Flash the Raspberry Pi Pico

The last step of assembling is upload code into microcontroller.

  • Navigate to Tools > Board: > Raspberry Pi RP2040 Boards > Raspberry Pi Pico;
  • Hold BOOT button on Raspberry Pi Pico board and plug it to the computer;

(The step is necessary to be able to see the boot port)

  • Navigate to Tools > Port > UF2 Board;
  • Click upload button in the left top corner;

Step 6: Assemble the Lamp

It actually takes 2 minutes to assemble.

Assembling is one of the easiest steps of instructable.

Step 7: Put Everything Into a Glass Container

This step is not the easiest because putting takes a lot of careful work.

Put everything into a container and close it

Step 8: Enjoy

Congratulations, you made it!

Now, enjoy. Push button to change mode.