Odd about the I2C - have you tried different micro:bits? I guess it's possible yours has a dodgy connection?
For show, it's tricky - Math.pow will be using floating point, and I believe the truncation (rather than rounding) is the correct thing to do. The micro:bit has so little memory I believe I'm using a simpler Math.pow that's not quite as accurate, which might account for the problem. I'm not sure there's an easy fix (short of just hacking show to round when it gets an FP number).
© Espruino, powered by microcosm.
Report a problem