프로젝트

나도 메이커! 메이커스 여러분들의 작품/프로젝트를 공유하는 공간입니다.

Laser Gun 만들기 [PART1]

2015-06-30 17:52:30

안녕하세요~ Sabo 입니다.

그동안 여러가지 프로젝트를 동시에 진행하느라 오랜만에 프로젝트를 작성하게 되네요.

요즘 Weather Cube[Part1]와 (비밀 프로젝트)를 열심히 만들고 있느라.... 정신없이 바쁜날을 보내고 있어요...

어느날 점심 시간, 팀장님께서 말씀하시길... " 점심 메뉴를 정하거나 내기를 할만한 장치를 만드는 것이 어떨까?"

라고 하시더군요....^^;;a 

 

자 그럼 Weather Cube와 (비밀 프로젝트)는 저 구석에 짱박아두고.... 아두이노를 이용하여 내기를 할 만한 장치가 무엇이

있을까 하고 생각해봤는데요~ 게임을 좋아해서 그런지 사!격! 이 두글자 밖에 생각이 나질 않더군요 ㅎㅎ(군필자 만세!)

바로 요런 것들 ㅎㅎ

 

 

그래서 이번 프로젝트는 레이저 총과 과녘을 만들어 맞추는 장난감?!을 만들어 보도록 하겠습니다.

 

 

<개요>

 

[PART 1] 레이저를 이용한 장난감 총을 만들어 봅니다.

[PART 2] PART 1과 호환되는 과녘을 만들어 봅니다.

 

 

<사전 필요 지식>

 

이번 프로젝트는 잡다한 여러가지 기술들이 들어가기 때문에 사전에 꼭 보고 오셔야 할 것들이 많습니다.

조금 귀찮더라도 더욱 쉽고 빠르게 만들기 위해선 꼭꼭 공부하고 오시길 바래요~

 

OLED 사용하기

버튼 스위치 사용하기

지그비 쉴드 사용하기

 

 

<프로젝트 사진>

 

 

 

일단 완성된 레이저 총 사진입니다. 멋지죠??

저는 이 프로젝트를 LASER AWP라고 부르고 있답니다. (Counter Strike 해보신 분들만 이해 하실 내용이죠 ㅎㅎ)

 

 

 

<동영상 미리 보기>

 

(PART 2)에서 과녘과 함께 시연하는 동영상을 게시하도록 하겠습니다.

 

 

<필요한 부품>

 

No PART QTY ETC
1 Orange Board 1  
2 Zigbee Shield 1  
3 OLED Display 1 Adafruit
4 Laser Module 1  
5 Resistor 2 1K Ohm
6 Bread Board 1  
7 Button Switch 2  
8 Form Board 1~2 Black

 

OrangeBoard Zigbee Shield OLED Display LaserModule Resistor Bread Board ButtonSwitch Form Board

 

 

<하드웨어 메이킹>

 

 

(브레드 보드 레이아웃)

 

 

 

OLED 패널을 제외하고는 복잡한 회로가 없습니다. 장전 버튼과 발사 버튼 그리고 레이저 모듈은 VCC,GND,DATA 3핀만 연결해주시면 됩니다.

OLED패널 역시 할당해야 하는 핀이 많지만 추가적으로 필요한 회로가 없어 단순히 연결만 해주면 됩니다. 

 

<제작 과정>

 

이번 프로젝트 외형은 초기 구상시 3D 프린터를 이용하여 만들 계획이었습니다.

따라서 폼보드를 이용하여 개략적인 외관만 제작하였으나... 3D 프린터님께서 몸져 눕는 바람에

외형을 따로 출력하지 못했습니다 ㅠ_ㅇ..... 폼 보드를 사각형으로 오려 붙여서 모양만 나타나게 했기 때문에

다소 퀄리티가 떨어지는 면이 없잖아 있는데요... 외형의 경우 3D프린터가 고쳐지는대로 업데이트 할 예정입니다.^^

 

 

 

총구 부분입니다. 사실 총구 끝엔 레이저 포인터가 숨어있습니다. 어렸을 때 자주 가지고 놀던 레이저 포인터와 똑같은 모듈입니다.

 

 

총신 중간에 달려있는 버튼 스위치 입니다. 이 스위치의 역할은 '장전'!!!! 이지만 기능적으로는 과녘에 맞출 레이저를 활성화 시키기 위한 버튼입니다.

 

 

전원과 접지가 많이 사용되어 일단 브레드 보드를 붙였긴 했지만... 좀더 작은 사이즈의 브레드 보드를 사용하셔도 됩니다.

 

 

오렌지 보드와 지그비 쉴드의 모습입니다. 오렌지 보드의 평평한 면을 바로 붙였습니다. 보드 자체는 괜찮지만

선처리가 깔끔하게 되지 않은게 좀 아쉽습니다... 선들이 자신있게 여기저기 뻗어있어 정리하는게 보통일이 아니더라구요.

 

 

OLED 패널입니다. OLED 패널은 사격의 성공했을 때 또는 실패했을 때 알려주는 역할을 합니다. 요 녀석을 고정시키는게

