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

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

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

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

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

BASIC4MCU > 질문게시판

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

페이지 정보

작성자 냉냉냥성냥 작성일18-12-02 20:10 조회4,028회 댓글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

조회수 : 4,028

등록된 댓글이 없습니다.

게시물 검색

BASIC4MCU > 질문게시판 목록

제목 날짜
공지 MCU, AVR, 아두이노 등 전자공학에 관련된 질문은… 스태프  19-01-15
공지 사이트 이용 안내 댓글[25] master  17-10-29
질문 Atmega IO핀 출력 상태 질문이요.. 댓글[3] chelsea 새글 13:32
답변 답변 : Atmega IO핀 출력 상태 질문이요.. 댓글[6] master 새글 14:34
질문 아두이노 센서 쉴드 v5.0 과 음성인식 모듈(V2)통… 댓글[6] 첨부파일AutoSun 새글 22-07-05
질문 초음파 센서를 사용한 dc모터 제어에 관해 질문 있습니… 첨부파일뉴비에오 새글 22-07-04
답변 답변 : 초음파 센서를 사용한 dc모터 제어에 관해 질… 댓글[2] master 새글 22-07-05
질문 아두이노 Sensor Shield 5.0 시리얼 통신 … 댓글[2] AutoSun  22-07-04
질문 Atmega 코드 좀 봐주세요. 댓글[1] 첨부파일chelsea  22-07-04
질문 아두이노 while문 탈출 질문 yhj2644  22-07-01
답변 답변 : 아두이노 while문 탈출 질문 댓글[8] master  22-07-01
질문 ESP32-C3 리튬폴리머 ADC 전압 체크 관련 문의… 댓글[3] cansad  22-06-30
질문 ESP32-C3 리튬폴리머 ADC 전압 체크 관련 문의 댓글[3] cansad  22-06-30
질문 빵판없이 디스플레이 넣을 수 있을까요? 댓글[2] 첨부파일오소로롯  22-06-29
질문 라즈베리파이4 신형 선택문제 댓글[1] maximum  22-06-26
질문 음전압 ADC 댓글[2] 412904  22-06-26
질문 아두이노 센서값 출력 질문입니다! 댓글[1] 아궁2  22-06-24
질문 ATmega128, ATmega28 RS232통신 첨부파일Moon4201  22-06-24
답변 답변 : ATmega128, ATmega28 RS232… 댓글[1] master  22-06-25
질문 서보모터, 온습도센서 코드 질문 댓글[2] 첨부파일kshdlfaldfh  22-06-22
답변 답변 : 서보모터, 온습도센서 코드 질문 댓글[15] master  22-06-22
질문 steppermulti5 질문 응애  22-06-21
답변 답변 : steppermulti5 질문 댓글[1] master  22-06-22
질문 atmega128 avr usart 질문 snoflak  22-06-21
답변 답변 : atmega128 avr usart 질문 댓글[5] master  22-06-21
질문 사용자 정의 함수 변환 하는 방법 댓글[2] 첨부파일da0800  22-06-21
질문 atmega128 댓글[1] 양의노래  22-06-20
질문 아두이노 동시동작 재질문 댓글[9] 첨부파일죠르디  22-06-20
질문 초음파센서로 dc모터 제어하기 댓글[1] 첨부파일난쟁2  22-06-20
질문 아두이노 동시동작 댓글[7] 죠르디  22-06-19
게시물 검색


Privacy Policy
MCU BASIC ⓒ 2017
PC버전