Avrdude: WARNING: invalid value for unused bits in fuse "fuse5"

Hi, I just bought Arduino and tried for the first time run sketch, but it doesn't work. LED is blinking just for 2 times and that's it(as I understand, it should blinking every 0.5 sec). Also I've got an error(attached below), but I can't find any info on Internet about those warning.

I use:
Arduino Uno WiFi Rev2
Arduino IDE 1.8.10

In Tools->Board settings I have chosen: Arduino Uno WiFi Rev2
In Tools->Register Emulation: ATMEGA328(but I tried chose "None", it doesn't work).
In Tools->Port: Com5 (Arduino Uno WiFi Rev2)

All above settings were automatically set.

Here is code that I try to Upload on board:

void setup() {
  pinMode(13, 1); 
}

void loop() {
  // put your main code here, to run repeatedly:
  digitalWrite(13, 1);  
  delay(1500);              
  digitalWrite(13, 0);    
  delay(500); 
}

WARNING that I get after clicking "Upload":

Sketch uses 1374 bytes (2%) of program storage space. Maximum is 48640 bytes.
Global variables use 22 bytes (0%) of dynamic memory, leaving 6122 bytes for local variables. Maximum is 6144 bytes.
avrdude: WARNING: invalid value for unused bits in fuse "fuse5", should be set to 1 according to datasheet
This behaviour is deprecated and will result in an error in future version
You probably want to use 0xcd instead of 0xc9 (double check with your datasheet first).

Could somebody help me to fix it?

This is a warning, not an error. The clue is the part where it says "WARNING". Please ignore this warning. It is normal and expected and doesn't indicate any problem.

The real problem is that you're assuming the builtin LED is on pin 13. That's true with the original Uno, but not on the Uno WiFi Rev2. The Uno WiFi Rev2 had a dedicated pin connected to the built-in LED. That is pin 25, but you don't need to know that. You can just use the LED_BUILTIN pin name. And while you're at it, use the dang pin mode and pin state names too. They will make your code much easier to understand:

void setup() {
  pinMode(LED_BUILTIN, OUTPUT);
}

void loop() {
  // put your main code here, to run repeatedly:
  digitalWrite(LED_BUILTIN, HIGH); 
  delay(1500);             
  digitalWrite(LED_BUILTIN, LOW);   
  delay(500);
}
4 Likes

Oh, it works. Thank you for your quick and clear reply!

You're welcome. I'm glad to hear it's working now. Enjoy!
Per

Thanks a lot 4 me too.. but.. only a question... is there a solution to delete the "WARINING" (in a program way)?

with the rev2 you get a 3 color LED that you can play with. I threw in some stuff like
int green = 26;
int red = 25;
int blue = 27;
int LEDCase = 0;
int LEDBrightness = 1;

void LEDUpdate() {
if (millis() > LEDTime) {
LEDTime += LEDInterval;
switch (LEDCase) {
case 0:
WiFiDrv::analogWrite(red, LEDBrightness);
break;
case 1:
WiFiDrv::analogWrite(green, LEDBrightness);
break;
case 2:
WiFiDrv::analogWrite(blue, LEDBrightness);
break;
case 3:
WiFiDrv::analogWrite(red, LEDBrightness);
WiFiDrv::analogWrite(blue, LEDBrightness);
break;
case 4:
WiFiDrv::analogWrite(blue, LEDBrightness);
WiFiDrv::analogWrite(green, LEDBrightness);
break;
case 5:
WiFiDrv::analogWrite(green, LEDBrightness);
WiFiDrv::analogWrite(red, LEDBrightness);
break;
case 6:
WiFiDrv::analogWrite(red, LEDBrightness);
WiFiDrv::analogWrite(blue, LEDBrightness);
WiFiDrv::analogWrite(green, LEDBrightness);
}
if (Reverse) {
LEDBrightness -= 1;
if (LEDBrightness == 0) {
Reverse = false;
LEDCase += 1;
if (LEDCase > 6 || !WiFiTimeOk) {
LEDCase = 0;
}
}
}
else {
LEDBrightness += 1;
if (LEDBrightness == 30) {
Reverse = true;
}
}
}
}

to make it breathe. then it will fix on red if there is a time problem. I should add other rules.

it is a board with lots of features, but has been the hardest for me to get working reliably. It often quits for no apparent reason. the esp8266 is 10% the price and not that bad.

1 Like

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.