Serial Error with ATTINY85?

USB AVR Programmer and SPI interface. Adafruit's USBtinyISP.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
ArtofWar
 
Posts: 1
Joined: Thu Mar 16, 2017 6:58 pm

Serial Error with ATTINY85?

Post by ArtofWar »

I brought this Proximity Sensor from AdaFruit
https://github.com/adafruit/Adafruit_VCNL4010
..and got with working with the Uno R.3 with the example code that was provided. But when I try to run it on ATTINY85 I'm getting this error.

{
C:\Users\Terry\AppData\Local\Temp\arduino_modified_sketch_791563\ArduinoISP.ino: In function 'void loop()':

ArduinoISP:24: error: 'Serial' was not declared in this scope

Serial.print("Ambient: "); Serial.println(vcnl.readAmbient());

^

exit status 1
'Serial' was not declared in this scope
}

What do i need to do to get this to work. Thanks

User avatar
marke3
 
Posts: 205
Joined: Sat Feb 08, 2014 5:24 pm

Re: Serial Error with ATTINY85?

Post by marke3 »

The Attiny85 doesn't have hardware serial so you will need to use a software serial library or an I2C display to replace the outputs using "serial.****" in the example sketch.

Locked
Please be positive and constructive with your questions and comments.

Return to “USBtinyISP”