Use this forum to chat about hardware specific topics for the ESP8266 (peripherals, memory, clocks, JTAG, programming)

User avatar
By eriksl
#23426 I already found the code, for the tsl2561 it's in the datasheet, for the tsl2560 (predecessor) you'll have to search real hard, it's in an application note that's no longer available.

Anyway, I had a look at the example code for both and applied the basics in my own code. The supplied code is really horrible (as we're used to, from people that are used to make hardware and are not trained programmers...), so I wrote my own. Works quite well and indeed no powf required.

I do believe the integer or simple float approximation is, like it says, actually an approximation, but I guess it won't be off that much.