AtTiny85, Serial LCD, and TinyWireM not working together.

Discussions on the software and hardware for Atmel's STK standard.

Moderator: phalanx

AtTiny85, Serial LCD, and TinyWireM not working together.

Postby dprefont » Fri Feb 17, 2017 7:48 am

I have an existing configuration of UNO, 16x2 IIC serial LCD at 0x27, and DHT11 temp/hum sensor that works fine.
When I try to build something similar with AtTiny85 instead of UNO, I keep getting "twi_init" errors. This seems to suggest there is a problem with TinyWireM.h. However, if I comment out the #include for LiquidCrystal_I2C, the problem goes away. Obviously, I need an LCD for the project so that won't work. Is there a problem with the LCD library and TinyWireM? Is there a different LCD library I should be using?
The programmer is a SparkFun PGM-11801. It handles the Blink sketch without incident.

Also, the AtTiny can't handle graphics libraries due to a dynamic memory constraint of 1KB and the typical serial LCD panel is 16x2 and large in size when compared to the AtTiny. Is there a smaller text display that I can use to output the "weather" from the sensor(s) such that the form factor for the entire project is kept small?

The errors follow the code.

Code: Select all
#include <dht11.h>
dht11 DHT11;
#define DHT11PIN 1
#include <TinyWireM.h>   
#include <LiquidCrystal_I2C.h>   
// Set the pins on the I2C chip used for LCD connections: addr, en,rw,rs,d4,d5,d6,d7,bl,blpol
LiquidCrystal_I2C LCD(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);  // Set the LCD I2C address and type of display (white on colour bg).
/////////////////
Arduino: 1.8.0 (Windows 7), Board: "ATtiny, ATtiny85, 8 MHz (internal)"

C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c: In function 'twi_init':

C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c:76:16: error: 'SDA' undeclared (first use in this function)

   digitalWrite(SDA, 1);

                ^

C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c:76:16: note: each undeclared identifier is reported only once for each function it appears in

C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c:77:16: error: 'SCL' undeclared (first use in this function)

   digitalWrite(SCL, 1);

                ^

In file included from c:\users\dp\appdata\local\arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.3-arduino2\avr\include\avr\io.h:99:0,

                 from C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c:25:

C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c:80:7: error: 'TWSR' undeclared (first use in this function)

   cbi(TWSR, TWPS0);

       ^

C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c:80:3: note: in expansion of macro 'cbi'

   cbi(TWSR, TWPS0);

   ^

C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c:80:13: error: 'TWPS0' undeclared (first use in this function)

   cbi(TWSR, TWPS0);

             ^

C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c:80:3: note: in expansion of macro 'cbi'

   cbi(TWSR, TWPS0);

   ^

C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c:81:13: error: 'TWPS1' undeclared (first use in this function)

   cbi(TWSR, TWPS1);

             ^

C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c:81:3: note: in expansion of macro 'cbi'

   cbi(TWSR, TWPS1);

   ^

C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c:82:3: error: 'TWBR' undeclared (first use in this function)

   TWBR = ((F_CPU / TWI_FREQ) - 16) / 2;

   ^

C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c:90:3: error: 'TWCR' undeclared (first use in this function)

   TWCR = _BV(TWEN) | _BV(TWIE) | _BV(TWEA);

   ^

In file included from c:\users\dp\appdata\local\arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.3-arduino2\avr\include\avr\io.h:99:0,

                 from C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c:25:

C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c:90:14: error: 'TWEN' undeclared (first use in this function)

   TWCR = _BV(TWEN) | _BV(TWIE) | _BV(TWEA);

              ^

C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c:90:26: error: 'TWIE' undeclared (first use in this function)

   TWCR = _BV(TWEN) | _BV(TWIE) | _BV(TWEA);

                          ^

C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c:90:38: error: 'TWEA' undeclared (first use in this function)

   TWCR = _BV(TWEN) | _BV(TWIE) | _BV(TWEA);

                                      ^

C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c: In function 'twi_disable':

C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c:102:3: error: 'TWCR' undeclared (first use in this function)

   TWCR &= ~(_BV(TWEN) | _BV(TWIE) | _BV(TWEA));

   ^

In file included from c:\users\dp\appdata\local\arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.3-arduino2\avr\include\avr\io.h:99:0,

                 from C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c:25:

C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c:102:17: error: 'TWEN' undeclared (first use in this function)

   TWCR &= ~(_BV(TWEN) | _BV(TWIE) | _BV(TWEA));

                 ^

C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c:102:29: error: 'TWIE' undeclared (first use in this function)

   TWCR &= ~(_BV(TWEN) | _BV(TWIE) | _BV(TWEA));

                             ^

C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c:102:41: error: 'TWEA' undeclared (first use in this function)

   TWCR &= ~(_BV(TWEN) | _BV(TWIE) | _BV(TWEA));

                                         ^

C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c:105:16: error: 'SDA' undeclared (first use in this function)

   digitalWrite(SDA, 0);

                ^

C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c:106:16: error: 'SCL' undeclared (first use in this function)

   digitalWrite(SCL, 0);

                ^

