m5stack / M5-ProductExampleCodes

All example codes of products supplied by M5Stack have been collected in this reposity.
MIT License
339 stars 485 forks source link

Core2 Factory test bugs (checkI2cAddr()) #25

Closed tomorrow56 closed 3 years ago

tomorrow56 commented 4 years ago

This function warns that I2C devices are not found. In the M5Core2 library, Pin definition of Wire and Wire1 are the same and Wire is not valid.

` int checkI2cAddr(){ uint8_t count = 0; i2cDevice_t *lastptr = &i2cParentptr; do{ lastptr = lastptr->nextPtr; Serial.printf("Addr:0x%02X - Name:%s\r\n",lastptr->addr,lastptr->Name.c_str()); // Wire.beginTransmission( lastptr->addr ); Wire1.beginTransmission( lastptr->addr ); // if ( Wire.endTransmission() == 0 ) if ( Wire1.endTransmission() == 0 ) {

`

Gitshaoxiang commented 3 years ago

thank you feedback. already fixed