Tensorflow Lite MicroPython support - I cannot use Pycom modules?
-
Hi guys,
I am using FiPy board on which I uploaded a new firmware that supports TensorFlow Lite features. I want to test the person detection model but for me that's not possible as I always get the message that modules, which I can use without problems with Pymakr, are not supported with this new firmware. Do you maybe know if I can fix this, or I must consider new modules (for LoRA lets say)?
Thanks in advance. Cheers! :D
-
@robert-hh I decided to not use esp32 cam as it can only operate at voltage above 4V, which is not useful for my setup. I have a question related to ESP32-WROVER-IE(16MB) chip. On which expansion board I should attach it and flash? This chip offers 16MB Flash and 8MB SPIRAM, somehing that I need for my project, but still no available boards on which this chip is attached.
-
@Adnan-Sabovic-0 I have a few links here, don'rt know if it helps:
https://www.berrybase.de/dev.-boards/esp8266-esp32-d1-mini/boards/esp32-cam-development-board-inkl.-ov2640-kameramodul?sPartner=g_shopping&msclkid=ff9ff1f60f271b5e66f793976b4cf5eb
https://de.banggood.com/ESP32-CAM-WiFi-+-bluetooth-Camera-Module-Development-Board-ESP32-With-Camera-Module-OV2640-Geekcreit-for-Arduino-products-that-work-with-official-Arduino-boards-p-1394679.html?gmcCountry=DE¤cy=EUR&cur_warehouse=CZ&createTmp=1&utm_source=bing_pa&utm_medium=cpc_eu&utm_content=dcr&utm_campaign=dcr-co-bpla-deg-all-pc-0903&ad_id=&msclkid=35036f519f6318bf8aa30d30fb087491
-
@robert-hh Yes, indeed. Sit and search :)
Thanks for help!
-
@Adnan-Sabovic-0 The must be hundreds of different ESP32 modules available. You have to Search. The first which I found was a esp32-CAM module, with 4 MB flash and 4 MB SPIRAM + camera.
-
@robert-hh I just checked that, but are there any products with 8/16 MB Flash and SPIRAM as well. I also saw that they use esp32 cam. Is there classic esp32 cam with additional MB module and integrated camera is enough to support the proposed firmware (MICROLITE SPIRAM CAM)?
-
@Adnan-Sabovic-0 The WROOM-32 module has 4 MB Flash and no SPIRAM. So you have to use the MICROLITE version.
-
@robert-hh I am not using FiPy right now. I ordered esp32-WROOM-32 to test as you suggested me to use pure MicroPython code (based on esp32). Because of that, I tried with 16MB firmware. With FiPy it works with "lighter" firmware but I want to test camera which is based on what I observed easier to do with esp32 board.
-
@Adnan-Sabovic-0 If 16m in the firmware name indicates 16MByte flash, then the firmware is wrong. FiPy has 8MB flash. So you need the matching firmware version.
-
@robert-hh I really don't know. I tried everything but this is really hard to enable to work. Based on their suggestion on this link (https://github.com/mocleiri/tensorflow-micropython-examples/blob/main/examples/person_detection/README.md) the microlite-spiram-16m-esp32-firmware should be used with esp32. After error I thought it's quite heavy for my board and then tried a lighter version but again not possible to run anything on the board. For the lighter version of firmware I got this:
Rebooting... ets Jun 8 2016 00:22:57 rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:2 load:0x3fff0030,len:4604 ho 0 tail 12 room 4 load:0x40078000,len:13872 load:0x40080400,len:3356 entry 0x4008061c E (847) psram: PSRAM ID read error: 0xffffffff E (847) spiram: SPI RAM enabled but initialization failed. Bailing out. E (10) spiram: SPI RAM not initialized
-
@Adnan-Sabovic-0 That's strange. After a full erase everything should come up straight again.
-
@robert-hh I did what you wrote here but again same issue. I performed a flash full erase and then installed again firmware and uploaded it on my board but again same error.
-
@Adnan-Sabovic-0 Like I answered in the Micropython forum: A reliable approach is performing a flash full erase using:
esptool.py --port /dev/ttyUSB0 --chip esp32 erase_flash
And the reinstall the firmware. That should fix the flash layout.
-
@robert-hh By typing ls /dev/tty* or dmesg | grep tty I can find my board:
/dev/ttyUSB0
And this is the output from mpremote (when I type mpremote in Ubuntu terminal):
rst:0x3 (SW_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:2 load:0x3fff0030,len:4604 ho 0 tail 12 room 4 load:0x40078000,len:13872 load:0x40080400,len:3356 entry 0x4008061c E (56) flash_parts: partition 3 invalid - offset 0x300000 size 0xc65d40 exceeds flash chip size 0x400000 E (56) boot: Failed to verify partition table E (62) boot: load partition table error! ets Jun 8 2016 00:22:57
Any idea how to solve this?
-
@Adnan-Sabovic-0 So you use a Linux System with a generic USB/UART FT232 adapter. I'm asking because only the /dev/ttyUSBx is the right port. Which devices do you see with
ls /dev/tty*
rshell is sometimes difficult to use. I prefer mpremote, which is faster and newer.
-
@robert-hh I want to connect using rshell as we talked in my previous post. I want to use rshell to upload files on esp32 and then run the example from repl, but it's not possible to connect it.
-
@Adnan-Sabovic-0 Which software do you use for REPL?
Simple tools like Putty or Teraterm should work.
-
@robert-hh Do you maybe know how to fix issue with repl connection. I am not able to connect to repl when esp32 board is connected to my PC. I think that I tried everything that I found on web but it is not possible to connect it. Every time same message:
Using buffer-size of 32 Connecting to /dev/ttyUSB0 (buffer-size 32)... Trying to connect to REPL
Do I need to connect some extra wires or what? It's a new board, I do not believe it's already damaged.
Cheers! :)
-
@robert-hh Aha okay I understand. Then I will focus more on the generic MicroPython implementation and try to find some solutions there. Thanks anyway!
-
@Adnan-Sabovic-0 If I understand it right, the tensorflow firmware includes the generic MicroPython firmware from micropython.org, dated Jan 27, NOT from Pycom. The micropython.org firmware from does NOT support anything beyond the ESP32 components. So no LoRa, no LTE. And you have to refer to their documentation for using the board.
If you want to use LoRa, you have to find a Python module that provides it, and adapt it to the board.