Hi there,
I was trying to upload to an attiny25v a sketch that I made when I got this error:
Sketch uses 2494 bytes (121%) of program storage space. Maximum is 2048 bytes.
Global variables use 144 bytes (112%) of dynamic memory, leaving -16 bytes for local variables. Maximum is 128 bytes.
Sketch too big; see http://www.arduino.cc/en/Guide/Troubleshooting#size for tips on reducing it.
But my sketch is quite small:
#include <SoftwareSerial.h>
int buttoncount = 0;
int buttonState = 0;
SoftwareSerial mySerial(4, 3);
void setup() {
// put your setup code here, to run once:
pinMode(0, INPUT);
mySerial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
buttonState = digitalRead(0);
if (buttonState == HIGH) {
buttoncount = buttoncount + 1;
delay(100);
}
if (mySerial.read() == "getcount") {
mySerial.print(buttoncount);
}
if (mySerial.read() == "reset") {
buttoncount = 0;
}
}
Why is my sketch too big to upload?
Thanks!