TTGO T-WATCH-2020

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
User avatar
moooond
Posts: 5
Joined: Wed Jul 08, 2020 4:14 pm
Contact:

Re: TTGO T-WATCH-2020

Post by moooond » Mon Jul 20, 2020 3:18 pm

i made some progress. the power managment, the touch and the display are working. i also got the bma accellerator to work though it needs some more work but at least i can read the accelleration.

as for now: all the code is pure micropython with now compiled (C) code for the modules. i think this is nice for experimenting but not as "fast". maybe we can later make a C version out of it..

check out my new version on gitlab: https://gitlab.com/mooond/t-watch2020-e ... icropython

User avatar
russ_h
Posts: 23
Joined: Thu Oct 03, 2019 2:26 am

Re: TTGO T-WATCH-2020

Post by russ_h » Sat Jul 25, 2020 7:46 am

My watch arrived and I was able to get a modified devbis driver to run on it.

renaudrenaud
Posts: 6
Joined: Tue Jul 21, 2020 7:39 pm

Re: TTGO T-WATCH-2020

Post by renaudrenaud » Sun Jul 26, 2020 4:30 pm

Hi guys, I am here to ask for some help.

I'received the TWATCH2020 a while ago and played with Arduino IDE for basic things. Now I would to try some things with MicroPython, but I am suffering of major knowledge on the subject... And I am stuck.

I've tried a lot of download from this page http://micropython.org/download/esp32/ always with the same result.

Flashing seems ok:

Code: Select all

C:\Tools\Lilygo\upython>esptool.py --port COM4 --baud 460800 write_flash --flash_size=detect 0 esp32-idf4-20200721-unstable-v1.12-649-g27767aafa.bin
esptool.py v2.8
Serial port COM4
Connecting....
Detecting chip type... ESP32
Chip is ESP32D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 8c:aa:b5:82:db:4c
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Auto-detected Flash size: 16MB
Compressed 1455888 bytes to 928127...
Wrote 1455888 bytes (928127 compressed) at 0x00000000 in 22.7 seconds (effective 513.0 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...

But when I try to connect with PuTTY i have this message:

Code: Select all

rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
flash read err, 1000
ets_main.c 371
ets Jun  8 2016 00:22:57
Soooo... I am lost and I do not know what to do.

Thanks in advance for your help.

User avatar
Roberthh
Posts: 2172
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: TTGO T-WATCH-2020

Post by Roberthh » Sun Jul 26, 2020 7:12 pm

As far as I recall, there is a problem with 16 MByte flash. You may search in the forum about that. You could try to set force the flash amout used to 8 MB, by seteeing flash:_size=8MB instead of flash_size=detect.

renaudrenaud
Posts: 6
Joined: Tue Jul 21, 2020 7:39 pm

Re: TTGO T-WATCH-2020

Post by renaudrenaud » Sun Jul 26, 2020 8:23 pm

Well thanks, but same story. I have to manage my frustration. I've done some things with Arduino but I really love python and I really want to do something with it.

jhfoo
Posts: 17
Joined: Tue Jul 07, 2020 6:50 am

Re: TTGO T-WATCH-2020

Post by jhfoo » Tue Jul 28, 2020 1:47 pm

renaudrenaud wrote:
Sun Jul 26, 2020 8:23 pm
Well thanks, but same story. I have to manage my frustration. I've done some things with Arduino but I really love python and I really want to do something with it.
Thonny (Windows app) simplifies the firmware upload: you need only select the COM port and firmware file and they do the rest.

https://thonny.org/

husky
Posts: 17
Joined: Wed Jul 15, 2020 7:46 am

Re: TTGO T-WATCH-2020

Post by husky » Tue Jul 28, 2020 5:02 pm

The command to write esp32 micropython is :

Code: Select all

esptool.py --chip esp32 --port COM4  --baud 115200 write_flash -z 0x1000
notice that it starts writing at position 0x1000
try with this:

Code: Select all

[code]C:\Tools\Lilygo\upython>esptool.py --port COM4 --baud 460800 write_flash --flash_size=detect 0x1000 esp32-idf4-20200721-unstable-v1.12-649-g27767aafa.bin
renaudrenaud wrote:
Sun Jul 26, 2020 4:30 pm
Hi guys, I am here to ask for some help.

I'received the TWATCH2020 a while ago and played with Arduino IDE for basic things. Now I would to try some things with MicroPython, but I am suffering of major knowledge on the subject... And I am stuck.

I've tried a lot of download from this page http://micropython.org/download/esp32/ always with the same result.

Flashing seems ok:

Code: Select all

C:\Tools\Lilygo\upython>esptool.py --port COM4 --baud 460800 write_flash --flash_size=detect 0 esp32-idf4-20200721-unstable-v1.12-649-g27767aafa.bin
esptool.py v2.8
Serial port COM4
Connecting....
Detecting chip type... ESP32
Chip is ESP32D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 8c:aa:b5:82:db:4c
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Auto-detected Flash size: 16MB
Compressed 1455888 bytes to 928127...
Wrote 1455888 bytes (928127 compressed) at 0x00000000 in 22.7 seconds (effective 513.0 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...

But when I try to connect with PuTTY i have this message:

Code: Select all

rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
flash read err, 1000
ets_main.c 371
ets Jun  8 2016 00:22:57
Soooo... I am lost and I do not know what to do.

Thanks in advance for your help.

renaudrenaud
Posts: 6
Joined: Tue Jul 21, 2020 7:39 pm

Re: TTGO T-WATCH-2020

Post by renaudrenaud » Tue Jul 28, 2020 5:23 pm

Ha thanks guys... Downloading Thonny... Installing Thonny... Done. Rhaa, how to flash... Found!

Firmware injected and now I have a Shell.

Screen is black, but I'will find (maybe).

Edit: ok, I am starting to play with it.

First steps are difficult. But Ok, I can write something on the screen. Next steps will be easier I hope.

Thanks again.

jhfoo
Posts: 17
Joined: Tue Jul 07, 2020 6:50 am

Re: TTGO T-WATCH-2020

Post by jhfoo » Wed Jul 29, 2020 12:27 am

renaudrenaud wrote:
Tue Jul 28, 2020 5:23 pm
Ha thanks guys... Downloading Thonny... Installing Thonny... Done. Rhaa, how to flash... Found!

Firmware injected and now I have a Shell.

Screen is black, but I'will find (maybe).

Edit: ok, I am starting to play with it.

First steps are difficult. But Ok, I can write something on the screen. Next steps will be easier I hope.

Thanks again.
Try printing to the command line: it should show up on editors like Thonny and Visual Code. Funny thing is writing to a display actually requires a bit more coding knowledge and library familiarity, like frame buffers and display drivers.

You'll get there eventually; we all stumbled through!

renaudrenaud
Posts: 6
Joined: Tue Jul 21, 2020 7:39 pm

Re: TTGO T-WATCH-2020

Post by renaudrenaud » Wed Jul 29, 2020 7:21 am

It's ok, more or less. I am able to print the date and the battery level on the screen of the TTGO T Watch. A lot of things to discover of course, I just need some time. Anyway thanks a lot for your help, I have now all the things I need to go forward.
I've shown the result to my wife but for the moment she prefers what I've done in C with Arduino - but I prefer to program with python.

Post Reply