Page 2 of 8

Re: TTGO T-WATCH-2020

Posted: Mon Jul 20, 2020 3:18 pm
by moooond
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

Re: TTGO T-WATCH-2020

Posted: Sat Jul 25, 2020 7:46 am
by russ_h
My watch arrived and I was able to get a modified devbis driver to run on it.

Re: TTGO T-WATCH-2020

Posted: Sun Jul 26, 2020 4:30 pm
by renaudrenaud
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.

Re: TTGO T-WATCH-2020

Posted: Sun Jul 26, 2020 7:12 pm
by Roberthh
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.

Re: TTGO T-WATCH-2020

Posted: Sun Jul 26, 2020 8:23 pm
by renaudrenaud
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.

Re: TTGO T-WATCH-2020

Posted: Tue Jul 28, 2020 1:47 pm
by jhfoo
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/

Re: TTGO T-WATCH-2020

Posted: Tue Jul 28, 2020 5:02 pm
by husky
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.

Re: TTGO T-WATCH-2020

Posted: Tue Jul 28, 2020 5:23 pm
by renaudrenaud
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.

Re: TTGO T-WATCH-2020

Posted: Wed Jul 29, 2020 12:27 am
by jhfoo
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!

Re: TTGO T-WATCH-2020

Posted: Wed Jul 29, 2020 7:21 am
by renaudrenaud
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.