질문게시판 > 아두이노 소스 코드 길이가 너무 길어져서 질문이 있습니다.

인기검색어 > 아두이노 센서 ATMEGA128

최신글 질문게시판 동영상강좌 가입하기

▼ BASIC4MCU 후원업체 신제품 정보 ▼

▲ BASIC4MCU 후원업체 신제품 정보 ▲

BASIC4MCU > 질문게시판

아두이노 소스 코드 길이가 너무 길어져서 질문이 있습니다.

페이지 정보

작성자 냉냉냥성냥 작성일18-12-02 20:10 조회9,413회 댓글0건

본문

블루투스로 집안 설계도를 받은 다음에 집안의 상황이 변하면 변한 상황을 출력하는 소스코드 입니다만, 소스코드가 너무 길어져서  뭔가 줄일 방법이 없나 물어봅니다. 설계도는 그냥 대충 -하고 |를 이용해서 만들었습니다. 여기서 만약 room1의 문이 열리면 블루투스로 기기에 room1이 열린 설계도가 출력 하게 만들었고 room1이 열린 상태에서 room2가 열린다면 room1과 room2가 열린 설계도를 출력하게 만들었습니다. 방문은 스위치를 누르면 열고 닫게 했구요.. 자동 형광등은 제대로 작동하는걸 봤으니 무시하셔도 됩니다. 아 밑에 빈 조건문은 만들다 만거니 상관하지 말아주세요.

 

 

#include<LED.h>
#include"Temperature.h"
#include "Humidity.h"
#include <UltraSonic.h>
#include"Switch.h"
#include "RgbLcd.h"

RgbLcd lcd;
LED myled;
Humidity humidity;
#define TEMP_ADDR  72
#define HUMI_ADC  55
UltraSonic dUltra;
Temperature temper;
Switch   pushSwitch;


void blueprint(){
  Serial3.print("\t-------------------------------------------------------------------\r\n");
  Serial3.print("\t|                                                                 |\r\n");
  Serial3.print("\t|                            veranda                              |\r\n");
  Serial3.print("\t|                                                                 |\r\n");
  Serial3.print("\t-------------------------------------------------------------------\r\n");
  Serial3.print("\t|                 |                                  |            |\r\n");
  Serial3.print("\t|                 |                                  |            |\r\n");
  Serial3.print("\t|                 |                                  |            |\r\n");
  Serial3.print("\t|     room 1      |                                  |    room 2  |\r\n");
  Serial3.print("\t|                 |                                  |            |\r\n");
  Serial3.print("\t|                 |                                  |            |\r\n");
  Serial3.print("---------------------------                                  --------------\r\n");
  Serial3.print("|       |                                                                 |\r\n");
  Serial3.print("|   t   |                living room                                      |\r\n");
  Serial3.print("|   o   |                                                    -------------|\r\n");
  Serial3.print("|   i   |                                                    |            |\r\n");
  Serial3.print("|   l   |                                                    |            |\r\n");
  Serial3.print("|   e   |                                                    |   room 3   |\r\n");
  Serial3.print("|   t   |                                                    |            |\r\n");
  Serial3.print("|       |                                                    |            |\r\n");
  Serial3.print("|-----------------------------------------           ---------------------|\r\n");
  Serial3.print("\t|            |                         |           |                     \r\n");
  Serial3.print("\t|            |                         |           |                     \r\n");
  Serial3.print("\t|    door    |                         |           |                     \r\n");
  Serial3.print("\t|            |                         |           |                     \r\n");
  Serial3.print("\t|------------|                         |           |                     \r\n");
  Serial3.print("\t                          |------------|           |                     \r\n");
  Serial3.print("\t                          |                        |                     \r\n");
  Serial3.print("\t                          |         kitchen        |                     \r\n");
  Serial3.print("\t                          |                        |                     \r\n");
  Serial3.print("\t                          |                        |                     \r\n");
  Serial3.print("\t                          |------------------------|                     \r\n");
  Serial3.print("hudi: ");
  Serial3.print(humidity.read());
  Serial3.println("%");
  Serial3.print("temp: ");
  Serial3.print(temper.getTemperatureC());
  Serial3.print("º");
  Serial3.print(" C");
  Serial3.print("\n\n\n\n\n\n\n\n\n\n\n\n\n\n");
 
}

