Open jimbolimbo3 opened 8 years ago
I can see a possible division by zero on the line below that: https://github.com/javieryanez/nodemcu-modules/blob/master/bmp180/bmp180.lua#L96
Which as you can see on Bosch provided driver, based on the same algorithms, does a check before to avoid the division by zero: https://github.com/BoschSensortec/BMP180_driver/blob/master/bmp180.c#L227-L229
So there's indeed a possible division by zero but is not checked by this lua module.
The terminal says:
bmp180.lua:95: divide by zero
The line 95 is this: local X1 = (UT - AC6) * AC5 / 32768
Do you have any idea why?