So I am trying to find out how to check the battery level for 18650 batteries but I haven't found anything. What I want to accomplish is a 4 led indicator level. Like you would see on a portable phone charger.
Hi and welcome to the forum.
I can help by breaking the problem down a little for you:
- Measuring a voltage which is higher than the Arduino's supply voltage. Search for "voltage divider".
- Measuring a voltage using Arduino's analog input. Search for "analogRead"
- Comparing a measured voltage to a fixed reference level. Search for "c language if"
- Understanding the voltage of Li-Ion batteries at different charge levels. Search for "Li-Ion discharge curve"
- Switching LEDs on and off. Search for "digitalWrite".