C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c: In function 'twi_setAddress':

C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c:118:3: error: 'TWAR' undeclared (first use in this function)

   TWAR = address << 1;

   ^

C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c: In function 'twi_setFrequency':

C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c:129:3: error: 'TWBR' undeclared (first use in this function)

   TWBR = ((F_CPU / frequency) - 16) / 2;

   ^

C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c: In function 'twi_readFrom':

C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c:187:7: error: 'TWDR' undeclared (first use in this function)

       TWDR = twi_slarw;

       ^

C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c:188:13: error: 'TWCR' undeclared (first use in this function)

     } while(TWCR & _BV(TWWC));

             ^

In file included from c:\users\dp\appdata\local\arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.3-arduino2\avr\include\avr\io.h:99:0,

                 from C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c:25:

C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c:188:24: error: 'TWWC' undeclared (first use in this function)

     } while(TWCR & _BV(TWWC));

                        ^

C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c:189:16: error: 'TWINT' undeclared (first use in this function)

     TWCR = _BV(TWINT) | _BV(TWEA) | _BV(TWEN) | _BV(TWIE); // enable INTs, but not START

                ^

C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c:189:29: error: 'TWEA' undeclared (first use in this function)

     TWCR = _BV(TWINT) | _BV(TWEA) | _BV(TWEN) | _BV(TWIE); // enable INTs, but not START

                             ^

C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c:189:41: error: 'TWEN' undeclared (first use in this function)

     TWCR = _BV(TWINT) | _BV(TWEA) | _BV(TWEN) | _BV(TWIE); // enable INTs, but not START

                                         ^

C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c:189:53: error: 'TWIE' undeclared (first use in this function)

     TWCR = _BV(TWINT) | _BV(TWEA) | _BV(TWEN) | _BV(TWIE); // enable INTs, but not START

                                                     ^

C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c:193:65: error: 'TWSTA' undeclared (first use in this function)

     TWCR = _BV(TWEN) | _BV(TWIE) | _BV(TWEA) | _BV(TWINT) | _BV(TWSTA);

                                                                 ^

C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c: In function 'twi_writeTo':

C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c:269:7: error: 'TWDR' undeclared (first use in this function)

       TWDR = twi_slarw;   

       ^

C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c:270:13: error: 'TWCR' undeclared (first use in this function)

     } while(TWCR & _BV(TWWC));

             ^

In file included from c:\users\dp\appdata\local\arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.3-arduino2\avr\include\avr\io.h:99:0,

                 from C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c:25:

C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c:270:24: error: 'TWWC' undeclared (first use in this function)

     } while(TWCR & _BV(TWWC));

                        ^

C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c:271:16: error: 'TWINT' undeclared (first use in this function)

     TWCR = _BV(TWINT) | _BV(TWEA) | _BV(TWEN) | _BV(TWIE); // enable INTs, but not START

                ^

C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c:271:29: error: 'TWEA' undeclared (first use in this function)

     TWCR = _BV(TWINT) | _BV(TWEA) | _BV(TWEN) | _BV(TWIE); // enable INTs, but not START

                             ^

C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c:271:41: error: 'TWEN' undeclared (first use in this function)

     TWCR = _BV(TWINT) | _BV(TWEA) | _BV(TWEN) | _BV(TWIE); // enable INTs, but not START

                                         ^

C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c:271:53: error: 'TWIE' undeclared (first use in this function)

     TWCR = _BV(TWINT) | _BV(TWEA) | _BV(TWEN) | _BV(TWIE); // enable INTs, but not START

                                                     ^

C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c:275:65: error: 'TWSTA' undeclared (first use in this function)

     TWCR = _BV(TWINT) | _BV(TWEA) | _BV(TWEN) | _BV(TWIE) | _BV(TWSTA); // enable INTs

                                                                 ^

C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c: In function 'twi_reply':

C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c:357:5: error: 'TWCR' undeclared (first use in this function)

     TWCR = _BV(TWEN) | _BV(TWIE) | _BV(TWINT) | _BV(TWEA);

     ^

In file included from c:\users\dp\appdata\local\arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.3-arduino2\avr\include\avr\io.h:99:0,

                 from C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c:25:

C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c:357:16: error: 'TWEN' undeclared (first use in this function)

     TWCR = _BV(TWEN) | _BV(TWIE) | _BV(TWINT) | _BV(TWEA);

                ^

C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c:357:28: error: 'TWIE' undeclared (first use in this function)

     TWCR = _BV(TWEN) | _BV(TWIE) | _BV(TWINT) | _BV(TWEA);

                            ^

C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c:357:40: error: 'TWINT' undeclared (first use in this function)

     TWCR = _BV(TWEN) | _BV(TWIE) | _BV(TWINT) | _BV(TWEA);

                                        ^

C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c:357:53: error: 'TWEA' undeclared (first use in this function)

     TWCR = _BV(TWEN) | _BV(TWIE) | _BV(TWINT) | _BV(TWEA);

                                                     ^