상당히 어렵습니다. 저 같은 경우는 총신에 흠집을 내어 구겨 넣었습니다.

 

 

최초 장전시 Nepes Logo가 출력됩니다.

 

 

이 부분은 총에서 가장가장 중요한 방아쇠....는 아니고 발사 버튼 입니다. 장전 손잡이와 마찬가지로

평평한 부분을 손잡이 또는 총신에 접착시키고 두개의 핀을 옆 면으로 빼는 방법으로 부착합니다.

 

 

완성된 모습인데요~ 선들 때문에 이게 총인지 선뭉치인지....사진으로는 구분이 잘 되지 않네요 ㅎㅎ 

하지만 앞에서 보았던 전체 사진을 보시면 꽤 그럴 듯한 외형입니다. (처음 완성했을 땐 정말 멋있었습니다.)

사진에서 책상 밑의 붉은 점이 피격?!되는 지점입니다. 참고로 말씀드리자면 다음 [PART 2]에서 만든 과녘은

실제로 저 Laser 포인터 크기만한 점입니다. 

 

 

 

<아두이노 코드>

 

 

이번 아두이노 코드는 '비트맵' 코드로 인해 길이가 상당히 깁니다.

 

#include "U8glib.h"                                // OLED LCD 제어 라이브러리를 추가합니다.
U8GLIB_SSD1306_128X64 u8g(13, 11, 10, 9,8);        // OLED LCD와 연결할 핀을 설정 합니다.

const uint8_t dice1[] U8G_PROGMEM = {              // 주사위 1에 대한 Bitmap 소스 입니다.
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,         // <이후 Part2에서 과녘과 연동시 사용합니다.>  
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x01,0xFF,0xFF,0xFF,0xF8,0x00,0x00,
  0x00,0x0F,0x00,0x00,0x00,0x0E,0x00,0x00,
  0x00,0x30,0x00,0x00,0x00,0x00,0xC0,0x00,
  0x00,0xC0,0x00,0x00,0x00,0x00,0x60,0x00,
  0x01,0x80,0x00,0x00,0x00,0x00,0x18,0x00,
  0x03,0x00,0x00,0x00,0x00,0x00,0x0C,0x00,
  0x04,0x00,0x00,0x00,0x00,0x00,0x06,0x00,
  0x0C,0x00,0x00,0x00,0x00,0x00,0x03,0x00,
  0x18,0x00,0x00,0x00,0x00,0x00,0x01,0x00,
  0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x80,
  0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x80,
  0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x40,
  0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,
  0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x60,
  0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x20,
  0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x20,
  0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x20,
  0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x20,
  0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x20,
  0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x20,
  0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x20,
  0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x20,
  0xC0,0x00,0x00,0x1F,0x00,0x00,0x00,0x20,
  0xC0,0x00,0x00,0x7F,0xC0,0x00,0x00,0x20,
  0xC0,0x00,0x00,0x7F,0xC0,0x00,0x00,0x20,
  0xC0,0x00,0x00,0xFF,0xE0,0x00,0x00,0x20,
  0xC0,0x00,0x00,0xFF,0xE0,0x00,0x00,0x20,
  0xC0,0x00,0x00,0xFF,0xE0,0x00,0x00,0x20,
  0xC0,0x00,0x00,0x7F,0xE0,0x00,0x00,0x20,
  0xC0,0x00,0x00,0x7F,0xC0,0x00,0x00,0x20,
  0xC0,0x00,0x00,0x3F,0x80,0x00,0x00,0x20,
  0xC0,0x00,0x00,0x06,0x00,0x00,0x00,0x20,
  0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x20,
  0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x20,
  0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x20,
  0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x20,
  0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x20,
  0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x20,
  0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x20,
  0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x20,
  0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x40,
  0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x40,
  0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x40,
  0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x80,
  0x10,0x00,0x00,0x00,0x00,0x00,0x01,0x80,
  0x08,0x00,0x00,0x00,0x00,0x00,0x01,0x00,
  0x0C,0x00,0x00,0x00,0x00,0x00,0x02,0x00,
  0x06,0x00,0x00,0x00,0x00,0x00,0x04,0x00,
  0x03,0x00,0x00,0x00,0x00,0x00,0x08,0x00,
  0x01,0x80,0x00,0x00,0x00,0x00,0x30,0x00,
  0x00,0x60,0x00,0x00,0x00,0x00,0x60,0x00,
  0x00,0x38,0x00,0x00,0x00,0x01,0x80,0x00,
  0x00,0x07,0xC0,0x00,0x00,0x3C,0x00,0x00,
  0x00,0x00,0xFF,0xFF,0xFF,0xF0,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
};

