esp8266-12E, SPI OLED, Teensy3 problem identified and solved
Posted: Thu Oct 22, 2015 9:11 pm
Just in case anyone wants to use the ESP_SSD1306 library with one of the 4 input SPI Oleds you typically get cheap
(electrodragon) on the internet, I am writing this. My issue was compounded since I needed a Teensy3.1 to communicate with the 8266 using UART0. I kept getting reboots and hangs, but the issue was that I was trying to remap GPIO 2's D/C functionality to another GPIO. By default, the ESP8266 uses GPIO 2 for UART1 on the ESP8266, and this UART1 can only be used to send data – many use this as a debug port if they are also using UART0 for other things (like talking to another component, which I was doing).
The problem is that GPIO2 must be used for D/C functionality for the SPI OLED and apparently cannot be remapped (as I was trying to do for debug purposes) successfully. Bottom line: do NOT try to use GPIO2 as a debug port if you are using SPI functionality on the ESP8266-12E.
Now, if I could find a way to map UART1's send to another GPIO on the ESP8266-12E, I would be delighted.
(electrodragon) on the internet, I am writing this. My issue was compounded since I needed a Teensy3.1 to communicate with the 8266 using UART0. I kept getting reboots and hangs, but the issue was that I was trying to remap GPIO 2's D/C functionality to another GPIO. By default, the ESP8266 uses GPIO 2 for UART1 on the ESP8266, and this UART1 can only be used to send data – many use this as a debug port if they are also using UART0 for other things (like talking to another component, which I was doing).
The problem is that GPIO2 must be used for D/C functionality for the SPI OLED and apparently cannot be remapped (as I was trying to do for debug purposes) successfully. Bottom line: do NOT try to use GPIO2 as a debug port if you are using SPI functionality on the ESP8266-12E.
Now, if I could find a way to map UART1's send to another GPIO on the ESP8266-12E, I would be delighted.