Checking battery level with two 18650 batteries in series

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:

  1. Measuring a voltage which is higher than the Arduino's supply voltage. Search for "voltage divider".
  2. Measuring a voltage using Arduino's analog input. Search for "analogRead"
  3. Comparing a measured voltage to a fixed reference level. Search for "c language if"
  4. Understanding the voltage of Li-Ion batteries at different charge levels. Search for "Li-Ion discharge curve"
  5. Switching LEDs on and off. Search for "digitalWrite".