void blueprint_door_open(){
  Serial3.print("\t-------------------------------------------------------------------\r\n");
  Serial3.print("\t|                                                                 |\r\n");
  Serial3.print("\t|                            veranda                              |\r\n");
  Serial3.print("\t|                                                                 |\r\n");
  Serial3.print("\t-------------------------------------------------------------------\r\n");
  Serial3.print("\t|                 |                                  |            |\r\n");
  Serial3.print("\t|                 |                                  |            |\r\n");
  Serial3.print("\t|                 |                                  |            |\r\n");
  Serial3.print("\t|     room 1      |                                  |    room 2  |\r\n");
  Serial3.print("\t|                 |                                  |            |\r\n");
  Serial3.print("\t|                 |                                  |            |\r\n");
  Serial3.print("---------------------------                                  --------------\r\n");
  Serial3.print("|       |                                                                 |\r\n");
  Serial3.print("|   t   |                living room                                      |\r\n");
  Serial3.print("|   o   |                                                    -------------|\r\n");
  Serial3.print("|   i   |                                                    |            |\r\n");
  Serial3.print("|   l   |                                                    |            |\r\n");
  Serial3.print("|   e   |                                                    |   room 3   |\r\n");
  Serial3.print("|   t   |                                                    |            |\r\n");
  Serial3.print("|       |                                                    |            |\r\n");
  Serial3.print("|-----------------------------------------           ---------------------|\r\n");
  Serial3.print("\t|            |                         |           |                     \r\n");
  Serial3.print("\t|            |                         |           |                     \r\n");
  Serial3.print("\t|    door    |                         |           |                     \r\n");
  Serial3.print("\t| (light On) |                         |           |                     \r\n");
  Serial3.print("\t|------------|                         |           |                     \r\n");
  Serial3.print("\t                          |------------|           |                     \r\n");
  Serial3.print("\t                          |                        |                     \r\n");
  Serial3.print("\t                          |         kitchen        |                     \r\n");
  Serial3.print("\t                          |                        |                     \r\n");
  Serial3.print("\t                          |                        |                     \r\n");
  Serial3.print("\t                          |------------------------|                     \r\n");
  Serial3.print("hudi: ");
  Serial3.print(humidity.read());
  Serial3.println("%");
  Serial3.print("temp: ");
  Serial3.print(temper.getTemperatureC());
  Serial3.print("℃");
  Serial3.print("\n\nlight On\n\n\n\n\n\n\n\n\n\n\n\r\n");
}


void blueprint_door_close(){
  Serial3.print("\t-------------------------------------------------------------------\r\n");
  Serial3.print("\t|                                                                 |\r\n");
  Serial3.print("\t|                            veranda                              |\r\n");
  Serial3.print("\t|                                                                 |\r\n");
  Serial3.print("\t-------------------------------------------------------------------\r\n");
  Serial3.print("\t|                 |                                  |            |\r\n");
  Serial3.print("\t|                 |                                  |            |\r\n");
  Serial3.print("\t|                 |                                  |            |\r\n");
  Serial3.print("\t|     room 1      |                                  |    room 2  |\r\n");
  Serial3.print("\t|                 |                                  |            |\r\n");
  Serial3.print("\t|                 |                                  |            |\r\n");
  Serial3.print("---------------------------                                  --------------\r\n");
  Serial3.print("|       |                                                                 |\r\n");
  Serial3.print("|   t   |                living room                                      |\r\n");
  Serial3.print("|   o   |                                                    -------------|\r\n");
  Serial3.print("|   i   |                                                    |            |\r\n");
  Serial3.print("|   l   |                                                    |            |\r\n");
  Serial3.print("|   e   |                                                    |   room 3   |\r\n");
  Serial3.print("|   t   |                                                    |            |\r\n");
  Serial3.print("|       |                                                    |            |\r\n");
  Serial3.print("|-----------------------------------------           ---------------------|\r\n");
  Serial3.print("\t|            |                         |           |                     \r\n");
  Serial3.print("\t|            |                         |           |                     \r\n");
  Serial3.print("\t|    door    |                         |           |                     \r\n");
  Serial3.print("\t| (light Off)|                         |           |                     \r\n");
  Serial3.print("\t|------------|                         |           |                     \r\n");
  Serial3.print("\t                          |------------|           |                     \r\n");
  Serial3.print("\t                          |                        |                     \r\n");
  Serial3.print("\t                          |         kitchen        |                     \r\n");
  Serial3.print("\t                          |                        |                     \r\n");
  Serial3.print("\t                          |                        |                     \r\n");
  Serial3.print("\t                          |------------------------|                     \r\n");
  Serial3.print("hudi: ");
  Serial3.print(humidity.read());
  Serial3.println("%");
  Serial3.print("temp: ");
  Serial3.print(temper.getTemperatureC());
  Serial3.print("℃");
  Serial3.print("\n\nlight Off\n\n\n\n\n\n\n\n\n\n\n\r\n");
}

void blueprint_room1_open(){
  Serial3.print("\t-------------------------------------------------------------------\r\n");
  Serial3.print("\t|                                                                 |\r\n");
  Serial3.print("\t|                            veranda                              |\r\n");
  Serial3.print("\t|                                                                 |\r\n");
  Serial3.print("\t-------------------------------------------------------------------\r\n");
  Serial3.print("\t|                 |                                  |            |\r\n");
  Serial3.print("\t|                 |                                  |            |\r\n");
  Serial3.print("\t|                 |                                  |            |\r\n");
  Serial3.print("\t|     room 1      |                                  |    room 2  |\r\n");
  Serial3.print("\t|                 |                                  |            |\r\n");
  Serial3.print("\t|                 |                                  |            |\r\n");
  Serial3.print("----------|    ------------                                  --------------\r\n");
  Serial3.print("|       | |                                                               |\r\n");
  Serial3.print("|   t   | |              living room                                      |\r\n");
  Serial3.print("|   o   |                                                    -------------|\r\n");
  Serial3.print("|   i   |                                                    |            |\r\n");
  Serial3.print("|   l   |                                                    |            |\r\n");
  Serial3.print("|   e   |                                                    |   room 3   |\r\n");
  Serial3.print("|   t   |                                                    |            |\r\n");
  Serial3.print("|       |                                                    |            |\r\n");
  Serial3.print("|-----------------------------------------           ---------------------|\r\n");
  Serial3.print("\t|            |                         |           |                     \r\n");
  Serial3.print("\t|            |                         |           |                     \r\n");
  Serial3.print("\t|    door    |                         |           |                     \r\n");
  Serial3.print("\t|            |                         |           |                     \r\n");
  Serial3.print("\t|------------|                         |           |                     \r\n");
  Serial3.print("\t                          |------------|           |                     \r\n");
  Serial3.print("\t                          |                        |                     \r\n");
  Serial3.print("\t                          |         kitchen        |                     \r\n");
  Serial3.print("\t                          |                        |                     \r\n");
  Serial3.print("\t                          |                        |                     \r\n");
  Serial3.print("\t                          |------------------------|                     \r\n");
  Serial3.print("hudi: ");
  Serial3.print(humidity.read());
  Serial3.println("%");
  Serial3.print("temp: ");
  Serial3.print(temper.getTemperatureC());
  Serial3.print("℃");
  Serial3.print("\n\nlight Off\n\n\n\n\n\n\n\n\n\n\n\r\n");
}

