Skip to content

trantuananh1996/HeadlightController

Repository files navigation

Headlight Controller Library - GitHub license GitHub stars GitHub issues

HeadlightController

Headlight leveling control with memory

Special thanks to all author of libraries used in this repository

Repository Contents

  • /examples - Example sketches for the library (.ino). Run these from the Arduino IDE.
  • /src - Source files for the library (.cpp, .h).
  • keywords.txt - Keywords from this library that will be highlighted in the Arduino IDE.
  • library.properties - General library properties for the Arduino package manager.

Basic Usage

  • DO NOT block loop while headlight is running
  • Define pin - Example for NodeMCU esp32
int headlightActivePin = 32;
int headlightReversePin = 33;
int headlightPositionPin = 35;

int headlightUpButtonPin = 26;
int headlightDownButtonPin = 27;
  • setup() - Put this inside setup function, base on your need
//Basic setup
HeadlightController.setupHeadlight(headlightActivePin, headlightReversePin, headlightPositionPin);
//Enable physical button control
HeadlightController.setupButton(headlightUpButtonPin, headlightDownButtonPin);
//Enable web control
HeadlightController.setupWebControl(&server);
  • loop() - Put this inside loop function.
HeadlightController.loop();

Example Briefs

  • ESP32_HeadlightControllerSample - An example running on NodeMCU Esp32, with OTA capability for further update

External library

Schematics

  • Schematics HeadlightController

  • Motor board HeadlightController

Version History

License Information

This is an open source project!

Please review the LICENSE file for license information.

If you have any questions or concerns on licensing, please contact [email protected].

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published