Skip to main content
Removed from Network Questions by Juraj
Became Hot Network Question
Rewording. Code formatting and fixed some minor typos. Removed fluff and thanks. Broke up wall of text. Added image hover tags.
Source Link
Greenonline
  • 3.2k
  • 7
  • 37
  • 49

Why I'm When using LiquidCrystal_I2C.h library, why am I getting "invalid header file" in TinkerCad? - When using LiquidCrystal_I2C.h library

LinkThis is a link to the guy that made itthe project work, it seems that I'm unable to make it work by myself. :  the project What.

What am I doing wrong? HARDWARE

SCHEMEHardware

Schematic diagram

Error:"invalid header file"

invalid header file 

howHow the SM output should look with LCD without I2C  :not the build shown in the post!

this may be insufficient information, if that is so then please tell me what info to addSM output - Not the build shown in the post!

Thank y'all

Ancillary information

(unimportant to the issue) 

BTW the code is for measuring water level and displaying it on the display. After I buy the hardware and when it finally ships, I will add ALOTa lot more (requiring MEGA2560 or even DUE)- more

More complex: It will measure the water level and the temp of the surroundings(maybe even the water itself). It will turn on/off the Water pump using my fathers scheme for turning big relay on/off with two buttons but instead of buttons I will use smaller relays for automatization.I will insure that it doesnt malfunction with the arduino-off state being 0 for the pump and 2 pairs of electrodes or sum mounted on the top of the water tank.- when they complete the circuit because of unpredicted water level the program will stop the pump. I will need to measure and convert the readings like 60 times(add x liters of water = y meter increase) because the water tank is positioned horizontally so the calculations would be difficult. I will need to create a website or sum and send the data to it -(W5500) , log of time-(RTC DS3231 I2C ). Plus alot more.

If I find no solution I will probably have to start programming it raw earlier than I expected, It's just that everyday I find better components and more to use in my project, i will either wait and order once || not wait and order multiple times. And with that all I'm sure I will still probably regret my purchases

sorry if this is a mess, I'm probably just procrastinating writing this so I sped it up.

Thank you all in advance.

  • new here so if somthing is wrong here then tell me

Why I'm getting "invalid header file" in TinkerCad? - When using LiquidCrystal_I2C.h library

Link to the guy that made it work, it seems that I'm unable to make it work by myself. :the project What am I doing wrong? HARDWARE

SCHEME

Error:"invalid header file"

how the SM output should look with LCD without I2C  :not the build shown in the post!

this may be insufficient information, if that is so then please tell me what info to add

Thank y'all

(unimportant to the issue) BTW the code is for measuring water level and displaying it on the display. After I buy the hardware and when it finally ships, I will add ALOT more (requiring MEGA2560 or even DUE)- more complex: It will measure the water level and the temp of the surroundings(maybe even the water itself). It will turn on/off the Water pump using my fathers scheme for turning big relay on/off with two buttons but instead of buttons I will use smaller relays for automatization.I will insure that it doesnt malfunction with the arduino-off state being 0 for the pump and 2 pairs of electrodes or sum mounted on the top of the water tank.- when they complete the circuit because of unpredicted water level the program will stop the pump. I will need to measure and convert the readings like 60 times(add x liters of water = y meter increase) because the water tank is positioned horizontally so the calculations would be difficult. I will need to create a website or sum and send the data to it -(W5500) , log of time-(RTC DS3231 I2C ). Plus alot more.

If I find no solution I will probably have to start programming it raw earlier than I expected, It's just that everyday I find better components and more to use in my project, i will either wait and order once || not wait and order multiple times. And with that all I'm sure I will still probably regret my purchases

sorry if this is a mess, I'm probably just procrastinating writing this so I sped it up.

Thank you all in advance.

  • new here so if somthing is wrong here then tell me

When using LiquidCrystal_I2C.h library, why am I getting "invalid header file" in TinkerCad?

This is a link to the guy that made the project work, it seems that I'm unable to make it work by myself:  the project.

What am I doing wrong?

Hardware

Schematic diagram

Error:

invalid header file 

How the SM output should look with LCD without I2C:

SM output - Not the build shown in the post!

Ancillary information

(unimportant to the issue) 

BTW the code is for measuring water level and displaying it on the display. After I buy the hardware and when it finally ships, I will add a lot more (requiring MEGA2560 or even DUE)-