void blueprint_all_open(){
  Serial3.print("\t-------------------------------------------------------------------\r\n");
  Serial3.print("\t|                                                                 |\r\n");
  Serial3.print("\t|                            veranda                              |\r\n");
  Serial3.print("\t|                                                                 |\r\n");
  Serial3.print("\t-------------------------------------------------------------------\r\n");
  Serial3.print("\t|                 |                                  |            |\r\n");
  Serial3.print("\t|                 |                                  |            |\r\n");
  Serial3.print("\t|                 |                                  |            |\r\n");
  Serial3.print("\t|     room 1      |                                  |    room 2  |\r\n");
  Serial3.print("\t|                 |                                  |            |\r\n");
  Serial3.print("\t|                 |                                  |            |\r\n");
  Serial3.print("----------|    ------------                                  -------   |---\r\n");
  Serial3.print("|       | |                                                            |  |\r\n");
  Serial3.print("|   t   |                living room                               |      |\r\n");
  Serial3.print("|   o   ------                                               ------|   ---|\r\n");
  Serial3.print("|   i                                                        |            |\r\n");
  Serial3.print("|   l                                                        |            |\r\n");
  Serial3.print("|   e   |                                                    |   room 3   |\r\n");
  Serial3.print("|   t   |                                                    |            |\r\n");
  Serial3.print("|       |                                                    |            |\r\n");
  Serial3.print("|-----------------------------------------           ---------------------|\r\n");
  Serial3.print("\t|            |                         |           |                     \r\n");
  Serial3.print("\t|            |                         |           |                     \r\n");
  Serial3.print("\t|    door    |                         |           |                     \r\n");
  Serial3.print("\t|            |                         |           |                     \r\n");
  Serial3.print("\t|------------|                         |           |                     \r\n");
  Serial3.print("\t                          |------------|           |                     \r\n");
  Serial3.print("\t                          |                        |                     \r\n");
  Serial3.print("\t                          |         kitchen        |                     \r\n");
  Serial3.print("\t                          |                        |                     \r\n");
  Serial3.print("\t                          |                        |                     \r\n");
  Serial3.print("\t                          |------------------------|                     \r\n");
  Serial3.print("hudi: ");
  Serial3.print(humidity.read());
  Serial3.println("%");
  Serial3.print("temp: ");
  Serial3.print(temper.getTemperatureC());
  Serial3.print("℃");
  Serial3.print("\n\nlight Off\n\n\n\n\n\n\n\n\n\n\n\r\n");
}

void blueprint_room1and2_open(){
  Serial3.print("\t-------------------------------------------------------------------\r\n");
  Serial3.print("\t|                                                                 |\r\n");
  Serial3.print("\t|                            veranda                              |\r\n");
  Serial3.print("\t|                                                                 |\r\n");
  Serial3.print("\t-------------------------------------------------------------------\r\n");
  Serial3.print("\t|                 |                                  |            |\r\n");
  Serial3.print("\t|                 |                                  |            |\r\n");
  Serial3.print("\t|                 |                                  |            |\r\n");
  Serial3.print("\t|     room 1      |                                  |    room 2  |\r\n");
  Serial3.print("\t|                 |                                  |            |\r\n");
  Serial3.print("\t|                 |                                  |            |\r\n");
  Serial3.print("----------|    ------------                                  ------   |----\r\n");
  Serial3.print("|       | |                                                           |   |\r\n");
  Serial3.print("|   t   | |              living room                                      |\r\n");
  Serial3.print("|   o   |                                                    -------------|\r\n");
  Serial3.print("|   i   |                                                    |            |\r\n");
  Serial3.print("|   l   |                                                    |            |\r\n");
  Serial3.print("|   e   |                                                    |   room 3   |\r\n");
  Serial3.print("|   t   |                                                    |            |\r\n");
  Serial3.print("|       |                                                    |            |\r\n");
  Serial3.print("|-----------------------------------------           ---------------------|\r\n");
  Serial3.print("\t|            |                         |           |                     \r\n");
  Serial3.print("\t|            |                         |           |                     \r\n");
  Serial3.print("\t|    door    |                         |           |                     \r\n");
  Serial3.print("\t|            |                         |           |                     \r\n");
  Serial3.print("\t|------------|                         |           |                     \r\n");
  Serial3.print("\t                          |------------|           |                     \r\n");
  Serial3.print("\t                          |                        |                     \r\n");
  Serial3.print("\t                          |         kitchen        |                     \r\n");
  Serial3.print("\t                          |                        |                     \r\n");
  Serial3.print("\t                          |                        |                     \r\n");
  Serial3.print("\t                          |------------------------|                     \r\n");
  Serial3.print("hudi: ");
  Serial3.print(humidity.read());
  Serial3.println("%");
  Serial3.print("temp: ");
  Serial3.print(temper.getTemperatureC());
  Serial3.print("℃");
  Serial3.print("\n\nlight Off\n\n\n\n\n\n\n\n\n\n\n\r\n");
}