const uint8_t dice2[] U8G_PROGMEM = {          //주사위 2에 대한 Bitmap 소스 입니다.
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x03,0xFF,0xFF,0xFF,0x00,0x00,
  0x00,0x1C,0x00,0x00,0x01,0xC0,0x00,
  0x00,0x60,0x00,0x00,0x00,0x30,0x00,
  0x00,0xC0,0x00,0x00,0x00,0x0C,0x00,
  0x03,0x00,0x00,0x00,0x00,0x06,0x00,
  0x06,0x00,0x00,0x00,0x00,0x03,0x00,
  0x04,0x00,0x00,0x00,0x00,0x01,0x80,
  0x08,0x00,0x00,0x00,0x00,0x00,0xC0,
  0x18,0x00,0x00,0x00,0x00,0x00,0x40,
  0x10,0x0F,0x80,0x00,0x00,0x00,0x20,
  0x20,0x1F,0xC0,0x00,0x00,0x00,0x20,
  0x20,0x3F,0xE0,0x00,0x00,0x00,0x10,
  0x60,0x3F,0xE0,0x00,0x00,0x00,0x10,
  0x40,0x3F,0xE0,0x00,0x00,0x00,0x10,
  0x40,0x3F,0xE0,0x00,0x00,0x00,0x18,
  0x40,0x3F,0xE0,0x00,0x00,0x00,0x08,
  0x40,0x1F,0xC0,0x00,0x00,0x00,0x08,
  0x40,0x0F,0x80,0x00,0x00,0x00,0x08,
  0x40,0x00,0x00,0x00,0x00,0x00,0x08,
  0x40,0x00,0x00,0x00,0x00,0x00,0x08,
  0x40,0x00,0x00,0x00,0x00,0x00,0x08,
  0x40,0x00,0x00,0x00,0x00,0x00,0x08,
  0x40,0x00,0x00,0x00,0x00,0x00,0x08,
  0x40,0x00,0x00,0x00,0x00,0x00,0x08,
  0x40,0x00,0x00,0x00,0x00,0x00,0x08,
  0x40,0x00,0x00,0x00,0x00,0x00,0x08,
  0x40,0x00,0x00,0x00,0x00,0x00,0x08,
  0x40,0x00,0x00,0x00,0x00,0x00,0x08,
  0x40,0x00,0x00,0x00,0x00,0x00,0x08,
  0x40,0x00,0x00,0x00,0x00,0x00,0x08,
  0x40,0x00,0x00,0x00,0x00,0x00,0x08,
  0x40,0x00,0x00,0x00,0x00,0x00,0x08,
  0x40,0x00,0x00,0x00,0x00,0x00,0x08,
  0x40,0x00,0x00,0x00,0x02,0x00,0x08,
  0x40,0x00,0x00,0x00,0x0F,0xC0,0x08,
  0x40,0x00,0x00,0x00,0x1F,0xE0,0x08,
  0x40,0x00,0x00,0x00,0x3F,0xE0,0x08,
  0x40,0x00,0x00,0x00,0x3F,0xE0,0x18,
  0x40,0x00,0x00,0x00,0x3F,0xF0,0x10,
  0x60,0x00,0x00,0x00,0x3F,0xE0,0x10,
  0x20,0x00,0x00,0x00,0x1F,0xE0,0x10,
  0x20,0x00,0x00,0x00,0x1F,0xC0,0x20,
  0x10,0x00,0x00,0x00,0x07,0x80,0x20,
  0x10,0x00,0x00,0x00,0x00,0x00,0x40,
  0x08,0x00,0x00,0x00,0x00,0x00,0xC0,
  0x0C,0x00,0x00,0x00,0x00,0x00,0x80,
  0x06,0x00,0x00,0x00,0x00,0x01,0x00,
  0x03,0x00,0x00,0x00,0x00,0x06,0x00,
  0x01,0x80,0x00,0x00,0x00,0x0C,0x00,
  0x00,0x60,0x00,0x00,0x00,0x38,0x00,
  0x00,0x1C,0x00,0x00,0x00,0xE0,0x00,
  0x00,0x07,0xFF,0xFF,0xFF,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x00
};


