Program T-echo for little calculations

Good morning,
I have some t-echo, I would like to make analog measurements with the INA219 module connected to the i2c, but I would like to read them once a second and then make a rolling average of the value and send it to the mesh once an hour, so as to have a measurement more precise than an instantaneous value every 5 minutes. Then I would like to know if it is possible to modify the meshtastic code a bit and add these little calculations.
Thanks in advance

For doing telemetry with sensors that are not built in you will need to use a second MCU to do the processing and then send the processed data into the mesh via the serial module.

1 Like

Thank you for your reply, I’m glad to hear that because I thought about it too. But it seemed like a dirty method to me. I thought there was the possibility of integrating into the T-echo creating a cleaner device. Do you say that it is too difficult to integrate it into the firmware of the device? Thanks in advance

The built in sensors have to be instant read, if you want to do additional processing using an external mcu is the right path, keeps the main firmware clean.

1 Like

Thank you for your reply, then I’ll do in this way

Hi Garth I bought the external module of gpio for t-echo, I want to connect via serial to an arduino as we talked month ago, but in meshtastic configurable serial pin are from 1 to 45 meanwhile on the schematics of t-echo for example pin are P0.30 or P1.30

nrf52 uses a different gpio numbering scheme where P0 is upto 32, and P1 needs you to add 32 to the second part after the dot for Arduino gpio numbering compatibility

So
P0.02 is 2
P1.02 is (32 + 2) = 34

3 Likes