this is a simple rgb led controlled using arduino and a switch, my problem is when the battery is low, the button is not responding anymore. What could be the problem
Welcome to the forum
Please post your code, using code tags when you do, and a schematic of your circuit. A picture of a hand drawn circuit is good enough
In my experience the easiest way to tidy up the code and add the code tags is as follows
Start by tidying up your code by using Tools/Auto Format in the IDE to make it easier to read. Then use Edit/Copy for Forum and paste what was copied in a new reply. Code tags will have been added to the code to make it easy to read in the forum thus making it easier to provide help.
The problem is that the battery is low. Not enough voltage for the arduino and LED.
You need a 5V power pack
is there a way to solve the problem besides changing the battery?, this works perfectly when fully charge, my battery is a 3.7v li-po 500mAh. My only problem is that when im stress testing the project and purposely draining the battery, at certain point the switch wont work anymore to turn off the light. I thought the issue is on how I wired the battery + -.
Vin requires a voltage between 7V and 12V anything lower will result is unpredictable and erratic operation.
You can power via the USB connector with 5V batery pack/bank.
If you are stress testing something, then surely you expect to find a condition where it won't work as expected.
Hi @enelsama,
there are other members who have worked on a 3.7V power supply for 5V Arduino boards. Maybe you find helpful information there, e.g.:
https://forum.arduino.cc/t/arduino-nano-3-7v-lipo-battery/948705/12
It may allow to extend the time before the controller stops working; anyway the above posts are correct: Your car would also stop when it runs out of fuel...
Good luck!