Skip to content
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

Support Seeed SenseCAP Indicator #4279

Merged
merged 43 commits into from
Sep 12, 2024
Merged

Support Seeed SenseCAP Indicator #4279

merged 43 commits into from
Sep 12, 2024

Conversation

mverch67
Copy link
Collaborator

@mverch67 mverch67 commented Jul 12, 2024

image

@mverch67 mverch67 changed the title Support Seeed Sensecap Indicator Support Seeed SenseCAP Indicator Jul 12, 2024
@thebentern
Copy link
Contributor

Legend!

@markbirss
Copy link
Contributor

Very nice!

That diagram is quite nice at detailing how this device makes use of the esp32-s3 and pico and other stuff

@mverch67
Copy link
Collaborator Author

mverch67 commented Aug 1, 2024

image

@fifieldt
Copy link
Contributor

fifieldt commented Sep 3, 2024

Feel free to do this in another patch, just noting that it looks like the SenseCAP Indicator can accept UF2 files, so we should be sure to generate those.

Ed -- there are two versions of the device, the meshtastic one is ESP2. It does still offer the drag-and-drop file interface, but I am not sure what file type it may take :)

Ed -- ESP32-S3 and RP2040 Dual-MCU head explodes

@mverch67
Copy link
Collaborator Author

mverch67 commented Sep 5, 2024

Ed -- ESP32-S3 and RP2040 Dual-MCU head explodes

I have this D1L version with esp32-s3 and rp2040. Meshtastic is running on the esp32-s3. The rp2040 can be used for custom sensors that can be programmed individually by the user (e.g. home automation stuff). Only the rp2040 will accept uf2 files which are therefore not provided by the meshtastic project.

@jp-bennett
Copy link
Collaborator

The problem is that all I2C communication to the IO expander fails with timeout error (263).

Reason for the non-functional I2C seems lovyanGFX. I've seen this before when I tried to get T-Deck running with lovyanGFX. It has some weird impact on SPI/I2C...

If we can figure it out, they've been open to PRs in the past.

@mverch67
Copy link
Collaborator Author

mverch67 commented Sep 8, 2024

DEBUG | ??:??:?? 3 SX126xInterface(cs=64, irq=67, rst=65, busy=66)
DEBUG | ??:??:?? 3 SX126X_DIO3_TCXO_VOLTAGE not defined, not using DIO3 as TCXO reference voltage
INFO  | ??:??:?? 3 Starting meshradio init...
DEBUG | ??:??:?? 3 (bw=250, sf=11, cr=4/5) packet symLen=8 ms, payloadSize=0, time 231 ms
DEBUG | ??:??:?? 3 (bw=250, sf=11, cr=4/5) packet symLen=8 ms, payloadSize=253, time 2115 ms
INFO  | ??:??:?? 3 Radio freq=869.525, config.lora.frequency_offset=0.000
INFO  | ??:??:?? 3 Set radio: region=EU_868, name=LongFast, config=0, ch=0, power=27
INFO  | ??:??:?? 3 Radio myRegion->freqStart -> myRegion->freqEnd: 869.400024 -> 869.650024 (0.250000 MHz)
INFO  | ??:??:?? 3 Radio myRegion->numChannels: 1 x 250.000kHz
INFO  | ??:??:?? 4 Radio channel_num: 1
INFO  | ??:??:?? 4 Radio frequency: 869.525024
INFO  | ??:??:?? 4 Slot time: 77 msec
INFO  | ??:??:?? 4 Set radio: final power level=22
INFO  | ??:??:?? 4 SX126x init result 0
INFO  | ??:??:?? 4 Frequency set to 869.525024
INFO  | ??:??:?? 4 Bandwidth set to 250.000000
INFO  | ??:??:?? 4 Power output set to 22
DEBUG | ??:??:?? 4 Current limit set to 140.000000
DEBUG | ??:??:?? 4 Current limit set result 0
DEBUG | ??:??:?? 4 Setting DIO2 as RF switch
DEBUG | ??:??:?? 4 SX126X_RXEN not defined, defaulting to RADIOLIB_NC
DEBUG | ??:??:?? 4 SX126X_TXEN not defined, defaulting to RADIOLIB_NC
DEBUG | ??:??:?? 4 Using MCU pin -1 as RXEN and pin -1 as TXEN to control RF switching
INFO  | ??:??:?? 4 Set RX gain to boosted mode; result: 0
INFO  | ??:??:?? 4 SX126xInterface<T>::startReceive()
INFO  | ??:??:?? 4 SX126xInterface<T>::setStandby()
INFO  | ??:??:?? 4 SX1262 Radio init succeeded, using SX1262 radio

@mverch67 mverch67 marked this pull request as ready for review September 10, 2024 11:33
@fifieldt
Copy link
Contributor

I have tested this and it works!
image

src/main.cpp Outdated Show resolved Hide resolved
@mverch67
Copy link
Collaborator Author

mverch67 commented Sep 10, 2024

For the display support (CS pin behind IO expander) I needed to tweak a little the lovyanGFX lib. It looks for esp32 the authors used some code optimizations, but this avoids using the arduino hal which is a problem, because I added the IO expander stuff under the hood of the arduino hal layer so that libraries are usually not affected by the IO expander and can transparently pass the GPIO pins.

@thebentern thebentern merged commit 625254c into master Sep 12, 2024
105 checks passed
@caveman99 caveman99 deleted the SenseCAP-Indicator branch October 16, 2024 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants