Closed noisyfly closed 5 years ago
@hoffmannjan check it out!
I don't know why Your test failed. I build it with Arduino for ESP32 in version 1.0.1. My original code looks like this:
_boolean Adafruit_APDS9960::begin(uint16_t iTimeMS, apds9960AGain_t aGain, uint8_t addr, TwoWire *theWire) { _wire = theWire; _i2c_init(); _i2caddr = addr; // _wire = theWire;
/ Make sure we're actually connected / uint8_t x = read8(APDS9960ID);
So it is the same as those I send in pull request. I tested it using your example of proximity detection and it works.
@noisyfly probably due to cache issues with travis, I've restarted build and will test It on devices soon.
OK works fine, merged:)
@hoffmannjan thanx - please bump version as well so people get the code updates :)
@ladyada done :)
It should be changed because _i2c_init is called without initialized pointer to TwoWire object. In ESP32 it rise an exception.