More complex: It will measure the water level and the temp of the surroundings(maybe even the water itself). It will turn on/off the Water pump using my fathers scheme for turning big relay on/off with two buttons but instead of buttons I will use smaller relays for automatization.I will insure that it doesnt malfunction with the arduino-off state being 0 for the pump and 2 pairs of electrodes or sum mounted on the top of the water tank.- when they complete the circuit because of unpredicted water level the program will stop the pump. I will need to measure and convert the readings like 60 times(add x liters of water = y meter increase) because the water tank is positioned horizontally so the calculations would be difficult. I will need to create a website or sum and send the data to it -(W5500) , log of time-(RTC DS3231 I2C ). Plus alot more.

If I find no solution I will probably have to start programming it raw earlier than I expected, It's just that everyday I find better components and more to use in my project, i will either wait and order once || not wait and order multiple times. And with that all I'm sure I will still probably regret my purchases

Source Link

Why I'm getting "invalid header file" in TinkerCad? - When using LiquidCrystal_I2C.h library

Link to the guy that made it work, it seems that I'm unable to make it work by myself. :the project What am I doing wrong? HARDWARE

SCHEME

 /* DICTIONARY - CC = ConClusion ; */ /* LEGEND - Serial legend - */ /* README - */ #define TRIG 7 #define ECHO 8 #define PB_1 2 #include <LiquidCrystal_I2C.h> #include <Wire.h> LiquidCrystal_I2C lcd(0x27,16,2); uint32_t loop_count = 0; long duration; int distance; volatile byte LCD_State = 0; unsigned long lastChange; void setup() { pinMode(TRIG,OUTPUT); pinMode(ECHO,INPUT); Serial.begin(115200); attachInterrupt(digitalPinToInterrupt(PB_1),LCD_to_ON,RISING); lcd.begin(); lcd.backlight(); } void loop() { loop_count++; if (LCD_State == 1 && (millis() - lastChange) >= 600000/*time corresponding to LCD Screens ON-time, CC=changable*/ ) { LCD_State = 0; } Serial.print(loop_count); Serial.print(" "); Serial.print(":"); Serial.print(" "); digitalWrite(TRIG, LOW); delayMicroseconds(2); digitalWrite(TRIG, HIGH); delayMicroseconds(10); digitalWrite(TRIG, LOW); duration = pulseIn(ECHO, HIGH); distance = duration * 0.034 / 2; Serial.print(distance); Serial.print(" "); if(LCD_State == 0) { Serial.print(LCD_State); } else if(LCD_State == 1) { Serial.print(LCD_State); } Serial.print(" "); Serial.print(millis()); Serial.print(" "); Serial.print(lastChange); Serial.print(" "); if(LCD_State == 1) { Serial.print("OK, L_ON"); } else if(LCD_State == 0) { Serial.print("OK, L_OFF"); } Serial.println(); delay(10);//Just for the TINKERCAD, remove from hardware-based version } void LCD_to_ON() { LCD_State = 1; lastChange = millis(); } 

Error:"invalid header file"

how the SM output should look with LCD without I2C :not the build shown in the post!

this may be insufficient information, if that is so then please tell me what info to add

Thank y'all

(unimportant to the issue) BTW the code is for measuring water level and displaying it on the display. After I buy the hardware and when it finally ships, I will add ALOT more (requiring MEGA2560 or even DUE)- more complex: It will measure the water level and the temp of the surroundings(maybe even the water itself). It will turn on/off the Water pump using my fathers scheme for turning big relay on/off with two buttons but instead of buttons I will use smaller relays for automatization.I will insure that it doesnt malfunction with the arduino-off state being 0 for the pump and 2 pairs of electrodes or sum mounted on the top of the water tank.- when they complete the circuit because of unpredicted water level the program will stop the pump. I will need to measure and convert the readings like 60 times(add x liters of water = y meter increase) because the water tank is positioned horizontally so the calculations would be difficult. I will need to create a website or sum and send the data to it -(W5500) , log of time-(RTC DS3231 I2C ). Plus alot more.

If I find no solution I will probably have to start programming it raw earlier than I expected, It's just that everyday I find better components and more to use in my project, i will either wait and order once || not wait and order multiple times. And with that all I'm sure I will still probably regret my purchases

sorry if this is a mess, I'm probably just procrastinating writing this so I sped it up.

Thank you all in advance.

  • new here so if somthing is wrong here then tell me