Skip to content

Micro:bit V2 Interactive LED Strip with Light Sensing

License

Notifications You must be signed in to change notification settings

roman-kulish/microbit-led-lights

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Micro:bit V2 Interactive LED Strip with Light Sensing

This project showcases how to create an interactive LED strip experience using a Micro:bit V2 board, a VEML6030 ambient light sensor, and a WS2812B addressable LED strip.

Features

  • Multiple Modes:
    • Lights ON: LEDs display a static pattern, controlled by button B.
    • Lights OFF: All LEDs are turned off.
  • Button Control:
    • Button A: Cycles through the different modes.
    • Button B: Changes the LED animation pattern (in Lights ON mode).
  • Ambient Light Sensing: The VEML6030 sensor adjusts the brightness of the LEDs based on the surrounding light levels.
  • WS2812B LED Strip: Utilizes the WS2812FX library for a variety of captivating LED animation patterns.

Shopping List

Software Requirements

  • Arduino IDE or PlatformIO
  • Adafruit_Microbit library
  • SparkFun_VEML6030_Ambient_Light_Sensor library
  • WS2812FX library

Installation and Setup

  1. Clone or download this repository.
  2. Install the required libraries.
  3. Connect the hardware components according to the wiring diagram (provided below or in a separate file).
  4. Open the project in your Arduino IDE or PlatformIO.
  5. Compile and upload the code to your Micro:bit V2.

Wiring Diagram

Wiring diagram

Usage

  1. Power on your Micro:bit V2.
  2. Press button A to cycle through the modes.
  3. Press button B to change the LED animation pattern (in Lights ON mode).
  4. The LEDs will automatically adjust their brightness based on the ambient light.

Customization

  • Adjust the VEML6030 sensor settings and brightness mapping in VEML6030.cpp to fine-tune the light sensitivity.
  • Modify the LED animation patterns or add new ones in State.cpp and WS2812FX.h.
  • Experiment with different motion detection thresholds and LED responses in main.cpp.

Contributing

Contributions are welcome! Feel free to submit pull requests or open issues to suggest improvements or report bugs.

License

This project is licensed under the MIT License.