SlideShare a Scribd company logo
HAC(Han Air Cleaner)
1460058 한희구
HAC(Han Air Cleaner)
1460058 한희구
1. 작품 개요
2. 작품 목표
3. 작품 설명
4. 소스
HAC(Han Air Cleaner)
1460058 한희구
1. 작품 개요
HAC(Han Air Cleaner) 작품 개요
중국발 미세먼지로 피해 확대
건강문제 위협
공기청정기 수요 증가
1인가구 증가
HAC(Han Air Cleaner) 작품 개요
“ 1인용 가구를 위한 공기청정기 ”
HAC(Han Air Cleaner)
1460058 한희구
2. 작품 목표
Vue.js Node.js SQL Arduino
HAC(Han Air Cleaner) 작품 목표
Vue.js-Node.js-SQL-Arduino
4가지를 연동하여 작품 제작
Vue.js Node.js PostgreSQL Arduino
HAC(Han Air Cleaner) 작품 목표
Vue.js의 목표는 로그인창-공기청정기 정보창 구현
Node.js의 목표는 Vue.js와 postgreSQL를 연동 구현
postgreSQL의 목표는 DB구축으로 키 값 구현
Arduino의 목표는 미세먼지 및 온습도 센서로 받은 정보를 DB에 입력 구현
HAC(Han Air Cleaner)
1460058 한희구
3. 작품 설명
HAC(Han Air Cleaner) 작품 설명
HAC(Han Air Cleaner) 작품 설명
Indexpage.vue 입니다
로그인 창을 구현했으며
현재 CSS부분과 로그인을 누르면 시
스템창으로 넘어갑니다.
-개선할 점
로그인 인증 부분 개발
이메일 인증 or 회원가입 개발예정
HAC(Han Air Cleaner) 작품 설명
Systempage.vue 입니다
시스템 정보창을 구현하였으며 DB에서 key값을 가져오게 구현
axios를 이용하여 node.js 와 연동을 구현하였습니다.
-개선할 점
전체적인 디자인 퀄리티 개선 및 추가 관리창 고려
HAC(Han Air Cleaner) 작품 설명
Node.js입니다.
1. DB와 연결을 해주는 소스입니다.
2. DB에서 데이터 정보를 가져옵니다.
3.Vue.js와 연동을 위해 동일한 local설정
4. 정상적인 DB데이터 받기
-개선사항
ID의 null오류 개선
HAC(Han Air Cleaner) 작품 설명
PostgreSQL입니다.
celsius(온도),humidify(습도)
pm(미세먼지), state(상태)
4가지로 구현 새로운 정보가 들어올시
실시간으로 node.js로 보내
Vue.js에 보여줍니다.
-개선사항
아두이노의 데이터를 DB에 연동
HAC(Han Air Cleaner) 작품 설명
온습도 센서의 회로입니다.
정상작동을 하고있습니다.
-개선사항
온습도 센서의 값을 DB로 연동
HAC(Han Air Cleaner) 작품 설명
#define dataPin 10 // define the data pin the sensor is connected to
#define clockPin 11 // define the clock pin the sensor is connected to
SHT1x sht1x(dataPin, clockPin); // create the sensor object
void setup()
{
Serial.begin(9600); // initialise the serial connection
Serial.println("Flux Workshop Example");
}
void loop()
{
float temperature; // define a variable to store the temperature
float humidity; // define a variable to store the humidity
// Read values from the sensor
temperature = sht1x.readTemperatureC(); // read the values from the SHT10
humidity = sht1x.readHumidity(); // read the values from the SHT10
// Print the values to the serial port
Serial.print("Temperature: ");
Serial.print(temperature, DEC); // send the result to the serial monitor
Serial.print("C / ");
Serial.print("Humidity: ");
Serial.print(humidity); // send the result to the serial monitor
Serial.println("%");
delay(1000);
}
HAC(Han Air Cleaner) 작품 설명
미세먼지 센서를 적용시킨 모습입니다.
-개선사항
미세먼지센서의 값을 DB로 연동
HAC(Han Air Cleaner) 작품 설명
#include <pm2008_i2c.h>
PM2008_I2C pm2008_i2c;
void setup() {
pm2008_i2c.begin();
Serial.begin(9600);
pm2008_i2c.command();
delay(1000);
pinMode ( 3, OUTPUT);
pinMode ( 4, OUTPUT);
pinMode ( 5, OUTPUT);
pinMode ( 6, OUTPUT);
}
void loop() {
uint8_t ret = pm2008_i2c.read();
uint8_t pm1p0_grade = 0;
uint8_t pm2p5_grade = 0;
uint8_t pm10p_grade = 0;
uint8_t total_grade = 0;
if (ret == 0) {
// PM 1.0
if (pm2008_i2c.pm1p0_grimm < 16) {
pm1p0_grade = 1;
} else if (pm2008_i2c.pm1p0_grimm < 51) {
pm1p0_grade = 2;
} else if (pm2008_i2c.pm1p0_grimm < 101) {
pm1p0_grade = 3;
} else {
pm1p0_grade = 4;
}
// PM 2.5
if (pm2008_i2c.pm2p5_grimm < 16) {
pm2p5_grade = 1;
} else if (pm2008_i2c.pm2p5_grimm < 51) {
pm2p5_grade = 2;
} else if (pm2008_i2c.pm2p5_grimm < 101) {
pm2p5_grade = 3;
} else {
pm2p5_grade = 4;
}
// PM 10
if (pm2008_i2c.pm10_grimm < 31) {
pm10p_grade = 1;
} else if (pm2008_i2c.pm10_grimm < 81) {
pm10p_grade = 2;
} else if (pm2008_i2c.pm10_grimm < 151) {
pm10p_grade = 3;
} else {
pm10p_grade = 4;
}
// Get worst grade
total_grade = max(pm1p0_grade, pm2p5_grade);
total_grade = max(total_grade, pm10p_grade);
digitalWrite( 3, LOW );
digitalWrite( 4, LOW );
digitalWrite( 5, LOW );
digitalWrite( 6, LOW );
switch (total_grade) {
case 1: {
Serial.println(“Good!”);
digitalWrite( 3, HIGH );
break;
}
case 2: {
Serial.println(“Normal!”);
digitalWrite( 4, HIGH );
break;
}
case 3: {
Serial.println(“Bad!”);
digitalWrite( 5, HIGH );
break;
}
case 4: {
Serial.println(“Worst!”);
digitalWrite( 6, HIGH );
break;
}
default:
break;
}
}
delay(2000);
}
감사합니다

