We are thrilled to introduce the newest addition to the AvantMaker family of libraries: AvantPinSet, a powerful and intuitive Arduino library designed to simplify GPIO pin management for the ESP32. AvantPinSet is engineered to make your projects more responsive, dynamic, and easier to code.
What’s AvantPinSet All About?
AvantPinSet is a comprehensive solution for managing multiple ESP32 pins with a wide range of functionalities. It provides a clean, unified interface for digital I/O, PWM control, and sophisticated timed and fading operations. Say goodbye to complex millis()
logic and tangled code—AvantPinSet handles the low-level details so you can focus on bringing your creative ideas to life.
This library is perfect for a variety of applications, including:
- Home Automation: Effortlessly manage relays, sensors, and switches.
- Custom Lighting: Create smooth, elegant PWM fading effects for LEDs.
- Robotics: Control motors and actuators with precision.
Why We Built AvantPinSet
At AvantMaker, our mission is to empower the maker community with tools that are both powerful and easy to use. We noticed that many ESP32 projects involve repetitive and often complex code for managing pin states, especially for timed events. We created AvantPinSet to abstract away that complexity, providing a robust, non-blocking solution that keeps your loop()
clean and your projects running smoothly.
This library is designed to be a foundational tool for many of our upcoming tutorials, especially those that integrate hardware control with AI and IoT applications. With AvantPinSet, you can build a solid, reliable foundation for your projects, allowing you to experiment and innovate with confidence.
A Glimpse of What You Can Do
Imagine creating a smart home device that turns on a light, waits a few seconds, and then gently fades it out. Or a robot that moves a servo, holds its position, and then returns to its starting point. With AvantPinSet, these complex sequences become simple, readable, and reliable.
Here’s a quick example to show you just how easy it is:
#include <AvantPinSet.h>
// Define the pins you want to manage
int myPinList[] = {2, 4, 27};
const int numPins = 3;
// Create an instance of the library
AvantPinSet myPins(myPinList, numPins);
// Optional callback for when timed actions complete
void actionComplete(int pinNum) {
Serial.printf("Action on pin %d has completed!\n", pinNum);
}
void setup() {
Serial.begin(115200);
// Set pin 2 HIGH immediately
myPins.digitalSet(2, HIGH);
// Set pin 4 HIGH, then revert to LOW after 3 seconds
myPins.digitalSetTime(4, HIGH, 3, actionComplete);
// Set pin 27 to 50% PWM, hold for 5 seconds, then fade to 0
myPins.pwmFadeTime(27, 128, 0, 5, actionComplete);
}
void loop() {
// This single line handles all the magic!
myPins.update();
}
What’s Next for AvantPinSet?
This is just the beginning! We have big plans for AvantPinSet. We will be showcasing Artificial Intelligence-powered projects that leverage this library for sophisticated hardware control.
Furthermore, AvantPinSet will become a core component in the projects featured in our ESP32 Arduino Tutorials, providing a practical and powerful tool for learners. We are committed to expanding its capabilities with more advanced features, including complex sequences and tighter integration with our other libraries. Our goal is to make AvantPinSet the go-to library for ESP32 pin management.
Get Started Today!
Ready to simplify your pin control code and unlock new possibilities? Head over to the AvantPinSet GitHub Repository to download the library, explore the examples, and read the full API documentation.
We encourage you to try it out in your projects, experiment with its features, and see how much easier your hardware projects can be. Your feedback is invaluable, so feel free to open issues, suggest features, or contribute to the project.
Explore our growing collection of libraries and tutorials at the AvantMaker GitHub or dive into our resources at AvantMaker.com.
Happy Making! 🛠️✨