Why is tinkercad simulation showing incorrect header file

This is the code :-

#include <EEPROM.h>


#define LED_PIN 11
#define POTENTIOMETER_PIN A1

byte maxBrightness;

#define EEPROM_ADDRESS_MAX_INTENSITY 10

void setup(){
  Serial.begin(115200);
  Serial.setTimeout(10);
  pinMode(LED_PIN , OUTPUT);
  maxBrightness = EEPROM.read(EEPROM_ADDRESS_MAX_INTENSITY);
   if (maxBrightness == 0){
        maxBrightness = 255;     
      }
}

void loop(){
  if(Serial.available()  > 0){
    int data = Serial.parseInt();
    if((data >=0) && (data <256)){
      EEPROM.write(EEPROM_ADDRESS_MAX_INTENSITY , data);
      maxBrightness = data;
    }
  }
  byte LEDBrightness = annalogRead(POTENTIOMETER_PIN)/4 ;
  if (LEDBrightness > maxBrightness ){
     LEDBrightness = maxBrightness ; 
  }
  analogWrite( LED_PIN , LEDBrightness);
}

This is the header file:

What is wrong with it ?

Welcome to the forum.

Tinkercad is confused. When Tinkercad does not support a certain library, then it shows that message. With your sketch, it sees a bug and gives the wrong error message.

Tinkercad should have said: can not find function annalogRead

1 Like

ohk makes sense . Thank you so much for helping out . Appreciate it

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