0

Serial Error with ATTINY85?
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Serial Error with ATTINY85?

by ArtofWar on Thu Mar 16, 2017 7:29 pm

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

ArtofWar
 
Posts: 1
Joined: Thu Mar 16, 2017 6:58 pm

Re: Serial Error with ATTINY85?

by marke3 on Fri Mar 17, 2017 4:25 am

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.

marke3
 
Posts: 200
Joined: Sat Feb 08, 2014 5:24 pm

Please be positive and constructive with your questions and comments.