What settings do I need to use for the ATtiny Core?
I know I need:
Board: ATtiny 25/45/85
But what about all the other settings?
I get this error for my code:
(code):
#include "Adafruit_VL53L0X.h"
Adafruit_VL53L0X lox = Adafruit_VL53L0X();
int pin = 3;
void setup() {
pinMode(pin, OUTPUT);
//Serial.begin(115200);
// wait until serial port opens for native USB devices
//while (! Serial) {
// delay(1);
//}
//Serial.println("Adafruit VL53L0X test");
//if (!lox.begin()) {
// Serial.println(F("Failed to boot VL53L0X"));
// while(1);
//}
// power
//Serial.println(F("VL53L0X API Simple Ranging example\n\n"));
}
void loop() {
VL53L0X_RangingMeasurementData_t measure;
//Serial.print("Reading a measurement... ");
lox.rangingTest(&measure, false); // pass in 'true' to get debug data printout!
if (measure.RangeMilliMeter < 50){
digitalWrite(pin, HIGH);
delay(1);
digitalWrite(pin,LOW);
}
//if (measure.RangeStatus != 4) { // phase failures have incorrect data
//Serial.print("Distance (mm): "); Serial.println(measure.RangeMilliMeter);
//} //else {
//Serial.println(" out of range ");
//}
delay(1);
}
But this error:
~~~
**Arduino: 1.8.5 (Windows 8.1), Board: "ATtiny25/45/85, Disabled, CPU, ATtiny85, 1 MHz (internal), EEPROM retained, B.O.D. Disabled"
Build options changed, rebuilding all
Archiving built core (caching) in: C:\Users\Tiernan\AppData\Local\Temp\arduino_cache_140639\core\core_ATTinyCore_avr_attinyx5_LTO_disable,TimerClockSource_default,chip_85,clock_1internal,eesave_aenable,bod_disable_b1aba50921474f5ec00c001d6108c665.a
c:/program files (x86)/arduino/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ld.exe: C:\Users\Tiernan\AppData\Local\Temp\arduino_build_645164/TinyDISTANCE.ino.elf section .text' will not fit in region text'
c:/program files (x86)/arduino/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ld.exe: region `text' overflowed by 3586 bytes
collect2.exe: error: ld returned 1 exit status
exit status 1
Error compiling for board ATtiny25/45/85.
Invalid library found in C:\Users\Tiernan\Documents\Arduino\libraries\usbtinyisp_libusb_1.2.6.0: C:\Users\Tiernan\Documents\Arduino\libraries\usbtinyisp_libusb_1.2.6.0
Invalid library found in C:\Users\Tiernan\Documents\Arduino\libraries\usbtinyisp_libusb_1.2.6.0: C:\Users\Tiernan\Documents\Arduino\libraries\usbtinyisp_libusb_1.2.6.0
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.**
~~~