컴퓨터/아두이노 라즈베리파이

[아두이노] Uno에서 Adafruit_SSD1306와 SoftwareSerial 동시 사용 불가(OLED와 Bluetooth)

우유식빵 2021. 12. 3. 02:51

 

아래 상황 처럼 위의 스캐치를 업로드 한 경우 

 Adafruit_SSD1306와 SoftwareSerial 즉, OLED와 Bluethooth모듈을

동시에 사용하고 싶은 경우

 

위 스캐치는 업로드 되고 작동 잘 되는데

아래 스케치에서는 Oled가 작동이 안된다. 

 

이유는 메모리 때문이다. 

https://github.com/adafruit/Adafruit_SSD1306/issues/28

 

incompatibility with SoftwareSerial · Issue #28 · adafruit/Adafruit_SSD1306

As soon as I instantiate a SoftwareSerial object, my OLED display doesn't work anymore. I tried different pins for the SoftwareSerial to avoid hidden interrupt conflicts. Is this a known problem?

github.com

위 이슈를 보면 알겠지만 두 모듈 모두 큰 메모리를 차지하기 때문이다.

그래서 두 모듈을 UNO에서 사용하고 싶다면

한 이정도가 마지노선이다...

 

또는 아두이노 메가나 다른 용량 큰걸로 사용해야할 것 같다 ㅠㅠ