const uint8_t dice3[] U8G_PROGMEM = {          //주사위 3에 대한 Bitmap 소스 입니다.
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0xFF,0xFF,0xFF,0xFE,0x00,0x00,
  0x00,0x07,0x80,0x00,0x00,0x03,0x80,0x00,
  0x00,0x0C,0x00,0x00,0x00,0x00,0x60,0x00,
  0x00,0x30,0x00,0x00,0x00,0x00,0x38,0x00,
  0x00,0x60,0x00,0x00,0x00,0x00,0x0C,0x00,
  0x00,0x80,0x00,0x00,0x00,0x00,0x06,0x00,
  0x01,0x00,0x00,0x00,0x00,0x00,0x03,0x00,
  0x03,0x00,0x00,0x00,0x00,0x00,0x01,0x80,
  0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x80,
  0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x40,
  0x08,0x01,0xF0,0x00,0x00,0x00,0x00,0x60,
  0x08,0x07,0xF8,0x00,0x00,0x00,0x00,0x20,
  0x18,0x07,0xFC,0x00,0x00,0x00,0x00,0x20,
  0x10,0x0F,0xFC,0x00,0x00,0x00,0x00,0x30,
  0x10,0x0F,0xFE,0x00,0x00,0x00,0x00,0x10,
  0x30,0x0F,0xFE,0x00,0x00,0x00,0x00,0x10,
  0x20,0x0F,0xFC,0x00,0x00,0x00,0x00,0x10,
  0x20,0x07,0xFC,0x00,0x00,0x00,0x00,0x18,
  0x20,0x07,0xF8,0x00,0x00,0x00,0x00,0x18,
  0x20,0x03,0xF0,0x00,0x00,0x00,0x00,0x18,
  0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x18,
  0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x18,
  0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x18,
  0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x18,
  0x20,0x00,0x00,0x0F,0xC0,0x00,0x00,0x18,
  0x20,0x00,0x00,0x1F,0xE0,0x00,0x00,0x18,
  0x20,0x00,0x00,0x3F,0xF0,0x00,0x00,0x18,
  0x20,0x00,0x00,0x3F,0xF0,0x00,0x00,0x18,
  0x20,0x00,0x00,0x3F,0xF0,0x00,0x00,0x18,
  0x20,0x00,0x00,0x3F,0xF0,0x00,0x00,0x18,
  0x20,0x00,0x00,0x3F,0xF0,0x00,0x00,0x18,
  0x20,0x00,0x00,0x1F,0xF0,0x00,0x00,0x18,
  0x20,0x00,0x00,0x1F,0xE0,0x00,0x00,0x18,
  0x20,0x00,0x00,0x0F,0xC0,0x00,0x00,0x18,
  0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x18,
  0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x18,
  0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x18,
  0x20,0x00,0x00,0x00,0x00,0x0C,0x00,0x18,
  0x20,0x00,0x00,0x00,0x00,0x3F,0x00,0x18,
  0x20,0x00,0x00,0x00,0x00,0x7F,0x80,0x18,
  0x20,0x00,0x00,0x00,0x00,0xFF,0xC0,0x18,
  0x20,0x00,0x00,0x00,0x00,0xFF,0xC0,0x10,
  0x30,0x00,0x00,0x00,0x00,0xFF,0xC0,0x10,
  0x10,0x00,0x00,0x00,0x00,0xFF,0xC0,0x10,
  0x10,0x00,0x00,0x00,0x00,0xFF,0xC0,0x10,
  0x18,0x00,0x00,0x00,0x00,0xFF,0x80,0x20,
  0x08,0x00,0x00,0x00,0x00,0x7F,0x80,0x20,
  0x08,0x00,0x00,0x00,0x00,0x1E,0x00,0x60,
  0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x40,
  0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x80,
  0x02,0x00,0x00,0x00,0x00,0x00,0x01,0x80,
  0x01,0x00,0x00,0x00,0x00,0x00,0x03,0x00,
  0x00,0x80,0x00,0x00,0x00,0x00,0x06,0x00,
  0x00,0x60,0x00,0x00,0x00,0x00,0x0C,0x00,
  0x00,0x30,0x00,0x00,0x00,0x00,0x18,0x00,
  0x00,0x1C,0x00,0x00,0x00,0x00,0x60,0x00,
  0x00,0x07,0x00,0x00,0x00,0x03,0xC0,0x00,
  0x00,0x00,0xFF,0xFF,0xFF,0xFE,0x00,0x00,
  0x00,0x00,0x07,0xFF,0xFF,0xC0,0x00,0x00
};


const uint8_t dice4[] U8G_PROGMEM = {          //주사위 4에 대한 Bitmap 소스 입니다.
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x7F,0xFF,0xFF,0xC0,0x00,0x00,
  0x00,0x03,0xC0,0x00,0x00,0x7C,0x00,0x00,
  0x00,0x0C,0x00,0x00,0x00,0x07,0x00,0x00,
  0x00,0x30,0x00,0x00,0x00,0x01,0x80,0x00,
  0x00,0x60,0x00,0x00,0x00,0x00,0x60,0x00,
  0x00,0x80,0x00,0x00,0x00,0x00,0x30,0x00,
  0x01,0x00,0x00,0x00,0x00,0x00,0x18,0x00,
  0x02,0x00,0x00,0x00,0x00,0x00,0x0C,0x00,
  0x06,0x00,0x00,0x00,0x00,0x00,0x04,0x00,
  0x04,0x00,0x00,0x00,0x00,0x00,0x02,0x00,
  0x08,0x03,0xE0,0x00,0x00,0xF8,0x02,0x00,
  0x08,0x07,0xF0,0x00,0x01,0xFC,0x01,0x00,
  0x10,0x0F,0xF8,0x00,0x03,0xFE,0x01,0x00,
  0x10,0x0F,0xF8,0x00,0x03,0xFE,0x01,0x80,
  0x10,0x1F,0xFC,0x00,0x03,0xFF,0x00,0x80,
  0x30,0x0F,0xFC,0x00,0x03,0xFF,0x00,0x80,
  0x20,0x0F,0xF8,0x00,0x03,0xFE,0x00,0x80,
  0x20,0x0F,0xF8,0x00,0x03,0xFE,0x00,0x80,
  0x20,0x07,0xF0,0x00,0x01,0xFC,0x00,0x80,
  0x20,0x01,0xC0,0x00,0x00,0x70,0x00,0x80,
  0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x80,
  0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x80,
  0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x80,
  0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x80,
  0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x80,
  0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x80,
  0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x80,
  0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x80,
  0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x80,
  0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x80,
  0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x80,
  0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x80,
  0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x80,
  0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x80,
  0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x80,
  0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x80,
  0x20,0x03,0xE0,0x00,0x00,0xF8,0x00,0x80,
  0x20,0x07,0xF0,0x00,0x01,0xFC,0x00,0x80,
  0x20,0x0F,0xF8,0x00,0x03,0xFE,0x00,0x80,
  0x20,0x0F,0xF8,0x00,0x03,0xFE,0x00,0x80,
  0x30,0x0F,0xFC,0x00,0x03,0xFF,0x00,0x80,
  0x10,0x1F,0xFC,0x00,0x03,0xFF,0x00,0x80,
  0x10,0x0F,0xF8,0x00,0x03,0xFE,0x01,0x80,
  0x10,0x0F,0xF8,0x00,0x03,0xFE,0x01,0x00,
  0x08,0x07,0xF0,0x00,0x01,0xFC,0x01,0x00,
  0x08,0x03,0xE0,0x00,0x00,0xF8,0x02,0x00,
  0x0C,0x00,0x00,0x00,0x00,0x00,0x02,0x00,
  0x04,0x00,0x00,0x00,0x00,0x00,0x04,0x00,
  0x02,0x00,0x00,0x00,0x00,0x00,0x0C,0x00,
  0x01,0x00,0x00,0x00,0x00,0x00,0x18,0x00,
  0x01,0x80,0x00,0x00,0x00,0x00,0x30,0x00,
  0x00,0x40,0x00,0x00,0x00,0x00,0x60,0x00,
  0x00,0x30,0x00,0x00,0x00,0x01,0xC0,0x00,
  0x00,0x1C,0x00,0x00,0x00,0x07,0x00,0x00,
  0x00,0x07,0x80,0x00,0x00,0x3C,0x00,0x00,
  0x00,0x00,0xFF,0xFF,0xFF,0xE0,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
};


const uint8_t dice5[] U8G_PROGMEM = {          //주사위 5에 대한 Bitmap 소스 입니다.
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x01,0xFF,0xFF,0xFF,0xF8,0x00,0x00,
  0x00,0x0E,0x00,0x00,0x00,0x0E,0x00,0x00,
  0x00,0x38,0x00,0x00,0x00,0x03,0x80,0x00,
  0x00,0x60,0x00,0x00,0x00,0x00,0xC0,0x00,
  0x00,0x80,0x00,0x00,0x00,0x00,0x30,0x00,
  0x01,0x00,0x00,0x00,0x00,0x00,0x18,0x00,
  0x02,0x00,0x00,0x00,0x00,0x00,0x0C,0x00,
  0x04,0x00,0x00,0x00,0x00,0x00,0x04,0x00,
  0x0C,0x00,0x00,0x00,0x00,0x00,0x02,0x00,
  0x08,0x01,0x80,0x00,0x00,0x30,0x03,0x00,
  0x10,0x07,0xE0,0x00,0x00,0xFC,0x01,0x00,
  0x10,0x0F,0xF0,0x00,0x01,0xFE,0x01,0x80,
  0x20,0x1F,0xF8,0x00,0x03,0xFE,0x00,0x80,
  0x20,0x1F,0xF8,0x00,0x03,0xFF,0x00,0x80,
  0x20,0x1F,0xF8,0x00,0x03,0xFF,0x00,0xC0,
  0x60,0x1F,0xF8,0x00,0x03,0xFF,0x00,0xC0,
  0x60,0x1F,0xF8,0x00,0x03,0xFE,0x00,0x40,
  0x40,0x0F,0xF0,0x00,0x01,0xFE,0x00,0x40,
  0x40,0x07,0xE0,0x00,0x01,0xFC,0x00,0x40,
  0x40,0x01,0x80,0x00,0x00,0x70,0x00,0x40,
  0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x40,
  0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x40,
  0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x40,
  0x40,0x00,0x00,0x1F,0x00,0x00,0x00,0x40,
  0x40,0x00,0x00,0x3F,0x80,0x00,0x00,0x40,
  0x40,0x00,0x00,0x7F,0xC0,0x00,0x00,0x40,
  0x40,0x00,0x00,0xFF,0xC0,0x00,0x00,0x40,
  0x40,0x00,0x00,0xFF,0xE0,0x00,0x00,0x40,
  0x40,0x00,0x00,0xFF,0xE0,0x00,0x00,0x40,
  0x40,0x00,0x00,0xFF,0xC0,0x00,0x00,0x40,
  0x40,0x00,0x00,0x7F,0xC0,0x00,0x00,0x40,
  0x40,0x00,0x00,0x3F,0x80,0x00,0x00,0x40,
  0x40,0x00,0x00,0x1F,0x00,0x00,0x00,0x40,
  0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x40,
  0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x40,
  0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x40,
  0x40,0x03,0xC0,0x00,0x00,0x78,0x00,0x40,
  0x40,0x07,0xF0,0x00,0x01,0xFC,0x00,0x40,
  0x40,0x0F,0xF0,0x00,0x03,0xFE,0x00,0x40,
  0x40,0x1F,0xF8,0x00,0x03,0xFF,0x00,0x40,
  0x60,0x1F,0xF8,0x00,0x03,0xFF,0x00,0x40,
  0x20,0x1F,0xF8,0x00,0x03,0xFF,0x00,0xC0,
  0x20,0x1F,0xF8,0x00,0x03,0xFF,0x00,0x80,
  0x20,0x1F,0xF8,0x00,0x03,0xFE,0x00,0x80,
  0x10,0x0F,0xF0,0x00,0x01,0xFE,0x01,0x80,
  0x10,0x07,0xE0,0x00,0x00,0xFC,0x01,0x00,
  0x18,0x00,0x00,0x00,0x00,0x00,0x03,0x00,
  0x08,0x00,0x00,0x00,0x00,0x00,0x02,0x00,
  0x04,0x00,0x00,0x00,0x00,0x00,0x04,0x00,
  0x02,0x00,0x00,0x00,0x00,0x00,0x0C,0x00,
  0x03,0x00,0x00,0x00,0x00,0x00,0x18,0x00,
  0x01,0x80,0x00,0x00,0x00,0x00,0x30,0x00,
  0x00,0x60,0x00,0x00,0x00,0x00,0xE0,0x00,
  0x00,0x30,0x00,0x00,0x00,0x01,0x80,0x00,
  0x00,0x0E,0x00,0x00,0x00,0x0E,0x00,0x00,
  0x00,0x03,0xFF,0xFF,0xFF,0xF8,0x00,0x00,
  0x00,0x00,0x1F,0xFF,0xFF,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
};


