본문 바로가기

분류 전체보기311

[LCD][OLED] Bitmap To Array - LCD Assistant en.radzio.dxp.pl/bitmap_converter/ Bitmap converter for mono and color LCD displays LCD Assistant LCD Assistant is a free tool for converting monochromatic bitmaps to data arrays for easy use with programs for embedded systems with microcontrollers and graphics monochromatic LCD displays like a T6963C, KS0108, SED1335 etc. Program create en.radzio.dxp.pl LCD Assistant의 다운로드 링크이다. 사용법 : 0.96 OLED.. 2021. 3. 8.
[아두이노] 내부 Pull-UP 저항 사용방법 #define SW 13 void setup() { // put your setup code here, to run once: pinMode(SW, INPUT_PULLUP); Serial.begin(9600); } void loop() { // put your main code here, to run repeatedly: int a = digitalRead(SW); if(a == 0){ Serial.println("on"); } else{ Serial.println("off"); } } 위와 같이 소스코드를 입력하면 저항 없이도 아두이노의 내부 풀업 저항 기능을 사용하여 회로를 꾸밀 수 있다. 풀업저항의 관련된 내용 : hyun222.tistory.com/9?category=455486 근데 보통 Mai.. 2021. 3. 8.
[아두이노] 인터럽트 사용법 출처 : www.arduino.cc/reference/ko/language/functions/external-interrupts/attachinterrupt/ 인터럽트 사용을 위해서는 해당 핀에 연결을 해주어야 한다. 나는 예시로 2번핀을 사용해 보겠다. #define isrPin = 2; void setup() { pinMode(isrPin, INPUT_PULLUP); attachInterrupt(digitalPinToInterrupt(isrPin), POWER, CHANGE); Serial.begin(9600); } void loop() { delay(1000); } void POWER() { Serial.println("ON"); } delay 중에도 Serial 모니터에 ON이 출력되는 것을 확인.. 2021. 3. 8.
[OLED] U8glib를 이용한 화면표시 사용재료 : 0.96 oled 구입처 : Aliexpress 통신방식 : I2C 사용 라이브러리 : U8glib 참고 사이트 : github.com/olikraus/u8glib/wiki/userreference examples - GraphicsTest.ino 를 실행한 결과이다. //U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE); // I2C / TWI 이 문장의 주석을 해제해 주어야 한다. 2021. 3. 4.
[RDA5807M][TEA5767][RRD102.Ver2] 라디오 만들기 datasheet.lcsc.com/szlcsc/RDA5807M_C82537.pdf www.sparkfun.com/datasheets/Wireless/General/TEA5767.pdf cafe.naver.com/arduinostory/52911 RDA5807M과 TEA5767의 Datasheet이다. 간략하게 설명하자면 RDA5807M에서 TEA5767의 모드를 사용 할 수 있다. 이 게시글에서는 TEA5767을 사용하기 때문에, TEA5767의 DataSheet를 참고해야한다. #include // I2C용 라이브러리 인쿨루드 void setup(){ Wire.begin(); Wire.beginTransmission(0x60); // TEA5767모드로 I2C통신 시작 Wire.write(0x30); .. 2021. 2. 22.
[Rotary Encoder] 로터리 엔코더 사용방법 및 예제 #include // Declare your global variables here void main(void) { int temp = 0x01; int lastPin = 0; int n; DDRD.6 = 0; DDRD.7 = 0; DDRB = 0xFF; while (1) { n = PIND.6; // 하강 Edge를 구현하는 부분. if(lastPin == 0 && n == 1) // 하강 Edge { if(PIND.7) { temp = temp > 1; if(temp == 0x00) temp = 0x80; } } PORTB = temp; lastPin = n; // 하강 Edge를 구현하는 부분. } } Chip은 Atmega328을 사용하였고, Cheri Soft사에서 지원해준 보드를 사용하였다. 2021. 2. 20.