I've been working on this project for the past few months and while it's far from being finished, I would like to share the current progress with all the Cemetechians and Cemetechnicians Very Happy

The goal of this project is to integrate the ESP32-S3 with the Ti84+ CE to allow developers to utilize the powerful features that the ESP32 has to offer in their calculator programs while being completely seamless from the outside. I created an easy to use C library that can be utilized directly from the calculator to access the features of the ESP32 so that developers can keep everything organized in one code base and not have to touch the ESP32 firmware at all.

At the hardware level, it works by having a mounting PCB soldered to the calculators USB pads and a second PCB containing an esp32-s3 and other components soldered on top. The mounting PCB is an extension of the PCB I made about a year ago for my USB-C mod (https://www.cemetech.net/forum/viewtopic.php?t=19369) so this is also a Type C mod. Switching logic allows USB linking/charging functionality of the calculator to be retained while still allowing the mod to function. I plan to make a far more detailed and quality explanation/showcase in a YouTube video once I'm finished. Here are some photos:



Here is a compilation of some work-in-progress demo apps utilizing the esp32:


Currently, the features of the C library are:

Wi-Fi
- Provides functionality to scan, connect and disconnect from wifi access points.
- Query the current wifi connection status. Can be connecting, connected or disconnected.
- Sync calculators time with the current time by internally communicating with an NTP server.

ESP32 buffers
- Create, write and read buffers on the esp32
- Can be passed around to certain functions of this library using a buffer id given on buffer creation

HTTP client
- Supports both https and http.
- Can change method, url or headers of the client any amount of times after creation
- Can create multiple clients to send multiple requests at the same time
- Can send data located on a calculator buffer or inside an esp32 buffer (request data can also be written as a stream)
- Can receive response stream on the calculator or inside an esp32 buffer (or cancel the request and choose to not receive any response based on status code/response headers)

Images
- Ability to decode an image located in an esp32 buffer to a format that can be displayed on the calculator (currently supported input image formats are png, jpeg, and static gif)
- Can output 8bpp pixels that are quantized using a palette set using a function of the library (the palette can be changed at any time during runtime). 16bpp mode is also supported
- When decoding in 8bpp mode, dither level can be specified from a scale of 0-255.
- When decoding in 8bpp mode, the quantized, dithered result can be saved in a compressed buffer on the esp32 for fast reloading.
- Built in decoder function can display images in column or row major mode depending on the mode set during initialization of the image component.

Parsers
- Ability to parse large amounts of data quickly by offloading the parsing to the esp32.
- While traversing through some serialized data, you can specify to send only the data needed, for example
if traversing through a JSON object and there is a "description" key has a very large value, you can signal to skip sending the value.
- Currently supports JSON but will plan to add HTML too.

TCP Socket
- Nothing special here, it allows you to connect to a TCP server
- Ability to unload response into an esp32 buffer or onto calculator
- Ability to send buffer located inside esp32 buffer or on the calculator
- Ability to create multiple clients that run independently of each other

NVS (Non-Volatile Storage)
- Basic functionality to store and retrieve data stored inside an NVS namespace on the esp32

Debugging
- Ability to print data onto the esp32s serial port by providing the ESP_LOGI, ESP_LOGW & ESP_LOGE macros on the calculator.
- Option to replace all dbg_printf, dbg_sprintf calls with the esp macros.
This is NOT something that is usual on Cemetech, I've been trying to make something like that recently but kept failing. Not enough time, school and all that fun stuff..
I'm really happy you were able to get it that far and can't wait to see a guide pop out on how to set everything up, I've got a couple ESP-32 C3's hanging around waiting to be put to use.
It would be even crazier if you would be able to make it support lwIP-CE (https://github.com/cagstech/lwip-ce) later on Wink
Can't wait to see this becoming open source!
that's totally me when i u u rrrr hhh ???

But seriously, this is AMAZING! Every time I think this community has reached its peak, I'm proven wrong! And this is the most impressive thing I've seen yet! I can't wait to see what comes of this.
alessiodam wrote:

It would be even crazier if you would be able to make it support lwIP-CE (https://github.com/cagstech/lwip-ce) later on Wink

Possibly just requires an ESP32 driver similar to my Ethernet one and you can just use lwip with it directly. With whatever extra modules are needed for things like ssid checking and connecting. But I’m by no means the expert on that.
Great stuff! I like how it fits nicely inside the calculator as well Smile.

You're talking to the ESP32 via a USB serial interface?
tr1p1ea wrote:
Great stuff! I like how it fits nicely inside the calculator as well Smile.

You're talking to the ESP32 via a USB serial interface?


Thank you! The S3 actually has a native USB interface that I’m using to communicate with the calculator as a vendor class device. The serial port is only used for debugging/programming.
Oh excellent, I will have to check out the S3 for sure!
Others have also mentioned the idea of using the C3 (which also has a native USB interface) instead of S3. The C3 has less powerful hardware but uses less power which would certainly be desirable on a device like a calculator. With that being said, the S3 has a deep sleep mode that only draws around 8 microamps of current. If you noticed in the hardware photo of the post, a wire is soldered to the test pad that is connected to the reset button contact. The reason for this is because the reset button will (in addition to its normal functionality) be acting as a deep sleep toggle. An automatic timeout for entering deep sleep can also be configured. I think the performance benefits of the dual core processor when multithreading certain tasks are worth the extra battery drain while the mod is enabled, but maybe I am just underestimating the power of the C3.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement