I think 1 Ω load is a bad choice for 18650 element.
The issue here is that capacity of the battery depends on discharge current. For low discharge current the capacity will be higher, for high discharge current the capacity will be lower.
As I know, the standard of capacity for the battery is specified for 1C current. And if you use different discharge current, you will get different capacity which cannot be compared with specification, because it is measured not for 1C current.
Usual 18650 capacity is C=2600 mAh.
So, the required discharge current for measurement is
I = 1 * 2600 = 2600 mA
Since 18650 has 4.2 V, the required load resistance is
R = 4.2 / 2.600 = 1.62 Ω
When you use 1 Ω resistor, it leads to discharge current I = 4.2 / 1 = 4.2 Amps. So the battery capacity needs to be C = 1 * 4200 = 4200 mAh.
4200 mA is too high current for 2600 mAh battery capacity measurment, so your measurement will show you lower capacity than real.
In your arduino code there is hardcoded 1.9 Ω it leads to the current 4.2 / 1.9 = 2210 mA, which is too smal for battery with 2600 mAh capacity, so your measurement will show you higher capacity than real.
Another issue with resistor load is that voltage will drop down while discharge, so it leads to slightly current change over discharge time and as result - a little different measured capacity.
in order to get proper capacity measurement at constant 1C current, it's better to use constant current load circuit instead of simple resistor. It will give you proper capacity measurement.
For example, you can try this DIY kit of electronic load constant current from aliexpress for proper battery capacity measurement:
https://www.aliexpress.com/item/32870007246.htmlIt allows to setup constant current and stablilize it for entire discharge process.
So, you can setup 1C current and get proper capacity measurement with it.
Update: sorry, just googled, I was wrong. The specified capacity is rated for 1C discharge current, not 0.1C. So I fixed calculations above.