I have an attiny85-20pu (set to 1MHz) that i programmed with an arduino uno after installing Coding-Badley's tinycore1 GitHub - Coding-Badly/TinyCore1: Tiny Core 1 for Arudino 1.6
I have attatched a poorly drawn schematic of the circuit.
this is the sketch
int LED = 0;
int speakerpin = 1;
int i = 0;
void setup() {
pinMode(LED, OUTPUT);
}
void loop() {
tone(speakerpin, 2874, 200); //plays tone for 200ms
for (int i = 255; i > 0; i--) //start at full brightness then dim
{
analogWrite(LED, i);
delay(2);
}
delay (200);
}
It works perfectly fine on the arduino uno (diffrent pin numbers ofcourse) but when running on the attiny85 the tone is quieter and lower pitch. It beeps and the LEDs dim properly but then it beeps once more and the LEDs stay on at full brightness and it stays there.
video of it with an arduino uno arduino uno test
video with an attiny attiny test
