정보나눔

오픈소스하드웨어 프로젝트에 대한 다양한 정보를 나누는 공간입니다.

exit status 1 보드 Arduino/Genuino Uno 컴파일 에러.
다니엘 | 2019-06-09

water flow meter 기 만들다가 컴파일 에러가 났습니다. 한번만 봐주세요 ㅠㅠ

 

#include  
#include

LiquidCrystal_I2C lcd(0x27,20,4);
int X;
int Y;
float Time = 0;
float frequency = 0;
float waterFlow = 0;
float total = 0;
float LS = 0;
const int input = A0;
const int test = 9;

void setup() {
  // put your setup code here, to run once:
Serial.begin(9600);
lcd.begin(16, 2);
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Water Flow Meter");
lcd.setCursor(0,1);
lcd.print("****************");
delay(2000);
pinMode(input,INPUT);
pinMode(test, OUTPUT);
analogWrite(test,100);
}

void loop() {
  // put your main code here, to run repeatedly:
X = pulseIn(input, HIGH);
Y = pulseIn(input, LOW);
Time = X + Y;
frequency = 1000000/Time;
waterFlow = frequency/7.5;
LS = waterFlow/60;
if(frequency >= 0)
{
if(isinf(frequency))
{
lcd.clear();
lcd.setCursor(0,0);
lcd.print("L/Min: 0.00");
lcd.setCursor(0,1);
lcd.print("Total: ");
lcd.print(total);
lcd.print(" L");
}
else
{
total = total + LS;
Serial.println(frequency);
lcd.clear();
lcd.setCursor(0,0);
lcd.print("L/Min: ");
lcd.print(waterFlow);
lcd.setCursor(0,1);
lcd.print("Total: ");
lcd.print(total);
lcd.print(" L");
}
}
delay(1000);
}

 

C:\Users\Admin\Desktop\sketch_jun09a\sketch_jun09a.ino:4:32: warning: invalid conversion from 'int' to 't_backlightPol' [-fpermissive]

 LiquidCrystal_I2C lcd(0x27,20,4);

                                ^

In file included from C:\Users\Admin\Desktop\sketch_jun09a\sketch_jun09a.ino:2:0:

C:\Users\Admin\Documents\Arduino\libraries\NewLiquidCrystal_lib/LiquidCrystal_I2C.h:65:4: note:   initializing argument 3 of 'LiquidCrystal_I2C::LiquidCrystal_I2C(uint8_t, uint8_t, t_backlightPol)'

    LiquidCrystal_I2C (uint8_t lcd_Addr, uint8_t backlighPin, t_backlightPol pol);

    ^

In function 'global constructors keyed to 65535_0_sketch_jun09a.ino.cpp.o':

lto1.exe: internal compiler error: Segmentation fault

Please submit a full bug report,

with preprocessed source if appropriate.

See <http://gcc.gnu.org/bugs.html> for instructions.

lto-wrapper.exe: fatal error: C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.21.0_x86__mdqgnx93n4wtt\hardware\tools\avr/bin/avr-gcc returned 1 exit status

compilation terminated.

c:/program files/windowsapps/arduinollc.arduinoide_1.8.21.0_x86__mdqgnx93n4wtt/hardware/tools/avr/bin/../lib/gcc/avr/5.4.0/../../../../avr/bin/ld.exe: error: lto-wrapper failed

collect2.exe: error: ld returned 1 exit status

exit status 1
보드 Arduino/Genuino Uno 컴파일 에러.

이전글   |    버튼을 눌렀을때 대략 5초동안 DC모터를 동작시켰다가 멈추고 싶은데 어떤 함수를 사용해야 ... 2019-06-09
다음글   |    아두이노 로라 초소형 제품 질문드립니다.... 2019-06-10