Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

This project is a door light controller using the CH32V003 microcontroller. It includes functionalities for controlling an LED light based on a button press and ambient light conditions, with PWM dimming and deep sleep mode for power saving.

Notifications You must be signed in to change notification settings

pabloestrado/DoorLight

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DoorLight Project

This project is a door light controller using the CH32 microcontroller. It includes functionalities for controlling an LED light based on a button press and ambient light conditions, with PWM dimming and deep sleep mode for power saving.

Features

  • LED light control with PWM dimming
  • Ambient light detection using a photoresistor
  • Button press to extend light duration
  • Deep sleep mode for power saving

Hardware Requirements

  • CH32 microcontroller
  • LED
  • Photoresistor
  • Button
  • Power management components

Software Requirements

  • PlatformIO
  • CH32V003 SDK
  • GPIO and PWM libraries

Setup

  1. Clone the repository:

    git clone https://github.com/yourusername/DoorLight.git
    cd DoorLight
  2. Open the project in PlatformIO:

    platformio init --board ch32v003
  3. Build and upload the firmware:

    platformio run --target upload

Usage

  1. Power on the device.
  2. The LED will turn on based on the ambient light conditions.
  3. Press the button to extend the light duration.
  4. The device will enter deep sleep mode when the light is off to save power.

Code Overview

  • main.c: The main application code, including initialization, light control, and deep sleep functions.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Acknowledgements

About

This project is a door light controller using the CH32V003 microcontroller. It includes functionalities for controlling an LED light based on a button press and ambient light conditions, with PWM dimming and deep sleep mode for power saving.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages