This started off as just an experiment!
Not sure how many might be interested, But after we (@Merlin513 and I) was able to
use the WiFi on some different Teensy boards (using some Esp32 boards or Teensy WIrelessShield by sparkfun) for WiFi and making a version that works on the Arduino Giga,
I wondered how hard it would be to make it work on Arduino Uno R4 WiFI.
More details about these other setups in the forum threads:
Playing with Zephyr V1.0.0 on GIGA and Wifi - Mega / GIGA R1 WiFi - Arduino Forum
Teensy 4.x + ESP32 Stack | Page 4 | Teensy Forum
It works!
Short Answer: It could be done
The sketch appears to be working reasonably well
If you touch the screen on one of the days, it brings up more details for the day
If you click on the keyboard near the upper right it brings up keyboard screen
Note the images above display I was using has a capacitive touch setup.
Amazon.com: Hosyond 3.5 inch 320x480 IPS Capacitive Touch Screen LCD Module SPI Serial ST7796U Driver for Arduino R3/Mega2560 : Electronics
It also works with ones with Resistive Touch
Amazon.com: Hosyond 4.0 Inches 480x320 TFT Touch Screen LCD Display Module SPI ST7796S Driver for Arduino R3/Mega2560 : Electronics
I pushed up the sketches, to my github project, which has some of the different sketches and tests, that I have done with the Uno R4...
UNOR4-stuff/test_sketches at main · KurtE/UNOR4-stuff
Libraries Used
WiFi It uses WiFiS3 - is installed with Arduino board
Display: Currently using my own ST7796 library that was adapted from some others including ST77XX_t3.... I pushed a copy of it up to:
Touch: Depending on Capacitive or Resistive.
Capacitive: Adafruit_FT6206 (library manager)
Resistive: XPT2046_Touchscreen (library manager)
Json ArduinoJson (library manager)
Challenges along the way
It was a challenge as the Uno R4 WiFi only has 256k Flash and 32K Ram. Where for example the T4.1 has like 8MB flash and 1024K memory... Giga 2MB Flash 1GB Ram...
I did a quick test to see if the WiFi would retrieve the weather information, from
The Test sketch worked.
Now to try to display it on a TFT display. I decided to go with an ST7796 display as I have been using these display, except for the GIGA where I am using the GIGA Shield.
Library? I could use Adafruit_st77xx library, but it uses differents fonts and the like, so I ported our ST77xx_t3 library to run on the Renesas setup, I already have versions that run on MBED an Zephyr.
Getting it to fit onto the Flash. The sketch we have setup has something like 20+ images
which were converted to simple bitmap RGB565 header files, each with 64 * 64 * 2 bytes of data. which consumed something like 180KB of the flash. Adding in all of the codes plus font files exceeded the flash. The first attempt was to instead of converting the PNG files to the bitmap format, we simply dump the bytes of the PNG file into header files and use PNGDEC to convert them on the fly. However PNGDEC requires about 45K of free ram to run, which is hard on a board with only 32K of Ram... The current solution was I ran these images again through a sketch which converted any of the images that used <= 256 colors into a palette image which cuts the image in about half... This was sufficient until I enabled more code for touch and a screen based keyboard entry, solved by removing the lines at the start and end of the image which were all BLACK... The sketch that I used to do the compress of the images is: compress_airy_images which I ran on a Teensy 4.1, as I am more used to it, and the like, including it has Serial.printf ;)
Things I may Change
-
I hate using arduino_secrets.h - May store, SSID, Password, and current Location in EEPROM, if it is not present may prompt for it...
-
May get some Display shield that plugs into R4, so can have setup without jumper wires.
But: Probably won't be doing very much more with this as it was more a challenge to myself. So will probably return to my previous distraction.