void blueprint_room1and2andtoilet_open(){
  Serial3.print("\t-------------------------------------------------------------------\r\n");
  Serial3.print("\t|                                                                 |\r\n");
  Serial3.print("\t|                            veranda                              |\r\n");
  Serial3.print("\t|                                                                 |\r\n");
  Serial3.print("\t-------------------------------------------------------------------\r\n");
  Serial3.print("\t|                 |                                  |            |\r\n");
  Serial3.print("\t|                 |                                  |            |\r\n");
  Serial3.print("\t|                 |                                  |            |\r\n");
  Serial3.print("\t|     room 1      |                                  |    room 2  |\r\n");
  Serial3.print("\t|                 |                                  |            |\r\n");
  Serial3.print("\t|                 |                                  |            |\r\n");
  Serial3.print("----------|    ------------                                  ------   |----\r\n");
  Serial3.print("|       | |                                                           |   |\r\n");
  Serial3.print("|   t   | |              living room                                      |\r\n");
  Serial3.print("|   o   ------                                               -------------|\r\n");
  Serial3.print("|   i                                                        |            |\r\n");
  Serial3.print("|   l                                                        |            |\r\n");
  Serial3.print("|   e   |                                                    |   room 3   |\r\n");
  Serial3.print("|   t   |                                                    |            |\r\n");
  Serial3.print("|       |                                                    |            |\r\n");
  Serial3.print("|-----------------------------------------           ---------------------|\r\n");
  Serial3.print("\t|            |                         |           |                     \r\n");
  Serial3.print("\t|            |                         |           |                     \r\n");
  Serial3.print("\t|    door    |                         |           |                     \r\n");
  Serial3.print("\t|            |                         |           |                     \r\n");
  Serial3.print("\t|------------|                         |           |                     \r\n");
  Serial3.print("\t                          |------------|           |                     \r\n");
  Serial3.print("\t                          |                        |                     \r\n");
  Serial3.print("\t                          |         kitchen        |                     \r\n");
  Serial3.print("\t                          |                        |                     \r\n");
  Serial3.print("\t                          |                        |                     \r\n");
  Serial3.print("\t                          |------------------------|                     \r\n");
  Serial3.print("hudi: ");
  Serial3.print(humidity.read());
  Serial3.println("%");
  Serial3.print("temp: ");
  Serial3.print(temper.getTemperatureC());
  Serial3.print("℃");
  Serial3.print("\n\nlight Off\n\n\n\n\n\n\n\n\n\n\n\r\n");
}

void blueprint_room1andtoilet_open(){
  Serial3.print("\t-------------------------------------------------------------------\r\n");
  Serial3.print("\t|                                                                 |\r\n");
  Serial3.print("\t|                            veranda                              |\r\n");
  Serial3.print("\t|                                                                 |\r\n");
  Serial3.print("\t-------------------------------------------------------------------\r\n");
  Serial3.print("\t|                 |                                  |            |\r\n");
  Serial3.print("\t|                 |                                  |            |\r\n");
  Serial3.print("\t|                 |                                  |            |\r\n");
  Serial3.print("\t|     room 1      |                                  |    room 2  |\r\n");
  Serial3.print("\t|                 |                                  |            |\r\n");
  Serial3.print("\t|                 |                                  |            |\r\n");
  Serial3.print("----------|    ------------                                  --------------\r\n");
  Serial3.print("|       | |                                                               |\r\n");
  Serial3.print("|   t   | |              living room                                      |\r\n");
  Serial3.print("|   o   -------                                              -------------|\r\n");
  Serial3.print("|   i                                                        |            |\r\n");
  Serial3.print("|   l                                                        |            |\r\n");
  Serial3.print("|   e   |                                                    |   room 3   |\r\n");
  Serial3.print("|   t   |                                                    |            |\r\n");
  Serial3.print("|       |                                                    |            |\r\n");
  Serial3.print("|-----------------------------------------           ---------------------|\r\n");
  Serial3.print("\t|            |                         |           |                     \r\n");
  Serial3.print("\t|            |                         |           |                     \r\n");
  Serial3.print("\t|    door    |                         |           |                     \r\n");
  Serial3.print("\t|            |                         |           |                     \r\n");
  Serial3.print("\t|------------|                         |           |                     \r\n");
  Serial3.print("\t                          |------------|           |                     \r\n");
  Serial3.print("\t                          |                        |                     \r\n");
  Serial3.print("\t                          |         kitchen        |                     \r\n");
  Serial3.print("\t                          |                        |                     \r\n");
  Serial3.print("\t                          |                        |                     \r\n");
  Serial3.print("\t                          |------------------------|                     \r\n");
  Serial3.print("hudi: ");
  Serial3.print(humidity.read());
  Serial3.println("%");
  Serial3.print("temp: ");
  Serial3.print(temper.getTemperatureC());
  Serial3.print("℃");
  Serial3.print("\n\nlight Off\n\n\n\n\n\n\n\n\n\n\n\r\n");
}

void blueprint_room1androom3_open(){
  Serial3.print("\t-------------------------------------------------------------------\r\n");
  Serial3.print("\t|                                                                 |\r\n");
  Serial3.print("\t|                            veranda                              |\r\n");
  Serial3.print("\t|                                                                 |\r\n");
  Serial3.print("\t-------------------------------------------------------------------\r\n");
  Serial3.print("\t|                 |                                  |            |\r\n");
  Serial3.print("\t|                 |                                  |            |\r\n");
  Serial3.print("\t|                 |                                  |            |\r\n");
  Serial3.print("\t|     room 1      |                                  |    room 2  |\r\n");
  Serial3.print("\t|                 |                                  |            |\r\n");
  Serial3.print("\t|                 |                                  |            |\r\n");
  Serial3.print("----------|    ------------                                  --------------\r\n");
  Serial3.print("|       | |                                                               |\r\n");
  Serial3.print("|   t   |                living room                                  |   |\r\n");
  Serial3.print("|   o   |                                                    -----    |---|\r\n");
  Serial3.print("|   i   |                                                    |            |\r\n");
  Serial3.print("|   l   |                                                    |            |\r\n");
  Serial3.print("|   e   |                                                    |   room 3   |\r\n");
  Serial3.print("|   t   |                                                    |            |\r\n");
  Serial3.print("|       |                                                    |            |\r\n");
  Serial3.print("|-----------------------------------------           ---------------------|\r\n");
  Serial3.print("\t|            |                         |           |                     \r\n");
  Serial3.print("\t|            |                         |           |                     \r\n");
  Serial3.print("\t|    door    |                         |           |                     \r\n");
  Serial3.print("\t|            |                         |           |                     \r\n");
  Serial3.print("\t|------------|                         |           |                     \r\n");
  Serial3.print("\t                          |------------|           |                     \r\n");
  Serial3.print("\t                          |                        |                     \r\n");
  Serial3.print("\t                          |         kitchen        |                     \r\n");
  Serial3.print("\t                          |                        |                     \r\n");
  Serial3.print("\t                          |                        |                     \r\n");
  Serial3.print("\t                          |------------------------|                     \r\n");
  Serial3.print("hudi: ");
  Serial3.print(humidity.read());
  Serial3.println("%");
  Serial3.print("temp: ");
  Serial3.print(temper.getTemperatureC());
  Serial3.print("℃");
  Serial3.print("\n\nlight Off\n\n\n\n\n\n\n\n\n\n\n\r\n");
}

