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

TODAY1,354 TOTAL2,170,304
사이트 이용안내
Login▼/회원가입
최신글보기 질문게시판 기술자료 동영상강좌

아두이노 센서 ATMEGA128 PWM LED 초음파 AVR 블루투스 LCD UART 모터 적외선


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

페이지 정보

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

조회수 3,682

등록된 댓글이 없습니다.

질문게시판HOME > 질문게시판 목록

MCU, AVR, 아두이노 등 전자공학에 관련된 질문을 무료회원가입 후 작성해주시면 전문가가 답변해드립니다.
ATMEGA128PWMLED초음파
아두이노AVR블루투스LCD
UART모터적외선ATMEGA
전체 스위치 센서
질문게시판 목록
제목 작성자 작성일 조회
공지 MCU, AVR, 아두이노 등 전자공학에 관련된 질문은 질문게시판에서만 작성 가능합니다. 스태프 19-01-15 9675
공지 사이트 이용 안내댓글[24] master 17-10-29 29759
질문 adc, uart dma댓글[2] 새글첨부파일 hiㅡO3O 13:10 15
질문 ADC,uart DMA댓글[1] 이미지새글첨부파일 hiㅡO3O 12:23 15
질문 아두이노 스텝모터 리미트 문의드립니다.댓글[1] 이미지새글첨부파일 스트렌져 22-05-24 19
질문 진동센서와 서보모터 연결 코드 질문입니다!댓글[1] 새글 제리 22-05-24 19
질문 atmega128 GPS,블루투스 질문드립니다.댓글[1] 새글 코딩초보1 22-05-24 28
질문 서보모터 제어에 관하여 궁금합니다댓글[2] 이미지새글첨부파일 오소로롯 22-05-24 32
질문 atmega 128 타이머 작성 중 질문 드립니다.댓글[6] 이미지새글 마프하나 22-05-23 45
질문 아두이노와 휴대폰을 HC-06으로 연결시켜서 블루투스연결이 끊기면 부저에서 소리가 나게 할려하는데 어떻게 해…댓글[1] 새글 졸작부수다 22-05-23 139
답변 답변글 답변 : 아두이노와 휴대폰을 HC-06으로 연결시켜서 블루투스연결이 끊기면 부저에서 소리가 나게 할려하는데 … 새글 master 22-05-24 19
질문 보드레이트 질문댓글[1] 새글 죠르디 22-05-23 20
질문 atmega 128 블루투스 질문 입니다댓글[1] 새글 yhj2644 22-05-23 36
질문 아트메가 공부중에 질문있습니다..댓글[1] suid82 22-05-23 23
질문 Atmega128 UART통신 echo 반복 질문댓글[2] ming2ming 22-05-23 32
질문 아두이노의 지속 시간에 대해 질문합니다. merry 22-05-23 36
답변 답변글 답변 : 아두이노의 지속 시간에 대해 질문합니다. master 22-05-23 30
질문 초음파+스텝모터 도꺼비 22-05-22 26
답변 답변글 답변 : 초음파+스텝모터 master 22-05-23 31
질문 아두이노 인터럽트 질문있습니다.댓글[1] 띵꽁 22-05-22 36
답변 답변글 답변 : 아두이노 인터럽트 질문있습니다.댓글[3] master 22-05-22 36
질문 atmega128 스톱워치 작성 중 외부 인터럽트 관련 질문 드립니다.댓글[4] 이미지 마프하나 22-05-22 54
답변 답변글 답변 : atmega128 스톱워치 작성 중 외부 인터럽트 관련 질문 드립니다.댓글[1] 이미지 master 22-05-23 32
질문 서보모터제어 해당코드에서 어떤걸 추가해야할까요댓글[3] 이미지첨부파일 오소로롯 22-05-22 38
질문 Atmega128 UART통신에서 ECHO 관련 질문드립니다. dsfdfsa 22-05-22 39
답변 답변글 답변 : Atmega128 UART통신에서 ECHO 관련 질문드립니다.댓글[1] master 22-05-22 31
질문 아두이노 서보모터제어 하나도 모르겠습니다 ㅠ댓글[2] 이미지첨부파일 오소로롯 22-05-21 57
질문 아트메가 128 을 이용해서적외선 센서 코딩 중 물어볼게있습니다!!댓글[5] noster 22-05-21 61
질문 아두이노 에러질문댓글[2] 이미지첨부파일 리니어 22-05-21 57
질문 아두이노 블루투스 통신 관련 질문 있습니다!! 블루툿 22-05-21 46
게시물 검색

2022년 1월 2월 3월 4월 5월 6월 7월 8월 9월 10월 11월 12월
2021년 1월 2월 3월 4월 5월 6월 7월 8월 9월 10월 11월 12월
2020년 1월 2월 3월 4월 5월 6월 7월 8월 9월 10월 11월 12월
2019년 1월 2월 3월 4월 5월 6월 7월 8월 9월 10월 11월 12월
2018년 1월 2월 3월 4월 5월 6월 7월 8월 9월 10월 11월 12월
Privacy Policy
MCU BASIC ⓒ 2020
모바일버전으로보기