Saku's Blog

Fixing ‘TWBR’ was not declared in this scope

The old implementation in the library:

// switch to 400KHz I2C
    TWBR = ((F_CPU / 400000L) - 16) / 2; // see twi_init in Wire/utility/twi.c

Change it to:

Wire.setClock(400000L);

This should fix the error.


Posted

in

by

Tags:

Comments

One response to “Fixing ‘TWBR’ was not declared in this scope”

  1. Ray Avatar
    Ray

    Thank you so much!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.