Closed dsyleixa closed 5 years ago
I added it since I read that the Nunchuk operates at 400kHz. We could remote it and make it optional (=adding it to the demo.ino setup routine). Adding a new/overloaded function for that purpose is maybe a bit too much
Done
I tried it with this trick:
static void nunchuk_init(unsigned long clock=400000) {
// Change TWI speed for nuchuk, which uses Fast-TWI (400kHz) by default;
// different values by passing the actual clock speed (e.g., 100000)
Wire.setClock(clock);
now one may call the init function with or without passing clock speed values; 400000 is still default.
nunchuk_init(); // uses default nunchuk_init(100000); // uses 100kHz nunchuk_init(400000); // uses 400kHz arbitrarily
HTH!
Nunchuk_init is starting Wire.setClock(400000);
Is there compellinglya need for Nunchuk Wire.setClock(400000); ? or perhaps at 100000?
Instead, I would suggest to enable different clock speeds by
optionally one could perhaps have that feature additionally by overloading this function...?