그리고 계속 LCD에 빨간색 불이 켜집니다.
코코아팹은 누구나 창의적 아이디어를 현실로 만들어 낼 수 있도록
만들고, 공유하고, 배울 수 있는 터전이
되고자 합니다.
아이디와 비밀번호를 잊으셨나요?아이디 / 비밀번호 찾기
코코아팹 회원이 아니신가요? 회원가입
2018-03-30 14:50:13
봄, 가을의 불청객! 바로 미세먼지!
요즘 미세먼지가 연일 화제가 되고 있습니다.
<출처 : JTBC>
<출처 : 연합뉴스>
그렇다면 우리의 건강을 위협하는 미세먼지의 존재는 무엇일까요?
아주 작은 입자를 가진 먼지로서 먼지의 직경에 따라 미세먼지(지름이 10㎛이하), 초미세먼지(지름이 2.5㎛ 이하)로 구분된다.
미세먼지는 입자가 작기 때문에 폐에 축적되기도 하지만, 페포를 통과해 혈액 속으로 들어가기 때문에 여러가지 복합적 질병을 유발할 수 있다.
<출처 : 건강한 꿀팁>
위와 같이 미세먼지는 인체에 굉장히 유해한 물질임에도 불구하고, 많은 분들께서
그 위험도를 피부로 느끼지 못하고 있습니다.
이유는 '눈에 잘 보이지 않고, 직관적으로 현재의 상태를 확인할 수 없기' 때문이죠.
현재 내가 있는 공간에 미세먼지의 양을 눈으로 확인할 수 있다면, 조금 더 미세먼지에 대한 건강 관리가 가능할 것입니다.
자 그럼 직접 미세먼지측정기를 만들어 보도록 할까요?
MDF 외관과 아크릴로 구성되어 있는 아기자기한, 코코아팹의 감성이 담겨있는 미세먼지 측정기의 모습입니다.
그렇다면 미세먼지 측정기는 어떤 기능을 가지고 있을까요? :)
(궁금 궁금)
- 미세먼지센서 : 초미세먼지(지름이 2.5㎛ 이하) 센서로서 미세먼지의 농도를 측정합니다.
- 온·습도 센서 : 온도와 습도를 측정합니다.
- RGB LED : 미세먼지농도량 또는 불쾌지수 단계 등 여러정보를 LED의 색으로 표현합니다.
- LCD : 센서에서 측정된 정확한 수치 정보를 표시합니다.
미세먼지측정기에 사용되는 부품의 목록은 아래와 같습니다.
NO | 부품명 | 수량 | 상세 설명 |
1 | 오렌지보드 | 1 | 아두이노 UNO |
2 | 미세먼지센서 | 1 | Sharp / GP2Y1010AU0F |
3 | RGB LED 모듈 | 1 | KY-016 |
4 | 온·습도 센서 모듈 | 1 | DHT-11 |
5 | LCD | 1 | I2C Interface / 16*2 |
6 | 브레드보드 | 1 | Mini |
7 | 점퍼케이블 | 20 | F/F, F/M |
부품명 | 오렌지보드 | 미세먼지센서 | RGB LED 모듈 | 온·습도 센서 모듈 | LCD |
부품 사진 | ![]() |
![]() |
![]() |
![]() |
![]() |
<이것만 확인해봅시다>
- 미세먼지센서의 회로 연결에서 실수 발생률이 가장 높습니다. 선 연결을 잘 확인하세요!
- 온·습도 센서의 경우 전원을 잘못 연결하면 소자가 잘 녹아버립니다. +, - 전원이 잘 연결되었는지 확인하세요!
<온습도 센서 종류에 따른 연결 방법>
키트의 온습도 센서 모듈의 종류를 잘 확인한 후 핀 연결 방법을 잘 확인해주세요!
오렌지보드에 업로드되는 소스 코드입니다.
링크를 통해 소스 코드를 다운로드 받아주세요.
* 어떻게 업로드를 시켜할지 잘 모르시겠다구요?
아직 아두이노 IDE와 업로드 방법에 대해 모르시는 분들은 아래 링크에 '아두이노 소개' 부분을 읽고 따라해보세요!
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
|
#include "LiquidCrystal_I2C.h"
#include "DHT.h"
#include "emotion.h"
#include "PMsensor.h"
#define sensitivity 0.1 //먼지 센서의 민감도 수치
//민감도의 숫자가 클 경우 : 센서 값의 변화가 민감함
//민감도의 숫자가 작을 경우 : 센서 값의 변화가 둔함
#define DHTPIN 6 // 온습도센서 핀 번호
#define DHTTYPE DHT11
const int sensorPin = A0;
const int sensorLED = 3;
PMsensor PM;
LiquidCrystal_I2C lcd(LCD 이름, 16, 2);
//LCD 이름 : 0x27 또는 0x3F 입력
DHT dht(DHTPIN, DHTTYPE);
////////////////////////측정값에 따른 이모티콘, LED 세팅///////////////////////////
void setEmoticon(float data) {
if (data > 100) { //Worst. 80 < data, Red LED
lcd.createChar(4, topAngry1);
lcd.createChar(5, topAngry2);
lcd.createChar(6, bottomAngry1);
lcd.createChar(7, bottomAngry2);
digitalWrite(9, HIGH);
digitalWrite(10, LOW);
digitalWrite(11, LOW);
}
else if (data > 50) { //Normal. 30 < data < 80, Yellow LED
lcd.createChar(4, topSoSo1);
lcd.createChar(5, topSoSo2);
lcd.createChar(6, bottomSoSo1);
lcd.createChar(7, bottomSoSo2);
digitalWrite(9, HIGH);
digitalWrite(10, HIGH);
digitalWrite(11, LOW);
}
else { //Good. data < 30, Green LED
lcd.createChar(4, topSmile1);
lcd.createChar(5, topSmile2);
lcd.createChar(6, bottomSmile1);
lcd.createChar(7, bottomSmile2);
digitalWrite(9, LOW);
digitalWrite(10, HIGH);
digitalWrite(11, LOW);
}
}
void setup() {
lcd.init();
lcd.backlight();
lcd.createChar((byte)0, temp);
lcd.createChar(1, humi);
lcd.createChar(2, dust);
lcd.createChar(3, C);
pinMode(9, OUTPUT);
pinMode(10, OUTPUT);
pinMode(11, OUTPUT);
Serial.begin(9600);
/////(infrared LED pin, sensor pin) /////
PM.init(sensorLED, sensorPin);
}
void loop() {
byte temp = dht.readTemperature();
byte humi = dht.readHumidity();
if (isnan(humi) || isnan(temp) ) {
Serial.println("Failed to read from DHT sensor!");
return;
}
float data = 0;
int err = PMsensorErrSuccess;
if ((err = PM.read(&data, true, sensitivity)) != PMsensorErrSuccess) {
Serial.print("data Error = ");
Serial.println(err);
delay(1500);
return;
}
Serial.println(data);
delay(1500);
setEmoticon(data);
//----------------------------------------------------LCD 출력----------------------------------------------------//
lcd.setCursor(0, 0);
lcd.write(2);
lcd.print(" ");
lcd.print(data);
if (data > 100) {
lcd.print("ug");
}
else if (data > 10) {
lcd.print(" ug");
}
else {
lcd.print(" ug ");
}
lcd.setCursor(0, 1);
lcd.write((byte)0);
lcd.print(" ");
lcd.print((int)temp);
lcd.write(3);
lcd.print(" ");
lcd.write(1);
lcd.print(" ");
lcd.print((int)humi);
lcd.print("%");
lcd.setCursor(13, 0);
lcd.write(4);
lcd.write(5);
lcd.setCursor(13, 1);
lcd.write(6);
lcd.write(7);
}
|
하드웨어(HW)와 소프트웨어(SW)가 완성되었으니 이제 외관을 제작할 차례입니다.
미세먼지측정기의 외관 제작에 대해 알아볼까요?
※ 조립 가이드에서 사용되는 볼트와 너트의 명칭입니다. 사진을 통해 모양을 잘 숙지해주세요.
미세먼지측정기의 완성 모습입니다.
어느곳에나 잘 어울리는 감성 뿜뿜!! 미세먼지측정기!! :)
미세먼지 측정기의 작동 영상입니다.
먼지의 양에 따라 미세먼지의 농도가 다르게 측정되는 것을 확인할 수 있습니다.
이외에도 Co2 센서, 가스 센서 등 다양한 센서들을 확장 연결한다면, 다양한 환경 데이터를 한 번에 측정해 볼 수 있겠죠?
#생생병맛리뷰 #평화로운코코아팹
Q1. LCD가 잘 나오지 않습니다. 무슨 문제일까요?
A1. LCD에는 I2C 주소가 존재합니다 -> LiquidCrystal_I2C lcd(LCD 이름, 16, 2);.
0x27 또는 0x3F로 주소를 바꿔서 테스트를 해보시고, LCD 뒷면에 가변 저항을 통해 선명도를 조절해보세요.
Q2. 인터넷에서 검색되는 초미세먼지의 농도와 미세먼지측정기 기트에서 측정되는 농도가 달라요.
A2. 인터넷에서 검색되는 미세먼지는 기상청 또는 환경부에서 측정된 시간별 평균 수치입니다. 기상청에서 사용되는 미세 먼지 측정 장비는 고가의 장비입니다. 미세먼지측정기에 사용되는 미세먼지센서는 DIY용 센서로서 전문 장비와 단순 데이터를 비교하는 것은 무리가 있으며, 주변 환경에 따라 미세먼지농도의 변화량을 확인하기에 적절한 성능을 가지고 있습니다.
Klant
kocoafabeditor 2018-05-31 17:52:54
안녕하세요. 코코아팹입니다.
위에 발생한 에러는 LiquidCrystal_I2C 라이브러리가 설치되지 않아서 발생하는 에러입니다.
맨 위 메뉴바에 있는 [스케치 -> 라이브러리 포함하기 -> 라이브러리 관리] 로 들어가셔서 LiquidCrystal_I2C 로 검색하시면 결과가 쭉 나오는데요.
스크롤을 맨 밑으로 내린 후 밑에서 3번째 보시면 LiquidCrystal_I2C by Frank de Brabander 라고 있습니다.
이것을 선택 하신 후에 설치를 눌러주신 후 다시 업로드 해보시면 될 것 같습니다.
감사합니다.
운영자님! 감사합니다. 그런데요,
말씀하신대로 라이브러리에 포함하였는데 계속 이렇게 뜨네요..ㅠㅠC:\Users\lenovo\AppData\Local\Temp\arduino_modified_sketch_748762\sketch_may31e.ino:1:31: fatal error: LiquidCrystal_I2C.h: No such file or directory
#include
^
compilation terminated.
exit status 1
보드 Arduino/Genuino Uno 컴파일 에러.
소스코드
#include
#include
#include "emotion.h"
#include
#define sensitivity 0.1 //먼지 센서의 민감도 수치
const int sensorPin = A0; // 미세먼지 센서 핀
const int sensorLED = 3; //미세먼지 센서 LED
int pinDHT11 = 6;
PMsensor PM;
LiquidCrystal_I2C lcd(0x3F, 16, 2);
SimpleDHT11 dht11;
////////////////////////측정값에 따른 이모티콘, LED 세팅///////////////////////////
void setEmoticon(float data) {
if (data > 100) { //Worst. 80 < data, Red LED
lcd.createChar(4, topAngry1);
lcd.createChar(5, topAngry2);
lcd.createChar(6, bottomAngry1);
lcd.createChar(7, bottomAngry2);
digitalWrite(9, HIGH);
digitalWrite(10, LOW);
digitalWrite(11, LOW);
}
else if (data > 50) { //Normal. 30 < data < 80, Yellow LED
lcd.createChar(4, topSoSo1);
lcd.createChar(5, topSoSo2);
lcd.createChar(6, bottomSoSo1);
lcd.createChar(7, bottomSoSo2);
digitalWrite(9, HIGH);
digitalWrite(10, HIGH);
digitalWrite(11, LOW);
}
else { //Good. data < 30, Green LED
lcd.createChar(4, topSmile1);
lcd.createChar(5, topSmile2);
lcd.createChar(6, bottomSmile1);
lcd.createChar(7, bottomSmile2);
digitalWrite(9, LOW);
digitalWrite(10, HIGH);
digitalWrite(11, LOW);
}
}
void setup() {
lcd.init();
lcd.backlight();
lcd.createChar((byte)0, temp);
lcd.createChar(1, humi);
lcd.createChar(2, dust);
lcd.createChar(3, C);
pinMode(9, OUTPUT);
pinMode(10, OUTPUT);
pinMode(11, OUTPUT);
Serial.begin(9600);
/////(infrared LED pin, sensor pin) /////
PM.init(sensorLED, sensorPin);
}
void loop() {
byte temp = 0;
byte humi = 0;
dht11.read(pinDHT11, &temp, &humi, NULL);
float data = 0;
int err = PMsensorErrSuccess;
if ((err = PM.read(&data, true, sensitivity)) != PMsensorErrSuccess) {
Serial.print("data Error = ");
Serial.println(err);
delay(1500);
return;
}
Serial.println(data);
delay(1500);
setEmoticon(data);
//----------------------------------------------------LCD 출력----------------------------------------------------//
lcd.setCursor(0, 0);
lcd.write(2);
lcd.print(" ");
lcd.print(data);
if (data > 100) {
lcd.print("ug");
}
else if (data > 10) {
lcd.print(" ug");
}
else {
lcd.print(" ug ");
}
lcd.setCursor(0, 1);
lcd.write((byte)0);
lcd.print(" ");
lcd.print((int)temp);
lcd.write(3);
lcd.print(" ");
lcd.write(1);
lcd.print(" ");
lcd.print((int)humi);
lcd.print("%");
lcd.setCursor(13, 0);
lcd.write(4);
lcd.write(5);
lcd.setCursor(13, 1);
lcd.write(6);
lcd.write(7);
}
C:\Program Files\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files\Arduino\hardware -tools C:\Program Files\Arduino\tools-builder -tools C:\Program Files\Arduino\hardware\tools\avr -built-in-libraries C:\Program Files\Arduino\libraries -libraries C:\Users\lenovo\U+ C11C U+ B2F4 U+ B355\Documents\Arduino\libraries -fqbn=arduino:avr:uno -ide-version=10805 -build-path C:\Users\lenovo\AppData\Local\Temp\arduino_build_93356 -warnings=all -build-cache C:\Users\lenovo\AppData\Local\Temp\arduino_cache_258772 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=C:\Program Files\Arduino\hardware\tools\avr -prefs=runtime.tools.arduinoOTA.path=C:\Program Files\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude.path=C:\Program Files\Arduino\hardware\tools\avr -verbose C:\Users\lenovo\U+ C11C U+ B2F4 U+ B355\Documents\Arduino\sketch_may31a\sketch_may31a.ino
C:\Program Files\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files\Arduino\hardware -tools C:\Program Files\Arduino\tools-builder -tools C:\Program Files\Arduino\hardware\tools\avr -built-in-libraries C:\Program Files\Arduino\libraries -libraries C:\Users\lenovo\U+ C11C U+ B2F4 U+ B355\Documents\Arduino\libraries -fqbn=arduino:avr:uno -ide-version=10805 -build-path C:\Users\lenovo\AppData\Local\Temp\arduino_build_93356 -warnings=all -build-cache C:\Users\lenovo\AppData\Local\Temp\arduino_cache_258772 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=C:\Program Files\Arduino\hardware\tools\avr -prefs=runtime.tools.arduinoOTA.path=C:\Program Files\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude.path=C:\Program Files\Arduino\hardware\tools\avr -verbose C:\Users\lenovo\U+ C11C U+ B2F4 U+ B355\Documents\Arduino\sketch_may31a\sketch_may31a.ino
Using board 'uno' from platform in folder: C:\Program Files\Arduino\hardware\arduino\avr
Using core 'arduino' from platform in folder: C:\Program Files\Arduino\hardware\arduino\avr
Detecting libraries used...
"C:\Program Files\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10805 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Program Files\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files\Arduino\hardware\arduino\avr\variants\standard" "C:\Users\lenovo\AppData\Local\Temp\arduino_build_93356\sketch\sketch_may31a.ino.cpp" -o "nul"
"C:\Program Files\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10805 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Program Files\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files\Arduino\hardware\arduino\avr\variants\standard" "-IC:\Users\lenovo\U+ C11C U+ B2F4 U+ B355\Documents\Arduino\libraries\LiquidCrystal_I2C" "C:\Users\lenovo\AppData\Local\Temp\arduino_build_93356\sketch\sketch_may31a.ino.cpp" -o "nul"
"C:\Program Files\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10805 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Program Files\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files\Arduino\hardware\arduino\avr\variants\standard" "-IC:\Users\lenovo\U+ C11C U+ B2F4 U+ B355\Documents\Arduino\libraries\LiquidCrystal_I2C" "C:\Users\lenovo\AppData\Local\Temp\arduino_build_93356\sketch\sketch_may31a.ino.cpp" -o "C:\Users\lenovo\AppData\Local\Temp\arduino_build_93356\preproc\ctags_target_for_gcc_minus_e.cpp"
C:\Users\lenovo\U+ C11C U+ B2F4 U+ B355\Documents\Arduino\sketch_may31a\sketch_may31a.ino:1:31: fatal error: LiquidCrystal_I2C.h: No such file or directory
#include
^
compilation terminated.
라이브러리 LiquidCrystal_I2C를 버전 1.1.2 폴더: C:\Users\lenovo\U+ C11C U+ B2F4 U+ B355\Documents\Arduino\libraries\LiquidCrystal_I2C 에서 사용
exit status 1
보드 Arduino/Genuino Uno 컴파일 에러.
모든 라이브러리를 설치했지만 아래와 같은 컴파일 오류 메시지가 확인되었습니다.
어떻게 해야할까요,,,
In file included from C:\Users\원준\Documents\Arduino\libraries\DHT_sensor_library\DHT_U.cpp:22:0:
C:\Users\원준\Documents\Arduino\libraries\DHT_sensor_library\DHT_U.h:25:29: fatal error: Adafruit_Sensor.h: No such file or directory
#include
^
compilation terminated.
exit status 1
보드 Arduino/Genuino Uno 컴파일 에러.
온습도 센서는 사용하지않고 미세먼지만 따로 사용하게끔 하는 코드는 없을까요? 만약 기존코드에서 바꾼다면 어느부분을 지우면 잘 적용될까요?
미세먼지 값이 -값으로 출력이 되다가 data error=101 이라는 메세지를 뱉어 냅니다.
미세먼지 센서 문제일까요? 에러값 출력으로 인해 온도 습도값이 디스플레이에서는 변하지 않습니다.
LCD에 불만 들어오고 글씨가 출력되지 않는다면 '지원'의 Q1에 해당하는 오류네요. 초기 설정은 0x3F이었는데 0x27로 수정 한 후 LCD에 글씨가 잘 나옵니다.
미세먼지 값이 음수로 출력되다가 시리얼 모니터에서 data error=101을 출력하고, 온도와 습도값도 변하지 않는다면 미세먼지센서의 연결을 확인해보세요. 회로도(하드웨어 메이킹 - 브레드보드 레이아웃)에 나와있는 미세먼지 센서의 선 색이 실제 센서의 선 색과 다릅니다. 쓰여진 것과 같이 선의 순서로 구분하여 브레드보드에 연결하니 정상적으로 작동하였습니다.
다들 비슷한 실수를 하나 봅니다ㅎㅎ 만들어놓고 보니 마음에 쏙 드네요~
아두이노:1.8.6 (Windows 7), 보드:"Arduino/Genuino Uno"
libraries\Dust_Sensing_Device\LiquidCrystal_I2C.cpp.o (symbol from plugin): In function `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char)':
(.text+0x0): multiple definition of `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char)'
libraries\LiquidCrystal_I2C\LiquidCrystal_I2C.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\Dust_Sensing_Device\LiquidCrystal_I2C.cpp.o (symbol from plugin): In function `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char)':
(.text+0x0): multiple definition of `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char)'
libraries\LiquidCrystal_I2C\LiquidCrystal_I2C.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\Dust_Sensing_Device\LiquidCrystal_I2C.cpp.o (symbol from plugin): In function `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char)':
(.text+0x0): multiple definition of `LiquidCrystal_I2C::expanderWrite(unsigned char)'
libraries\LiquidCrystal_I2C\LiquidCrystal_I2C.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\Dust_Sensing_Device\LiquidCrystal_I2C.cpp.o (symbol from plugin): In function `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char)':
(.text+0x0): multiple definition of `LiquidCrystal_I2C::noBacklight()'
libraries\LiquidCrystal_I2C\LiquidCrystal_I2C.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\Dust_Sensing_Device\LiquidCrystal_I2C.cpp.o (symbol from plugin): In function `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char)':
(.text+0x0): multiple definition of `LiquidCrystal_I2C::backlight()'
libraries\LiquidCrystal_I2C\LiquidCrystal_I2C.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\Dust_Sensing_Device\LiquidCrystal_I2C.cpp.o (symbol from plugin): In function `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char)':
(.text+0x0): multiple definition of `LiquidCrystal_I2C::pulseEnable(unsigned char)'
libraries\LiquidCrystal_I2C\LiquidCrystal_I2C.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\Dust_Sensing_Device\LiquidCrystal_I2C.cpp.o (symbol from plugin): In function `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char)':
(.text+0x0): multiple definition of `LiquidCrystal_I2C::write4bits(unsigned char)'
libraries\LiquidCrystal_I2C\LiquidCrystal_I2C.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\Dust_Sensing_Device\LiquidCrystal_I2C.cpp.o (symbol from plugin): In function `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char)':
(.text+0x0): multiple definition of `LiquidCrystal_I2C::send(unsigned char, unsigned char)'
libraries\LiquidCrystal_I2C\LiquidCrystal_I2C.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\Dust_Sensing_Device\LiquidCrystal_I2C.cpp.o (symbol from plugin): In function `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char)':
(.text+0x0): multiple definition of `LiquidCrystal_I2C::clear()'
libraries\LiquidCrystal_I2C\LiquidCrystal_I2C.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\Dust_Sensing_Device\LiquidCrystal_I2C.cpp.o (symbol from plugin): In function `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char)':
(.text+0x0): multiple definition of `LiquidCrystal_I2C::home()'
libraries\LiquidCrystal_I2C\LiquidCrystal_I2C.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\Dust_Sensing_Device\LiquidCrystal_I2C.cpp.o (symbol from plugin): In function `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char)':
(.text+0x0): multiple definition of `LiquidCrystal_I2C::setCursor(unsigned char, unsigned char)'
libraries\LiquidCrystal_I2C\LiquidCrystal_I2C.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\Dust_Sensing_Device\LiquidCrystal_I2C.cpp.o (symbol from plugin): In function `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char)':
(.text+0x0): multiple definition of `LiquidCrystal_I2C::noDisplay()'
libraries\LiquidCrystal_I2C\LiquidCrystal_I2C.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\Dust_Sensing_Device\LiquidCrystal_I2C.cpp.o (symbol from plugin): In function `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char)':
(.text+0x0): multiple definition of `LiquidCrystal_I2C::display()'
libraries\LiquidCrystal_I2C\LiquidCrystal_I2C.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\Dust_Sensing_Device\LiquidCrystal_I2C.cpp.o (symbol from plugin): In function `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char)':
(.text+0x0): multiple definition of `LiquidCrystal_I2C::noCursor()'
libraries\LiquidCrystal_I2C\LiquidCrystal_I2C.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\Dust_Sensing_Device\LiquidCrystal_I2C.cpp.o (symbol from plugin): In function `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char)':
(.text+0x0): multiple definition of `LiquidCrystal_I2C::cursor()'
libraries\LiquidCrystal_I2C\LiquidCrystal_I2C.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\Dust_Sensing_Device\LiquidCrystal_I2C.cpp.o (symbol from plugin): In function `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char)':
(.text+0x0): multiple definition of `LiquidCrystal_I2C::noBlink()'
libraries\LiquidCrystal_I2C\LiquidCrystal_I2C.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\Dust_Sensing_Device\LiquidCrystal_I2C.cpp.o (symbol from plugin): In function `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char)':
(.text+0x0): multiple definition of `LiquidCrystal_I2C::blink()'
libraries\LiquidCrystal_I2C\LiquidCrystal_I2C.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\Dust_Sensing_Device\LiquidCrystal_I2C.cpp.o (symbol from plugin): In function `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char)':
(.text+0x0): multiple definition of `LiquidCrystal_I2C::scrollDisplayLeft()'
libraries\LiquidCrystal_I2C\LiquidCrystal_I2C.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\Dust_Sensing_Device\LiquidCrystal_I2C.cpp.o (symbol from plugin): In function `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char)':
(.text+0x0): multiple definition of `LiquidCrystal_I2C::scrollDisplayRight()'
libraries\LiquidCrystal_I2C\LiquidCrystal_I2C.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\Dust_Sensing_Device\LiquidCrystal_I2C.cpp.o (symbol from plugin): In function `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char)':
(.text+0x0): multiple definition of `LiquidCrystal_I2C::leftToRight()'
libraries\LiquidCrystal_I2C\LiquidCrystal_I2C.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\Dust_Sensing_Device\LiquidCrystal_I2C.cpp.o (symbol from plugin): In function `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char)':
(.text+0x0): multiple definition of `LiquidCrystal_I2C::rightToLeft()'
libraries\LiquidCrystal_I2C\LiquidCrystal_I2C.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\Dust_Sensing_Device\LiquidCrystal_I2C.cpp.o (symbol from plugin): In function `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char)':
(.text+0x0): multiple definition of `LiquidCrystal_I2C::autoscroll()'
libraries\LiquidCrystal_I2C\LiquidCrystal_I2C.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\Dust_Sensing_Device\LiquidCrystal_I2C.cpp.o (symbol from plugin): In function `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char)':
(.text+0x0): multiple definition of `LiquidCrystal_I2C::noAutoscroll()'
libraries\LiquidCrystal_I2C\LiquidCrystal_I2C.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\Dust_Sensing_Device\LiquidCrystal_I2C.cpp.o (symbol from plugin): In function `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char)':
(.text+0x0): multiple definition of `LiquidCrystal_I2C::createChar(unsigned char, unsigned char*)'
libraries\LiquidCrystal_I2C\LiquidCrystal_I2C.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\Dust_Sensing_Device\LiquidCrystal_I2C.cpp.o (symbol from plugin): In function `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char)':
(.text+0x0): multiple definition of `LiquidCrystal_I2C::begin(unsigned char, unsigned char, unsigned char)'
libraries\LiquidCrystal_I2C\LiquidCrystal_I2C.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\Dust_Sensing_Device\LiquidCrystal_I2C.cpp.o (symbol from plugin): In function `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char)':
(.text+0x0): multiple definition of `LiquidCrystal_I2C::init_priv()'
libraries\LiquidCrystal_I2C\LiquidCrystal_I2C.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\Dust_Sensing_Device\LiquidCrystal_I2C.cpp.o (symbol from plugin): In function `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char)':
(.text+0x0): multiple definition of `LiquidCrystal_I2C::init()'
libraries\LiquidCrystal_I2C\LiquidCrystal_I2C.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\Dust_Sensing_Device\LiquidCrystal_I2C.cpp.o (symbol from plugin): In function `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char)':
(.text+0x0): multiple definition of `LiquidCrystal_I2C::cursor_on()'
libraries\LiquidCrystal_I2C\LiquidCrystal_I2C.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\Dust_Sensing_Device\LiquidCrystal_I2C.cpp.o (symbol from plugin): In function `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char)':
(.text+0x0): multiple definition of `LiquidCrystal_I2C::cursor_off()'
libraries\LiquidCrystal_I2C\LiquidCrystal_I2C.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\Dust_Sensing_Device\LiquidCrystal_I2C.cpp.o (symbol from plugin): In function `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char)':
(.text+0x0): multiple definition of `LiquidCrystal_I2C::blink_on()'
libraries\LiquidCrystal_I2C\LiquidCrystal_I2C.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\Dust_Sensing_Device\LiquidCrystal_I2C.cpp.o (symbol from plugin): In function `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char)':
(.text+0x0): multiple definition of `LiquidCrystal_I2C::blink_off()'
libraries\LiquidCrystal_I2C\LiquidCrystal_I2C.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\Dust_Sensing_Device\LiquidCrystal_I2C.cpp.o (symbol from plugin): In function `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char)':
(.text+0x0): multiple definition of `LiquidCrystal_I2C::load_custom_character(unsigned char, unsigned char*)'
libraries\LiquidCrystal_I2C\LiquidCrystal_I2C.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\Dust_Sensing_Device\LiquidCrystal_I2C.cpp.o (symbol from plugin): In function `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char)':
(.text+0x0): multiple definition of `LiquidCrystal_I2C::setBacklight(unsigned char)'
libraries\LiquidCrystal_I2C\LiquidCrystal_I2C.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\Dust_Sensing_Device\LiquidCrystal_I2C.cpp.o (symbol from plugin): In function `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char)':
(.text+0x0): multiple definition of `LiquidCrystal_I2C::printstr(char const*)'
libraries\LiquidCrystal_I2C\LiquidCrystal_I2C.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\Dust_Sensing_Device\LiquidCrystal_I2C.cpp.o (symbol from plugin): In function `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char)':
(.text+0x0): multiple definition of `LiquidCrystal_I2C::off()'
libraries\LiquidCrystal_I2C\LiquidCrystal_I2C.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\Dust_Sensing_Device\LiquidCrystal_I2C.cpp.o (symbol from plugin): In function `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char)':
(.text+0x0): multiple definition of `LiquidCrystal_I2C::on()'
libraries\LiquidCrystal_I2C\LiquidCrystal_I2C.cpp.o (symbol from plugin):(.text+0x0): first defined here
"LiquidCrystal_I2C.h"를 위한 복수개의 라이브러리가 발견되었습니다
libraries\Dust_Sensing_Device\LiquidCrystal_I2C.cpp.o (symbol from plugin): In function `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char)':
(.text+0x0): multiple definition of `LiquidCrystal_I2C::setDelay(int, int)'
libraries\LiquidCrystal_I2C\LiquidCrystal_I2C.cpp.o (symbol from plugin):(.text+0x0): first defined here
사용됨: C:\Users\admin\Documents\Arduino\libraries\LiquidCrystal_I2C
사용되지 않음: C:\Users\admin\Documents\Arduino\libraries\Dust_Sensing_Device
libraries\Dust_Sensing_Device\LiquidCrystal_I2C.cpp.o (symbol from plugin): In function `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char)':
(.text+0x0): multiple definition of `LiquidCrystal_I2C::status()'
libraries\LiquidCrystal_I2C\LiquidCrystal_I2C.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\Dust_Sensing_Device\LiquidCrystal_I2C.cpp.o (symbol from plugin): In function `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char)':
(.text+0x0): multiple definition of `LiquidCrystal_I2C::keypad()'
libraries\LiquidCrystal_I2C\LiquidCrystal_I2C.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\Dust_Sensing_Device\LiquidCrystal_I2C.cpp.o (symbol from plugin): In function `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char)':
(.text+0x0): multiple definition of `LiquidCrystal_I2C::init_bargraph(unsigned char)'
libraries\LiquidCrystal_I2C\LiquidCrystal_I2C.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\Dust_Sensing_Device\LiquidCrystal_I2C.cpp.o (symbol from plugin): In function `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char)':
(.text+0x0): multiple definition of `LiquidCrystal_I2C::draw_horizontal_graph(unsigned char, unsigned char, unsigned char, unsigned char)'
libraries\LiquidCrystal_I2C\LiquidCrystal_I2C.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\Dust_Sensing_Device\LiquidCrystal_I2C.cpp.o (symbol from plugin): In function `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char)':
(.text+0x0): multiple definition of `LiquidCrystal_I2C::draw_vertical_graph(unsigned char, unsigned char, unsigned char, unsigned char)'
libraries\LiquidCrystal_I2C\LiquidCrystal_I2C.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\Dust_Sensing_Device\LiquidCrystal_I2C.cpp.o (symbol from plugin): In function `LiquidCrystal_I2C::LiquidCrystal_I2C(unsigned char, unsigned char, unsigned char)':
(.text+0x0): multiple definition of `LiquidCrystal_I2C::setContrast(unsigned char)'
libraries\LiquidCrystal_I2C\LiquidCrystal_I2C.cpp.o (symbol from plugin):(.text+0x0): first defined here
collect2.exe: error: ld returned 1 exit status
exit status 1
보드 Arduino/Genuino Uno 컴파일 에러.
이 리포트는 파일 -> 환경설정에 "컴파일중 자세한 출력보이기"를
활성화하여 더 많은 정보를
보이게 할 수 있습니다.
다작성했는데 이렇게 오류가나는데 어떡하나요?
아래와 같이 에러메세지가 뜨는데 어떻게 해야 하나요?
아두이노:1.8.7 (Mac OS X), 보드:"Arduino/Genuino Uno"
Dust_Sensing_Device:18:1: error: stray '\354' in program
LiquidCrystal_I2C lcd(LCD 이름, 16, 2);
^
Dust_Sensing_Device:18:1: error: stray '\235' in program
Dust_Sensing_Device:18:1: error: stray '\264' in program
Dust_Sensing_Device:18:1: error: stray '\353' in program
Dust_Sensing_Device:18:1: error: stray '\246' in program
Dust_Sensing_Device:18:1: error: stray '\204' in program
Dust_Sensing_Device:18:23: error: 'LCD' was not declared in this scope
LiquidCrystal_I2C lcd(LCD 이름, 16, 2);
^
exit status 1
stray '\354' in program
이 리포트는 파일 -> 환경설정에 "컴파일중 자세한 출력보이기"를
활성화하여 더 많은 정보를
보이게 할 수 있습니다.
그대로 따라서 했는데 실행까지는 됩니다.
근데 LCD에서 미세먼지 값이 너무 변화가 없어서 시리얼 모니터로 확인해봤는데
4번 정도의 먼지값이 변화를 하다가 data error = 101 이런 메세지만 계속 나오는데
원인이 뭔지 여쭤봐도 괜찮을까요?
다음과 같은 오류메세지는 어떻게 해결해야 할까요?
아두이노:1.8.9 (Windows Store 1.8.21.0) (Windows 10), 보드:"Arduino/Genuino Uno"
Dust_Sensing_Device:18:1: error: stray '\354' in program
LiquidCrystal_I2C lcd(LCD 이름, 16, 2);
^
Dust_Sensing_Device:18:1: error: stray '\235' in program
Dust_Sensing_Device:18:1: error: stray '\264' in program
Dust_Sensing_Device:18:1: error: stray '\353' in program
Dust_Sensing_Device:18:1: error: stray '\246' in program
Dust_Sensing_Device:18:1: error: stray '\204' in program
Dust_Sensing_Device:18:23: error: 'LCD' was not declared in this scope
LiquidCrystal_I2C lcd(LCD 이름, 16, 2);
^
exit status 1
stray '\354' in program
이 리포트는 파일 -> 환경설정에 "컴파일중 자세한 출력보이기"를
활성화하여 더 많은 정보를
보이게 할 수 있습니다.
안녕하세요~
온습도 센서만 DHT22(AM2302)로 이용하여 위와 똑같이 구현하여 만들어보았습니다.
그런데 온도가 1도에 습도도 2%에서 1%정도로 나오는데 왜이렇게 나오는지 궁금합니다.
어떻게 바꿔야하는지도 알려주시면 감사하겠습니다.
또 소스코드를 보니까 data 가 미세먼지수치를 나타내는것같은데
어떤 수치인지 단위는 어떤지 궁금합니다.(소스코드를 해석하기에 제실력이 부족한것같습니다.ㅠㅠ)
마지막으로 이 data값을 이용해서 얼마 초과되면 servo motor가 동작하게 코드를 만들어보고싶은데
어떻게 해야할지 조언 부탁드립니다.
더운날씨에 정말 고생하시는데 한번만 신경써주시면 감사하겠습니다.
오류 확인 부탁드립니다.
아두이노:1.8.9 (Windows 10), 보드:"Arduino/Genuino Uno"
Dust_Sensing_Device:18:1: error: stray '\354' in program
LiquidCrystal_I2C lcd(LCD 이름, 16, 2);
^
Dust_Sensing_Device:18:1: error: stray '\235' in program
Dust_Sensing_Device:18:1: error: stray '\264' in program
Dust_Sensing_Device:18:1: error: stray '\353' in program
Dust_Sensing_Device:18:1: error: stray '\246' in program
Dust_Sensing_Device:18:1: error: stray '\204' in program
Dust_Sensing_Device:18:23: error: 'LCD' was not declared in this scope
LiquidCrystal_I2C lcd(LCD 이름, 16, 2);
^
exit status 1
stray '\354' in program
이 리포트는 파일 -> 환경설정에 "컴파일중 자세한 출력보이기"를
활성화하여 더 많은 정보를
보이게 할 수 있습니다.
연결을 모두 하고 코딩값도 제대로 나왔는데 업로딩중에
보드에 업로딩중에 문제 발생. 다음을 참고하세요. http://www.arduino.cc/en/Guide/Troubleshooting#upload
이문구가 계속나오며 업로딩이 안됩니다. 이 이후에도 다시 모두다 뺏다가 다시 연결해봐도 똑같은말만나옵니다.
687.52 라는 수치가 찍히는데 저희집은 쓰레기장인가요? ㅠㅠ
연구원님들 찍히는 값은 16.52 뭐 이정도로 찍히는 걸로 보이거든요.
제 센서 불량인걸까요?
#include "PMsensor.h"
위의 두군데에서 "No such file or directiory"이라는 컴파일 에러가 나는데,
이 두가지 파일은 어디서 얻을수 있나요?
서담덕 2018-05-31 17:24:12
저 미세먼지 측정기 키트 구매한 중학생인데요, 근데 회로기판 다 맞는데 컴파일에러가 자꾸나는데 왜 이런건가요?
C:\Users\lenovo\AppData\Local\Temp\arduino_modified_sketch_262960\sketch_may31c.ino:1:31: fatal error: LiquidCrystal_I2C.h: No such file or directory
#include
^
compilation terminated.
exit status 1
보드 Arduino/Genuino Uno 컴파일 에러.
자꾸 이렇게 뜨네요..