-
-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Need better #ifdef for pgmspace.h #10
Comments
I forked and started to fix this, but.. there are bigger problems, like stdint, interrupts (SREG, DDR_REG). Here's the library that has ESP32 and ESP8266 support. |
Hi @tedder , ssd1306_i2c_embedded.h is not supported for ESP. So, to fix the issue with interrupts, it is needed to update ssd1306_i2c_conf.h (refer to ESP8266 branch). I didn't test my library on ESP32 (because I don't have it), and that's why it is not pointed in the list of supported platforms. Of course, it is possible to update the ssd1306 library, but I need someone to verify. I'm glad that you found the library, you can use. |
I've submitted changes for ESP32, but didn't check them (the reason is described earlier in this thread) |
Yeah, it seemed like there were enough problems that I gave up. stdint: had to import the header, uint_8 wasn't recognized. |
I see your changes- I'll pull 'em. |
I checked compilation for ESP32. No issues found, see commit 1d5d260. |
Hi @tedder, |
Hey, sorry. I needed to make more changes. Here they are. stdint is certainly needed in many places, and I guessed on the buffer length. I assume WIRE_SUPPORTED is not set, but I didn't investigate.
|
Hi Ted, The changes, you described, are already present in commit 1d5d260. You can take latest sources from master branch. |
Aha, I was at afb6bf3. Let me try again. |
Yeah, they compile at least. It'll take me a day or two to test the hardware if you want. |
If you have free time to check, it would be nice. I will be able to verify as soon as I find ESP32 module. |
I connected a 128x32 to a DOIT ESP32 kit board. I then opened draw_text, changed the init, and commented out the last two lines since it's a smaller device. The text shows but gets progressively more "broken" later in the line. It looks like a clock issue, maybe? Here's a pic of how it looks: I have a handful of other modules on order. |
Hmm, it's supposed to have internal pullup resistors. I'll investigate that, try your sketch, and add manual resistors if necessary. |
Test results- couldn't figure out how to do the internal pullup. Probably user error. Playing with various ohm/hz combinations: 390Ω + 1,000,000hz: garbage on whole screen 1MΩ + 100,000hz: garbage/screen doesn't get blanked or take commands I don't know if that helps. Here's my code: https://gist.github.com/tedder/57ddc04f1c6806f191101552fe87dd18 |
Initialization in your code looks good. Take into account that ssd1306 controller supports only standard (100kHz) and fast i2c (400kHz) according to datasheet. Due to capacitance of wires, too big pull-up resistor values are not enough, but too small are dangerous, because of big current if line is set to 0. Usually, it is ok to use 4.7kΩ - 10kΩ (in many mass market products they use 4.7kΩ). I'm surprised that 12kΩ in 100kHz mode didn't work for you. Do you have some sort of logic analyzer tool, like saleae logic analyzer? |
i2c known issue: espressif/arduino-esp32#839
Hi, This is behavior before the fix: Please, check the latest sources on master. |
Did you have a chance to try the fix? |
ah, didn't see your followup. I'll get to it, certainly this weekend if not sooner. I bet it'll work. |
Hi @tedder , |
Hi Aleksei, sorry I dropped the ball on getting back to you. This works completely on my ESP32 test setup. Looks beautiful! |
The "#ifdef ESP8266" doesn't cover the ESP32, which makes sense as it isn't an 8266. Here's one tactic that might work more generally. Here's the same concept listed in the main esp32 lib.
The text was updated successfully, but these errors were encountered: