Migrating project from UNO to ESP32

I've been developing a project using an old Duemilanove, also an old UNO, that controls the brightness of a microscope LED illuminator, providing presets configured to work with various different lenses and camera settings.

I've pretty much run out of storage and, with the TFT Touch Shield (parallel), there's too few pins.

I think the speed of the ESP32, the memory allowance, etc., in combination with an SPI TFT Touch display will more than meet my needs (and probably also a 'focus stacker, the next project).

The current display is "Elegoo" and uses the following libraries in the sketch:

#include <Elegoo_GFX.h>       // Core graphics library
#include <Elegoo_TFTLCD.h>    // Hardware-specific library
#include <TouchScreen.h>

The sketch uses buttons (Elegoo_GFX_Button).

I'd appreciate some insight into the challenges of such a migration and whether or not code written for a UNO will need substantially to be rewritten.

Thanks,
ricm

Is no generic answer. Post the code in question.

the UNO uses 5V logic the ESP32 3.3V logic - will your attached devices work at 3.3V?
if you are inputting 5V signal into the ESP32 use a level converter or potential divider to convert any 5V inputs to 3V

Yes, and in many cases, it's beneficial, since more and more peripheral devices are now 3.3V logic.

If you already have hardware that works with the Uno, then upgrading to a Mega2560 might be an easier transition.
I have a bunch of mcufriend parallel TFTs that run fine on Uno, but use most of the I/O. On a Mega they run without any code changes and I have more RAM, Flash and I/O.

If I were starting from scratch, I'd use an ESP32 and TFT_eSPI and possibly LVGL. Tons of resources and LVGL graphics are amazing.

Related: I've found some 5" & 7" TFT displays that with an onboard ESP32 in the US$30 range on AliExpress. The price/performance ratio can't be beat, although they don't have a lot of I/O pins left over.

The Duemilanove / UNO are just legacy devices but useful for development. I can use them for unit testing and keep within limits.
The TFT Touch Display shield won 't be ported and the SPI TFT Touch is already 3V3 on the data pins with 5V/3V3 options on Vcc and LED (BL).
So yes, electrically we're good to go.

...and it so happens that I have some spare Mega 256's from about 10 yrs ago. I can move to the Mega straight away (and may yet do that given some display problems with the ESP/SPI Touch combination). The Mega is physically too big for the final LED controller but has lots of I/O as well as memory for development work.

I want to invest some time in doing a decent project but would hate at the 11th hour to find porting to ESP32 carries huge penalties. The Elegoo button library works well (it's probably a clone of Adafruit's) and I'm hoping that will port. If not, I need to change tack now.

I've seen some images of LVGL and agree it looks great, but I don't want to lose sight of the fact I need to get back to using the microscope and not get sidelined into spending too much time on a super slick interface. Here's how mine's looking so far.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.