Heltec Wireless Paper LoRa I2C? for CardKB

The Heltec Wireless Paper LoRa board doesn’t seem to have any solder pads for adding I2C devices, which is inconvenient, as I’d like to add one of my M5 CardKB’s to one, and it uses I2C by default…

I’ve looked at the schematic for the Wireless Paper board, and it doesn’t seem to use anything else via I2C, so I can’t just solder onto those existing traces/components to get on the bus, so that leaves me with super-tiny SMD soldering to attempt to get a tiny bodge-wire soldered to the appropriate pins of the ESP32-S3 chip itself…

I’ve seen quite a few projects with ESP32 using GPIO21 and GPIO22, but the ESP32-S3 doesn’t seem to expose GPIO22, so presumably another pin is mapped instead…

I’m getting lost trying to dig my way through the layers of headers on GitHub to find which pins on the ESP32-S3 have I2C configured on them (IF ANY) for the Heltec WIreless Paper LoRa board…

Any suggestions would be greatly appreciated!

Thanks!

Just from a quick look now, I think you can use any GPIO for I2C with ESP32-S3? It might be as simple as specifying them with Wire.begin(I2C_SDA, I2C_SCL)

Thank you for the reply.

Re-reading my question, I see I wasn’t very direct about what I was after.

I could do my own builds withe the pins of my choosing, but I was looking for help to find what pins the maintainers were looking at when they do their scan for devices, and enable behaviors based on, in this case finding a device on the I2C bus at 0x5F and enabling the direct keyboard entry and navigation with the cursor keys.

If I can use the pins they’re already looking for, I can keep using off-the shelf builds, which would be a big win, in my book…

It has too many years since I did C/C++ outside of relatively simplistic Arduiino tasks, and I’m not good at digging my way through the layers of header files to see which bits of which one take precedence for the given board’s I2C pin assignments. Since that board doesn’t even have any pins/solder-pads for ANY GPIO, I’m not even sure the maintainers would’ve put anything in, other than doing so just for keeping the rest of the code satisfied, though never expecting to find any devices on the relatively inaccessible bus.

Ah right I see!

(I did want to link all relevant lines here, but there is a limit on links for new forum users)

Hmm… following the trail from variant.h Line 4, to pins_arduino.h, and then across to the ESP32-S3FN8 datasheet, page 18, it looks to me like the off-the-shelf build might have I2C enabled at MTDI (for SDA) and MTMS(for SCL).


Source: Heltec Wireless Paper schematic

I think this should allow I2C to work the same as with any other board(?). It certainly seems like Wire.begin() and i2cScanner->scanPort() are being called for Wireless Paper in setup() (main.cpp, Line 398)

It might be the case that CardKB will just work out-of-the-box with Wireless Paper. At a glance, I can’t see any config that’s missing or any code that disables it.

This is certainly not my area of knowledge, so it would be good to get a second opinion. If nobody else jumps in the thread here, you could try over on the Meshtastic Discord Server; a bunch of the devs are active over there.

Todd, thanks for the assist!

I’ll give it a try, see if I can manage to solder jumps to the indicated pins when the boards arrive this week. I’ll report back here, in case anyone else wants to do similar.

Also, thanks for the reminder to try the discord.

Dug in a bit and this was implemented in this PR Fix Heltec V3 I2C Pins by rcarteraz · Pull Request #1009 · meshtastic/meshtastic · GitHub

As @todd-herbert suggested:

No. Name Type Function
7    42   I/O GPIO42, MTMS.
8    41   I/O GPIO41, MTDI.

From the PR:

### Meshtastic I2C Definitions
- SDA: GPIO41
- SCL: GPIO42

I have not tested this on the Wireless Paper, but it does work on the Heltec V3 with the current Meshtastic release (i’m on 2.3.2)

HTIT-WB32LA_V3(Rev1.1).pdf (heltec.cn)

2 Likes