Go Down

Topic: error compiling help (Read 491 times) previous topic - next topic

butterblah

I have been working on a project in my school's computer and the software worked find but when u trued to run it at my home it showed me this error:



C:\Users\igal\Documents\Arduino\libraries\sketch_mar21a\sketch_mar21a.ino:1:18: fatal error: init.h: No such file or directory

 #include <init.h>

                  ^

compilation terminated.

exit status 1
????? ?????????.



i tried uninstalling and reinstalling, and shutting off "real time protection" but it didnt work

GrooveFlotilla

And this is somehow a bootloader issue?

You didn't think we'd want to see the rest of the code?
Some people are like Slinkies.

Not really good for anything, but they bring a smile to your face when pushed down the stairs.

butterblah

And this is somehow a bootloader issue?

You didn't think we'd want to see the rest of the code?
Because the code did work in another computer like i said

but if u want, its pretty long:




#include <init.h>
bool _ABVAR_1_t= false ;
int _ABVAR_2_pot = 0 ;
double _ABVAR_3_hum = 0.0 ;
double _ABVAR_4_water = 0.0 ;
int _ABVAR_5_x = 0 ;
int _ABVAR_6_y = 0 ;

void setup()
{
 __init();
 lcd.setColor(Red);
 lcd.gotoxy(200,10);
 lcd.setFont(2);
 lcd.println("Mode:");

 lcd.setColor(Red);
 lcd.gotoxy(10,10);
 lcd.setFont(2);
 lcd.println("Water level:");

 lcd.setColor(Red);
 lcd.gotoxy(60,30);
 lcd.setFont(2);
 lcd.println("mm");

 lcd.setColor(Red);
 lcd.gotoxy(10,60);
 lcd.setFont(2);
 lcd.println("Humidity:");

 _ABVAR_1_t = true ;

}

void loop()
{
 _ABVAR_2_pot = ExtSensors.Read(2) ;
 _ABVAR_3_hum = ExtSensors.Read(1) ;
 _ABVAR_4_water = ExtSensors.Read(3) ;
 _ABVAR_5_x = lcdtouch.readx() ;
 _ABVAR_6_y = lcdtouch.ready() ;
 lcd.setColor(Red);
 lcd.gotoxy(10,30);
 lcd.setFont(2);
 lcd.println(( 255 - _ABVAR_4_water ));
 lcd.setColor(Red);
 lcd.gotoxy(10,80);
 lcd.setFont(2);
 lcd.println(_ABVAR_3_hum);
 if (( ( _ABVAR_2_pot ) < ( 100 ) ))
 {
   strip_A1.setPixelColor(1, strip_A1.Color(NEO_Red));
   strip_A1.show();
   strip_A1.setPixelColor(3, strip_A1.Color(NEO_black));
   strip_A1.show();
   strip_A1.setPixelColor(5, strip_A1.Color(NEO_black));
   strip_A1.show();
   lcd.setColor(Red);
   lcd.gotoxy(200,30);
   lcd.setFont(2);
   lcd.println("Off        1");
   lcd.fillRect(150,50,300,300,White);
 }
 else
 {
   if (( ( ( _ABVAR_2_pot ) > ( 100 ) ) && ( ( _ABVAR_2_pot ) < ( 200 ) ) ))
   {
     lcdtouch.readxy();
     strip_A1.setPixelColor(3, strip_A1.Color(NEO_Yellow));
     strip_A1.show();
     strip_A1.setPixelColor(1, strip_A1.Color(NEO_black));
     strip_A1.show();
     strip_A1.setPixelColor(5, strip_A1.Color(NEO_black));
     strip_A1.show();
     lcd.setColor(Red);
     lcd.gotoxy(200,30);
     lcd.setFont(2);
     lcd.println("Manual        1");
     lcd.drawRect(200,100,100,50,Red);
     if (( ( ( ( _ABVAR_5_x ) > ( 200 ) ) && ( ( _ABVAR_5_x ) < ( 300 ) ) ) && ( ( ( _ABVAR_6_y ) > ( 100 ) ) && ( ( _ABVAR_6_y ) < ( 150 ) ) ) ))
     {
       if (_ABVAR_1_t)
       {
         strip_A1.setPixelColor(9, strip_A1.Color(NEO_Blue));
         strip_A1.show();
         _ABVAR_1_t = false ;
       }
       else
       {
         strip_A1.setPixelColor(9, strip_A1.Color(NEO_black));
         strip_A1.show();
         _ABVAR_1_t = true ;
       }
     }
   }
   else
   {
     if (( ( ( _ABVAR_2_pot ) > ( 200 ) ) && ( ( _ABVAR_2_pot ) < ( 300 ) ) ))
     {
       strip_A1.setPixelColor(5, strip_A1.Color(NEO_Green));
       strip_A1.show();
       strip_A1.setPixelColor(1, strip_A1.Color(NEO_black));
       strip_A1.show();
       strip_A1.setPixelColor(3, strip_A1.Color(NEO_black));
       strip_A1.show();
       lcd.setColor(Red);
       lcd.gotoxy(200,30);
       lcd.setFont(2);
       lcd.println("Automatic         1");
       lcd.fillRect(150,50,300,300,White);
     }
   }
 }
 if (( ( _ABVAR_4_water ) > ( 250 ) ))
 {
   strip_A1.setPixelColor(0, strip_A1.Color(NEO_Red));
   strip_A1.show();
   lcd.setColor(Red);
   lcd.gotoxy(10,150);
   lcd.setFont(2);
   lcd.println("Add water!!");
 }
 else
 {
   strip_A1.setPixelColor(0, strip_A1.Color(NEO_black));
   strip_A1.show();
   lcd.setColor(Red);
   lcd.gotoxy(-10,150);
   lcd.setFont(2);
   lcd.println("1                                                                                1");
 }
}

GrooveFlotilla

OK, so where did you put "init.h"?

Why didn't you use code tags?
Some people are like Slinkies.

Not really good for anything, but they bring a smile to your face when pushed down the stairs.

butterblah

The code isnt the problem

GrooveFlotilla

The code isnt the problem
If the code doesn't compile, then in my experience, the code is the problem.
The compiler has told you, in pretty unequivocal terms, that it can't find init.h.
Some people are like Slinkies.

Not really good for anything, but they bring a smile to your face when pushed down the stairs.

butterblah

I figured it out.. thanks anyway
closed

Go Up