Serial monitor output not working after starting i2c wire library
Posted: Sun Sep 17, 2017 1:03 am
I am using the arduino IDE and want to get I2C data from a wii nunchuck controller. I am just trying to Serial.print() some values but nothing goes to the com viewer after wire is started.
It outputs "HELLO" but not "end of setup". Am I correct that wire and serial are default sharing something important in the esp32?
Thanks.
Code: Select all
void setup() {
Serial.begin(115200);
Serial.println("HELLO");
Wire.begin(NUNCHUK_ADDRESS);
Wire.beginTransmission(NUNCHUK_ADDRESS);
Wire.write(0xF0);
Wire.write(0x55);
Wire.endTransmission();
Wire.beginTransmission(NUNCHUK_ADDRESS);
Wire.write(0xFB);
Wire.write(0x00);
Wire.endTransmission();
Serial.println("end of setup");
}
Thanks.