const uint8_t dice6[] U8G_PROGMEM = {          //주사위 6에 대한 Bitmap 소스 입니다.
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0xFF,0xFF,0xFF,0x80,0x00,0x00,
  0x00,0x0F,0x80,0x00,0x00,0xF0,0x00,0x00,
  0x00,0x38,0x00,0x00,0x00,0x0E,0x00,0x00,
  0x00,0x60,0x00,0x00,0x00,0x03,0x00,0x00,
  0x01,0x80,0x00,0x00,0x00,0x00,0x80,0x00,
  0x03,0x00,0x00,0x00,0x00,0x00,0x60,0x00,
  0x06,0x00,0x00,0x00,0x00,0x00,0x30,0x00,
  0x04,0x00,0x00,0x00,0x00,0x00,0x10,0x00,
  0x08,0x00,0x00,0x00,0x00,0x00,0x08,0x00,
  0x18,0x00,0x00,0x00,0x00,0x00,0x0C,0x00,
  0x10,0x0F,0xC0,0x00,0x03,0xF0,0x04,0x00,
  0x30,0x1F,0xE0,0x00,0x07,0xF8,0x06,0x00,
  0x20,0x1F,0xF0,0x00,0x07,0xFC,0x02,0x00,
  0x20,0x3F,0xF0,0x00,0x0F,0xFC,0x02,0x00,
  0x40,0x3F,0xF0,0x00,0x0F,0xFC,0x03,0x00,
  0x40,0x3F,0xF0,0x00,0x0F,0xFC,0x01,0x00,
  0x40,0x1F,0xF0,0x00,0x07,0xFC,0x01,0x00,
  0x40,0x1F,0xE0,0x00,0x07,0xF8,0x01,0x00,
  0x40,0x0F,0xC0,0x00,0x03,0xF8,0x01,0x00,
  0x40,0x03,0x80,0x00,0x00,0xE0,0x01,0x00,
  0x40,0x00,0x00,0x00,0x00,0x00,0x01,0x00,
  0x40,0x00,0x00,0x00,0x00,0x00,0x01,0x00,
  0x40,0x00,0x00,0x00,0x00,0x00,0x01,0x00,
  0x40,0x0F,0xC0,0x00,0x03,0xF0,0x01,0x00,
  0x40,0x1F,0xE0,0x00,0x07,0xF8,0x01,0x00,
  0x40,0x1F,0xF0,0x00,0x07,0xFC,0x01,0x00,
  0x40,0x3F,0xF0,0x00,0x0F,0xFC,0x01,0x00,
  0x40,0x3F,0xF0,0x00,0x0F,0xFC,0x01,0x00,
  0x40,0x3F,0xF0,0x00,0x0F,0xFC,0x01,0x00,
  0x40,0x1F,0xF0,0x00,0x07,0xFC,0x01,0x00,
  0x40,0x1F,0xE0,0x00,0x07,0xF8,0x01,0x00,
  0x40,0x0F,0xE0,0x00,0x03,0xF8,0x01,0x00,
  0x40,0x03,0x80,0x00,0x00,0xE0,0x01,0x00,
  0x40,0x00,0x00,0x00,0x00,0x00,0x01,0x00,
  0x40,0x00,0x00,0x00,0x00,0x00,0x01,0x00,
  0x40,0x00,0x00,0x00,0x00,0x00,0x01,0x00,
  0x40,0x07,0xC0,0x00,0x01,0xF0,0x01,0x00,
  0x40,0x1F,0xE0,0x00,0x07,0xF8,0x01,0x00,
  0x40,0x1F,0xF0,0x00,0x07,0xFC,0x01,0x00,
  0x40,0x3F,0xF0,0x00,0x0F,0xFC,0x01,0x00,
  0x40,0x3F,0xF0,0x00,0x0F,0xFC,0x01,0x00,
  0x60,0x3F,0xF0,0x00,0x0F,0xFC,0x03,0x00,
  0x20,0x1F,0xF0,0x00,0x07,0xFC,0x02,0x00,
  0x20,0x1F,0xE0,0x00,0x07,0xF8,0x02,0x00,
  0x30,0x0F,0xE0,0x00,0x03,0xF8,0x06,0x00,
  0x10,0x03,0x80,0x00,0x00,0xE0,0x04,0x00,
  0x18,0x00,0x00,0x00,0x00,0x00,0x08,0x00,
  0x0C,0x00,0x00,0x00,0x00,0x00,0x18,0x00,
  0x04,0x00,0x00,0x00,0x00,0x00,0x10,0x00,
  0x02,0x00,0x00,0x00,0x00,0x00,0x20,0x00,
  0x01,0x00,0x00,0x00,0x00,0x00,0xC0,0x00,
  0x00,0xC0,0x00,0x00,0x00,0x01,0x80,0x00,
  0x00,0x70,0x00,0x00,0x00,0x07,0x00,0x00,
  0x00,0x1C,0x00,0x00,0x00,0x1C,0x00,0x00,
  0x00,0x07,0xFF,0xFF,0xFF,0xF0,0x00,0x00,
  0x00,0x00,0x3F,0xFF,0xFE,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
};

const uint8_t kocoafabMark_data[] U8G_PROGMEM = {          // KocoaFab Logo Bitmap 코드입니다.
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x80,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0xE0,0x00,0x03,0x80,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0xF0,0x00,0x07,0x80,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0xFC,0x00,0x1F,0x80,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0xFE,0x00,0x3F,0x80,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0xFF,0x00,0x7F,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x7F,0x80,0xFF,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x7F,0xC1,0xFF,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x7F,0xE3,0xFE,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x3F,0xFF,0xFE,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x3F,0xFF,0xFC,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x1F,0xFF,0xFC,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x0F,0xFF,0xF8,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x0F,0xFF,0xF0,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x07,0xFF,0xF0,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x03,0xFF,0xC0,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x01,0xFF,0xC0,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x03,0xFF,0xE0,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x07,0xFF,0xE0,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x07,0xFF,0xF0,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x07,0x80,0xF0,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x0C,0x00,0x00,0x00,0x00,0x00,0xE0,0x06,0x00,0x00,0x00,
  0x00,0x0C,0x00,0x00,0x00,0x00,0x01,0xE0,0x06,0x00,0x00,0x00,
  0x00,0x0C,0x00,0x00,0x00,0x00,0x01,0xC0,0x06,0x00,0x00,0x00,
  0x00,0x0C,0x00,0x00,0x00,0x00,0x01,0x80,0x06,0x00,0x00,0x00,
  0x00,0x0C,0xC7,0x83,0xC7,0xC3,0xC3,0xE7,0xC7,0xE0,0x00,0x00,
  0x00,0x0D,0xCF,0xC7,0xEF,0xE7,0xC3,0xE7,0xE7,0xF0,0x00,0x00,
  0x00,0x0F,0x98,0x6C,0x0C,0x60,0x41,0xC0,0x67,0x38,0x00,0x00,
  0x00,0x0E,0x18,0x6C,0x18,0x33,0xE1,0x87,0xE6,0x18,0x00,0x00,
  0x00,0x0F,0x18,0x6C,0x18,0x37,0xE1,0x8F,0xE6,0x18,0x00,0x00,
  0x00,0x0F,0x98,0x6C,0x1C,0x64,0x61,0x8C,0x67,0x38,0x00,0x00,
  0x00,0x0D,0xDD,0xC7,0xEE,0xE6,0xE1,0x8F,0xE7,0xF8,0x00,0x00,
  0x00,0x0C,0xCF,0xC7,0xE7,0xC7,0xE1,0x87,0xE7,0xF0,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
  
};