C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c: In function 'twi_stop':

C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c:372:3: error: 'TWCR' undeclared (first use in this function)

   TWCR = _BV(TWEN) | _BV(TWIE) | _BV(TWEA) | _BV(TWINT) | _BV(TWSTO);

   ^

In file included from c:\users\dp\appdata\local\arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.3-arduino2\avr\include\avr\io.h:99:0,

                 from C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c:25:

C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c:372:14: error: 'TWEN' undeclared (first use in this function)

   TWCR = _BV(TWEN) | _BV(TWIE) | _BV(TWEA) | _BV(TWINT) | _BV(TWSTO);

              ^

C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c:372:26: error: 'TWIE' undeclared (first use in this function)

   TWCR = _BV(TWEN) | _BV(TWIE) | _BV(TWEA) | _BV(TWINT) | _BV(TWSTO);

                          ^

C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c:372:38: error: 'TWEA' undeclared (first use in this function)

   TWCR = _BV(TWEN) | _BV(TWIE) | _BV(TWEA) | _BV(TWINT) | _BV(TWSTO);

                                      ^

C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c:372:50: error: 'TWINT' undeclared (first use in this function)

   TWCR = _BV(TWEN) | _BV(TWIE) | _BV(TWEA) | _BV(TWINT) | _BV(TWSTO);

                                                  ^

C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c:372:63: error: 'TWSTO' undeclared (first use in this function)

   TWCR = _BV(TWEN) | _BV(TWIE) | _BV(TWEA) | _BV(TWINT) | _BV(TWSTO);

                                                               ^

C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c: In function 'twi_releaseBus':

C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c:393:3: error: 'TWCR' undeclared (first use in this function)

   TWCR = _BV(TWEN) | _BV(TWIE) | _BV(TWEA) | _BV(TWINT);

   ^

In file included from c:\users\dp\appdata\local\arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.3-arduino2\avr\include\avr\io.h:99:0,

                 from C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c:25:

C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c:393:14: error: 'TWEN' undeclared (first use in this function)

   TWCR = _BV(TWEN) | _BV(TWIE) | _BV(TWEA) | _BV(TWINT);

              ^

C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c:393:26: error: 'TWIE' undeclared (first use in this function)

   TWCR = _BV(TWEN) | _BV(TWIE) | _BV(TWEA) | _BV(TWINT);

                          ^

C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c:393:38: error: 'TWEA' undeclared (first use in this function)

   TWCR = _BV(TWEN) | _BV(TWIE) | _BV(TWEA) | _BV(TWINT);

                                      ^

C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c:393:50: error: 'TWINT' undeclared (first use in this function)

   TWCR = _BV(TWEN) | _BV(TWIE) | _BV(TWEA) | _BV(TWINT);

                                                  ^

In file included from c:\users\dp\appdata\local\arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.3-arduino2\avr\include\compat\twi.h:36:0,

                 from C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c:27:

C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c: In function 'TWI_vect':

C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c:401:10: error: 'TWSR' undeclared (first use in this function)

   switch(TW_STATUS){

          ^

In file included from c:\users\dp\appdata\local\arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.3-arduino2\avr\include\avr\io.h:99:0,

                 from C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c:25:

C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c:401:10: error: 'TWS7' undeclared (first use in this function)

   switch(TW_STATUS){

          ^

C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c:401:10: error: 'TWS6' undeclared (first use in this function)

   switch(TW_STATUS){

          ^

C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c:401:10: error: 'TWS5' undeclared (first use in this function)

   switch(TW_STATUS){

          ^

C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c:401:10: error: 'TWS4' undeclared (first use in this function)

   switch(TW_STATUS){

          ^

C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c:401:10: error: 'TWS3' undeclared (first use in this function)

   switch(TW_STATUS){

          ^

C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c:406:7: error: 'TWDR' undeclared (first use in this function)

       TWDR = twi_slarw;

       ^

C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c:426:4: error: 'TWCR' undeclared (first use in this function)

    TWCR = _BV(TWINT) | _BV(TWSTA)| _BV(TWEN) ;

    ^

In file included from c:\users\dp\appdata\local\arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.3-arduino2\avr\include\avr\io.h:99:0,

                 from C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c:25:

C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c:426:15: error: 'TWINT' undeclared (first use in this function)

    TWCR = _BV(TWINT) | _BV(TWSTA)| _BV(TWEN) ;

               ^

C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c:426:28: error: 'TWSTA' undeclared (first use in this function)

    TWCR = _BV(TWINT) | _BV(TWSTA)| _BV(TWEN) ;

                            ^

C:\Users\dp\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\libraries\Wire\src\utility\twi.c:426:40: error: 'TWEN' undeclared (first use in this function)

    TWCR = _BV(TWINT) | _BV(TWSTA)| _BV(TWEN) ;

                                        ^

exit status 1
Error compiling for board ATtiny.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
dprefont
 
Posts: 8
Joined: Fri Jan 06, 2017 1:39 pm


Return to AVR Microcontrollers

Who is online

Users browsing this forum: No registered users and 1 guest