void setup()
{
  humidity.begin(HUMI_ADC);
  temper.begin(TEMP_ADDR);
  Serial3.begin(115200);
  myled.begin(36);
  dUltra.begin(75, 2);
  pushSwitch.begin();
  lcd.begin(62, 63, 64, 65, 66, 67, 45, 44, 43, 42, 16, 2);
  lcd.onBacklightBlue();
  blueprint();
}
void loop()
{
  int room1=0,room2=0,room3=0,toilet=0;
  uint8_t pushKey;
  int distance=0;
  distance = dUltra.ReadDistanceCentimeter();
  delay(100);
  if(distance<50)
  {
    myled.AllOn();
    blueprint_door_open();
    delay(3000);
    myled.AllOff();
    blueprint();
  }
  if(pushKey>0)
  {
   if(pushKey == 1)
   {
    
     if(room1==0){
      
    if(room2==1 && room3==1 && toilet==1)
     {
       blueprint_all_open();
       room1=1;
     }
     else if(room2==1 && room3==0 && toilet==0)
     {
       blueprint_room1and2_open();
       room1=1;
     }
    
     else if(room2==1 && room3==0 && toilet==1)
     {
       blueprint_room1and2andtoilet_open();
       room1=1;
     }
    
     else if(room2==0 && room3==1 && toilet==0)
     {
       blueprint_room1androom3_open();
       room1=1;
     }
    
     else if(room2==0 && room3==0 && toilet==1)
     {
       blueprint_room1andtoilet_open();
       room1=1;
     }
    
     else if(room2==0 && room3==0 && toilet==0)
     {
     room1=1;
     blueprint_room1_open();
     }
     }
    
     else if(room1==1)
     {
      if(room2==0 && room3==0)
     {
      blueprint();
      room1=0;
     }
    
    
    
     }
    
   }
  
   else if(pushKey==2)
   {
    
   }
  
  }
 
 

 

 

 

 

  • BASIC4MCU 작성글 SNS에 공유하기
  • 페이스북으로 보내기
  • 트위터로 보내기
  • 구글플러스로 보내기
  • 카카오톡으로 보내기

댓글 : 0

조회수 : 9,413

등록된 댓글이 없습니다.

게시물 검색

BASIC4MCU > 질문게시판 목록

제목 날짜
공지 MCU, AVR, 아두이노 등 전자공학에 관련된 질문은… 스태프  19-01-15
공지 사이트 이용 안내 댓글[31] master  17-10-29
질문 Energia 시리얼 모니터에 아무것도 출력되지않습니다… 댓글[1] 김의공  24-05-22
질문 아두이노 스위치, 에어펌프 연결 댓글[1] 첨부파일존존  24-05-20
질문 MSP430런치패드를 이용한 LCD 코딩 관련 질문 댓글[1] 뀨쥰이  24-05-16
질문 생활 속 가스 센서 첨부파일Fosen  24-05-13
질문 atmega128A로 초음파센서 바밤  24-05-13
답변 답변 : atmega128A로 초음파센서 master  24-05-13
질문 eeprom 값 출력이 다르게 나옵니다 댓글[5] 첨부파일idghte  24-05-05
답변 답변 : eeprom 값 출력이 다르게 나옵니다 master  24-05-05
질문 센서나 블루투스에서 조건문이 실행이 느립니다. 현아  24-05-03
답변 답변 : 센서나 블루투스에서 조건문이 실행이 느립니다. master  24-05-03
질문 님들 MG811 이산화탄소 센서를 쓰는데 라칸  24-05-03
답변 답변 : 님들 MG811 이산화탄소 센서를 쓰는데 master  24-05-03
질문 아두이노와 디지털 홀센서 사용 중 sampling ra… 첨부파일fjur564  24-05-03
답변 답변 : 아두이노와 디지털 홀센서 사용 중 sampli… master  24-05-03
질문 OP AMP 댓글[1] 첨부파일창원거북이  24-05-02
질문 라즈베리파이 라우팅 테이블을 영구 추가하려는데 라칸  24-04-30
질문 hc-05 블루투스와 가스센서 서브모터(sg-90) 코… wwqa  24-04-29
답변 답변 : hc-05 블루투스와 가스센서 서브모터(sg-… 댓글[1] master  24-04-29
질문 BW16 Wifi 모듈에 대한 질문좀 댓글[1] 라칸  24-04-25
질문 블루투스(hc-05) 서브모터(sg-90) 연동 질문 … wwqa  24-04-24
답변 답변 : 블루투스(hc-05) 서브모터(sg-90) 연… 댓글[2] master  24-04-24
질문 STM32F401보드 TCRT5000 적외선 감지센서 댓글[1] Orida  24-04-18
질문 눈 깜빡임 감지 아두이노 코딩 댓글[2] 에버튼  24-04-18
질문 시리얼 통신 관련 질문드립니다. ㅜ 카르니코스  24-04-18
답변 답변 : 시리얼 통신 관련 질문드립니다. ㅜ 댓글[6] master  24-04-18
질문 아두이노 PWM 제어 질문 있습니다. 댓글[1] 홍현우  24-04-17
질문 초음파센서에 아무것도 잡히지 않을 시 그래프를 비워놓는… idghte  24-04-14
답변 답변 : 초음파센서에 아무것도 잡히지 않을 시 그래프를… master  24-04-14
게시물 검색


Privacy Policy
MCU BASIC ⓒ 2017
PC버전