const uint8_t nepes_data[] U8G_PROGMEM = {          // NEPES Logo Bitmap 코드입니다.
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x0E,0x20,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x03,0xCE,0x70,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x03,0xCC,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x0F,0x9F,0xE0,0x1F,0xFE,0x01,0xE0,0xF0,0x0F,0xFF,0x03,0xFF,0xE0,0x00,
  0x00,0x0F,0xFF,0xF0,0x7F,0xFF,0x00,0xE0,0xE0,0x3F,0xFF,0x87,0xFF,0xF8,0x00,
  0x00,0x0F,0xFF,0xF8,0x7F,0xFF,0x00,0x00,0x00,0x3F,0xFF,0x87,0xFF,0xF8,0x00,
  0x00,0x0F,0xF1,0xF8,0xF8,0x0F,0x87,0x00,0x18,0x7C,0x07,0xC7,0xC0,0xF8,0x00,
  0x00,0x0F,0xC0,0xF8,0xF8,0x0F,0x8F,0x80,0x3C,0x7C,0x07,0xC7,0xC0,0x00,0x00,
  0x00,0x0F,0x80,0x78,0xFF,0xFF,0x8F,0x80,0x3C,0x7F,0xFF,0xC7,0xFF,0xF0,0x00,
  0x00,0x0F,0x80,0x78,0xFF,0xFF,0x80,0x00,0x00,0x7F,0xFF,0xC7,0xFF,0xF8,0x00,
  0x00,0x0F,0x80,0x78,0xFF,0xFF,0x80,0x00,0xC0,0x7F,0xFF,0xC1,0xFF,0xFC,0x00,
  0x00,0x0F,0x80,0x78,0xF8,0x00,0x00,0x00,0xE0,0x7C,0x00,0x00,0x00,0xFC,0x00,
  0x00,0x0F,0x80,0x78,0xF8,0x0F,0x8F,0x8C,0xF0,0x7C,0x07,0xC7,0xC0,0x7C,0x00,
  0x00,0x0F,0x80,0x78,0x7F,0xFF,0x8F,0x8E,0xF0,0x3F,0xFF,0xC7,0xFF,0xFC,0x00,
  0x00,0x0F,0x80,0x78,0x7F,0xFF,0x0F,0x8E,0x70,0x3F,0xFF,0x87,0xFF,0xF8,0x00,
  0x00,0x0F,0x80,0x78,0x3F,0xFE,0x0F,0x8E,0x00,0x1F,0xFF,0x03,0xFF,0xF0,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0x8C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
};

boolean temp = 0;
int flag = 0;
void setup() 
{
  Serial.begin(9600); // 지그비 통신을 위한 BaudRate 설정을 해줍니다.
  pinMode(7,INPUT);   // 발사 버튼 입력 핀입니다.
  pinMode(6,INPUT);   // 장전 버튼 입력 핀입니다.
  pinMode(5,OUTPUT);  // 레이저 모듈 출력 핀입니다.

}

void loop() 
{
  while(digitalRead(6) != 1)  // 장전 버튼이 눌릴 때 까지 대기합니다.
  if(digitalRead(6) == 0)     // 장전 버튼이 눌려 LOW 신호가 입력되는 경우 입니다.(풀 다운 스위치)
  {
    u8g.firstPage();          // OLED 패널 활성화 명령입니다.
    do{u8g.drawBitmapP(5, 15, 15, 47, nepes_data);}while(u8g.nextPage());
                              // OLED 패널에 출력할 이미지가 바뀔 때 까지 네패스 로고를 출력합니다.
                              // (5, 15, 15, 47, nepes_data) x:5,y:15 좌표에서 시작하여 
                              // 가로 15, 세로 47 사이즈의 nepes_data 비트맵 코드를 출력합니다.    
    Serial.write('1');              // 지그비 통신으로 상대(과녘)에게 1을 송신합니다.
    digitalWrite(5,HIGH);           // 레이저 모듈 ON

    while(digitalRead(7) == 1){}    // 발사 버튼이 눌릴 때 까지 대기합니다.
                                    // 발사 버튼이 눌리면 While()문 무한루프를 벗어납니다.
    Serial.write('2');              // 발사 버튼이 눌린후 지그비 통신으로 상대에게 2를 송신합니다.
  
    if(Serial.available())          // 발사 이후 상대(과녘)로 부터 시리얼 데이터를 받을 준비가 됩니다.
    {
      char temp = Serial.read();    // 상대가 송신한 값을 임시변수에 저장합니다.
      u8g.firstPage();              // OLED 패널을 활성화 합니다.
      switch(temp)                  // 상대로 부터 수신된 값에 따라 주사위 1부터 6까지의 비트맵 이미지를
                                    // 출력합니다.
      {    
      case '1' : do{u8g.drawBitmapP(35, 2, 8, 60, dice1);}while(u8g.nextPage()); break;
      case '2' : do{u8g.drawBitmapP(35, 2, 7, 60, dice2);}while(u8g.nextPage()); break;
      case '3' : do{u8g.drawBitmapP(35, 2, 8, 60, dice3);}while(u8g.nextPage()); break;
      case '4' : do{u8g.drawBitmapP(35, 2, 8, 60, dice4);}while(u8g.nextPage()); break;
      case '5' : do{u8g.drawBitmapP(35, 2, 8, 60, dice5);}while(u8g.nextPage()); break;
      case '6' : do{u8g.drawBitmapP(35, 2, 8, 60, dice6);}while(u8g.nextPage()); break;
      }  
    }
    
    delay(100);
    digitalWrite(5, LOW);           // 레이저를 끕니다.
  
  }
}

 

 

비트맵 코드를 작성하고난 이후엔 일반적인 버튼 입력 소스와 스위치 문, 그리고 지그비를 이용한 송수신 명령뿐입니다. 본문은 짧으니 누구든지 쉽게

이해 하실 수 있습니다. 다만 OLED LCD 패널 명령은 헤더 및 CCP 파일을 참고하시거나 튜토리얼을 정독하셔야 쉽게 사용 하실 수 있습니다.

다음 시간엔 과녘과 함께 동작 영상까지 올리겠습니다^^ 그럼 20000~

 

 

 

SaBo

레이저, 총, OLED, 버튼, 지그비, zigbee, orange board, 오렌지보드