More Related Content

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
Christy Abraham Joy
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
Vit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
MindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

1460058

  • 2. HAC(Han Air Cleaner) 1460058 한희구 1. 작품 개요 2. 작품 목표 3. 작품 설명 4. 소스
  • 3. HAC(Han Air Cleaner) 1460058 한희구 1. 작품 개요
  • 4. HAC(Han Air Cleaner) 작품 개요 중국발 미세먼지로 피해 확대 건강문제 위협 공기청정기 수요 증가 1인가구 증가
  • 5. HAC(Han Air Cleaner) 작품 개요 “ 1인용 가구를 위한 공기청정기 ”
  • 6. HAC(Han Air Cleaner) 1460058 한희구 2. 작품 목표
  • 7. Vue.js Node.js SQL Arduino HAC(Han Air Cleaner) 작품 목표 Vue.js-Node.js-SQL-Arduino 4가지를 연동하여 작품 제작
  • 8. Vue.js Node.js PostgreSQL Arduino HAC(Han Air Cleaner) 작품 목표 Vue.js의 목표는 로그인창-공기청정기 정보창 구현 Node.js의 목표는 Vue.js와 postgreSQL를 연동 구현 postgreSQL의 목표는 DB구축으로 키 값 구현 Arduino의 목표는 미세먼지 및 온습도 센서로 받은 정보를 DB에 입력 구현
  • 9. HAC(Han Air Cleaner) 1460058 한희구 3. 작품 설명
  • 10. HAC(Han Air Cleaner) 작품 설명
  • 11. HAC(Han Air Cleaner) 작품 설명 Indexpage.vue 입니다 로그인 창을 구현했으며 현재 CSS부분과 로그인을 누르면 시 스템창으로 넘어갑니다. -개선할 점 로그인 인증 부분 개발 이메일 인증 or 회원가입 개발예정
  • 12. HAC(Han Air Cleaner) 작품 설명 Systempage.vue 입니다 시스템 정보창을 구현하였으며 DB에서 key값을 가져오게 구현 axios를 이용하여 node.js 와 연동을 구현하였습니다. -개선할 점 전체적인 디자인 퀄리티 개선 및 추가 관리창 고려
  • 13. HAC(Han Air Cleaner) 작품 설명 Node.js입니다. 1. DB와 연결을 해주는 소스입니다. 2. DB에서 데이터 정보를 가져옵니다. 3.Vue.js와 연동을 위해 동일한 local설정 4. 정상적인 DB데이터 받기 -개선사항 ID의 null오류 개선
  • 14. HAC(Han Air Cleaner) 작품 설명 PostgreSQL입니다. celsius(온도),humidify(습도) pm(미세먼지), state(상태) 4가지로 구현 새로운 정보가 들어올시 실시간으로 node.js로 보내 Vue.js에 보여줍니다. -개선사항 아두이노의 데이터를 DB에 연동
  • 15. HAC(Han Air Cleaner) 작품 설명 온습도 센서의 회로입니다. 정상작동을 하고있습니다. -개선사항 온습도 센서의 값을 DB로 연동
  • 16. HAC(Han Air Cleaner) 작품 설명 #define dataPin 10 // define the data pin the sensor is connected to #define clockPin 11 // define the clock pin the sensor is connected to SHT1x sht1x(dataPin, clockPin); // create the sensor object void setup() { Serial.begin(9600); // initialise the serial connection Serial.println("Flux Workshop Example"); } void loop() { float temperature; // define a variable to store the temperature float humidity; // define a variable to store the humidity // Read values from the sensor temperature = sht1x.readTemperatureC(); // read the values from the SHT10 humidity = sht1x.readHumidity(); // read the values from the SHT10 // Print the values to the serial port Serial.print("Temperature: "); Serial.print(temperature, DEC); // send the result to the serial monitor Serial.print("C / "); Serial.print("Humidity: "); Serial.print(humidity); // send the result to the serial monitor Serial.println("%"); delay(1000); }
  • 17. HAC(Han Air Cleaner) 작품 설명 미세먼지 센서를 적용시킨 모습입니다. -개선사항 미세먼지센서의 값을 DB로 연동
  • 18. HAC(Han Air Cleaner) 작품 설명 #include <pm2008_i2c.h> PM2008_I2C pm2008_i2c; void setup() { pm2008_i2c.begin(); Serial.begin(9600); pm2008_i2c.command(); delay(1000); pinMode ( 3, OUTPUT); pinMode ( 4, OUTPUT); pinMode ( 5, OUTPUT); pinMode ( 6, OUTPUT); } void loop() { uint8_t ret = pm2008_i2c.read(); uint8_t pm1p0_grade = 0; uint8_t pm2p5_grade = 0; uint8_t pm10p_grade = 0; uint8_t total_grade = 0; if (ret == 0) { // PM 1.0 if (pm2008_i2c.pm1p0_grimm < 16) { pm1p0_grade = 1; } else if (pm2008_i2c.pm1p0_grimm < 51) { pm1p0_grade = 2; } else if (pm2008_i2c.pm1p0_grimm < 101) { pm1p0_grade = 3; } else { pm1p0_grade = 4; } // PM 2.5 if (pm2008_i2c.pm2p5_grimm < 16) { pm2p5_grade = 1; } else if (pm2008_i2c.pm2p5_grimm < 51) { pm2p5_grade = 2; } else if (pm2008_i2c.pm2p5_grimm < 101) { pm2p5_grade = 3; } else { pm2p5_grade = 4; } // PM 10 if (pm2008_i2c.pm10_grimm < 31) { pm10p_grade = 1; } else if (pm2008_i2c.pm10_grimm < 81) { pm10p_grade = 2; } else if (pm2008_i2c.pm10_grimm < 151) { pm10p_grade = 3; } else { pm10p_grade = 4; } // Get worst grade total_grade = max(pm1p0_grade, pm2p5_grade); total_grade = max(total_grade, pm10p_grade); digitalWrite( 3, LOW ); digitalWrite( 4, LOW ); digitalWrite( 5, LOW ); digitalWrite( 6, LOW ); switch (total_grade) { case 1: { Serial.println(“Good!”); digitalWrite( 3, HIGH ); break; } case 2: { Serial.println(“Normal!”); digitalWrite( 4, HIGH ); break; } case 3: { Serial.println(“Bad!”); digitalWrite( 5, HIGH ); break; } case 4: { Serial.println(“Worst!”); digitalWrite( 6, HIGH ); break; } default: break; } } delay(2000); }