Detecting USB power supply
-
Hi,
I am searching for guidance to trigger an WIFI action when the USB power supply has been detected.
In my case the M5StickC is connected to my amplifier by USB Plug and as soon as the amplifier is switched on, the M5Stick shall send a wifi command enabling 2 WIFI plugs activating the rest of the stuff.I have some experience with Arduino, but not specifically with M5StickC. Please guide me...
Stay safe and healthy!
-
see this file
https://github.com/m5stack/M5StickC/blob/master/src/AXP192.h
It is a part of M5StickC library for arduino
You find it in a functions that help you to determine when power is connected to usb port, what voltage input and what current flow.
You should interest this functions of axp192
GetVinVoltage();
GetVinCurrent(); -
Thanks for the hint. I got the script working now!
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login