-
Notifications
You must be signed in to change notification settings - Fork 121
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
Working with Heltec Wifi Kit 32 #37
Comments
// Some hints for heltec wifi lora void setup{ void loop { } |
Aggebitter, Thanks for that, I'll try it. But to clarify, I have the Heltec Wifi Kit 32, NOT the Heltec LoRa Kit. And, more important, I have no trouble getting the board to work with the u8x8 library. It's the SSD1306Ascii library that I can't get to work. |
Have ju tryed the highlighted reset part? Had strange issues before I did a manual reset |
Looks like the Heltec Wifi Kit 32 has the OLED connected to pins SDA = 4, SCL = 15, and RST = 16. These are not the standard Wire pins. The Wire library uses SDA = 21 and SCL = 22. The u8x8 library supports software I2C on any pair of pins. That's what SW_I2C means. I didn't implement software I2C. |
greiman, that would certainly explain why it wouldn't work. Would you mind implementing the software I2C sometime today? 😀 No? OK - could I add or change a couple lines to your files somewhere to specify those different SDA and SCL pins? Or is it not that simple? Thanks so much! Your library seem so much easier to use - I'd really to be able to us it. |
It looks like the ESP32 Wire library allows you to specify the pins for sda and scl in the Wire.begin() call. See this link. Try replacing the Wire.begin() line in the HelloWorldWire example with this:
This assumes the Heltec Wifi Kit 32 uses standard ESP32 pin numbers. If this works, it would be possible to modify SSD1306AsciiWire.h to use the second ESP32 I2C controller. This would require reading the code for the ESP32 Wire library. |
Thank you so very much! I'll give that a try. |
greiman, That was it! Wire.begin(4, 15) made "Hello world!" show up. Thanks so much! |
Hi. Maybe I should change something else in the HelloWorldWire code? My / Your code: // Test for minimum program size. #include <Wire.h> // 0X3C+SA0 - 0x3C or 0x3D // Define proper RST_PIN if required. SSD1306AsciiWire oled; #if RST_PIN >= 0 oled.setFont(System5x7); Tomasz |
I don't see an obvious problem. I can't find any info about the display. Since I don't have your hardware I can't do any tests. |
OK. I understand. The display is 0.96-inch 128 * 64 dot matrix OLED display, with SSD1306 controller. The module is https://heltec.org/project/wifi-lora-32/ What other information can help you diagnose the problem? |
I looked at the schematic and other info before the last post. I can't do more with no hardware. This is from an example that looks for the OLED. Add these includes:
replace:
With:
Try to run this example. It should give the I2C address. Maybe Heltec used the alternate SSD1306 address. |
Yes. I have "Hello world!" On the display. Thank you so much for help. |
This library is exactly what I'm looking for, but I tried your basic example (WireI2c128x64.ino) for the Heltec Wifii Kit 32 with .96" OLED display, and I can't get it to work. It compiles and downloads to the board without a problem, but never displays anything. I'm guessing it's because there's not a DevType defined for that board, and some of the initialization settings aren't correct. Ditto for the I2C pin's hex number. My problem, being pretty new to all of this, is trying to figure out how to modify an existing DevType to work with this board, and to determine its I2C pin hex number.
I tried both the AdaFruit DevType and the SH1106_128x64, with the same result: compiles and loads, doesn't display anything. I changed the reset pin to 16 (that's what it is on this board) - no help.
I ran a simple I2C scanner sketch on the board and it said "No I2C devices found" - but surely this OLED display has an I2C interface?
I've been able to get the board / display to work with the u8x8 library (part of the U8g2 library). (I would much rather user YOUR library, though!) The constructor that works from that library is U8X8_SSD1306_128X64_NONAME_SW_I2C. Here's what the constructor looks like, if that gives you any clues:
U8X8_SSD1306_128X64_NONAME_SW_I2C(uint8_t clock, uint8_t data, uint8_t reset = U8X8_PIN_NONE) : U8X8() {
u8x8_Setup(getU8x8(), u8x8_d_ssd1306_128x64_noname, u8x8_cad_ssd13xx_i2c, u8x8_byte_sw_i2c, u8x8_gpio_and_delay_arduino);
u8x8_SetPin_SW_I2C(getU8x8(), clock, data, reset);
This is the github page for the board itself. https://github.com/Heltec-Aaron-Lee/WiFi_Kit_series
Here's the schematic of the board, showing the pins of the OLED - I'm hoping the answer is in here somewhere?
https://github.com/Heltec-Aaron-Lee/WiFi_Kit_series/blob/master/SchematicDiagram/WIFI_Kit_32_Schematic_diagram.PDF
What do I need to know to make this board work with this library? Thanks!
The text was updated successfully, but these errors were encountered: