Wow, I hadn't. Looks really interesting!
It's the kind of thing you probably could port Espruino to, and then could maybe even run the existing Bangle.js apps on it.
well esp32 is not very power efficient when compared to nrf52, see e.g.
so yes, great for ESP32 fan or if you don't care about battery life that much
Design is really nice. Similarities to apple watch. Not so many sensors. It would be nice to run espruino on it. I thought esp32 espruino build doesnt support the Bluetooth yet?
It looks like some functions are available - but it doesn't look like things were ever fully implemented - or if they were, they were not documented... http://www.espruino.com/Reference#ESP32
I have been creating an Espruino environment for the T-watch. You can see the results in the video below:
Bangle Apps can be ported fairly easily. The reprogramming required is to adapt the Bangle button controls to the touch screen. You can see my Multiclock app and @fredericrous 's excellent calculator in the video.
This was the biggest headache. I implemented access to the ESP32's light sleep, however, initially, the current consumption during sleep was 20ma. I nearly gave up at that point but eventually discovered that the ESP32 Espruino port initialises all GPIO pins with pullups. When I removed this initialisation, the sleep current dropped to 4ma. The T-watch has an AXP202 power management chip and by reducing the CPU supply voltage to 2.7V, the sleep current is now 2.5ma. The battery is nominally 380mah and probably more realistically around 300mah giving around 5 days standby power - not amazing compared to the Bangle but at least useable.
The active power consumption is around 90ma - again not great when compared to the Bangle, however the screen is brighter even at 30% of maximum brightness. To get to 90ma, I have removed the BLUETOOTH component which consumes around 40ma.
The T-watch has a 240*240 1.54ins screen driven by an ST7789V driver - the same chip as the Bangle, however the interface is SPI not 8-bit parallel. Thanks to @MaBe ‘s
lcd_unbuf_spimodule with recent performance enhancements, graphics are not as fast as the Bangle but are not unusably slow. The T-Watch has SPIRAM and consequently has 20,000 vars versus 2200 on the Bangle. This means you can freely use large ArrayBuffers and drawImage to reduce screen flicker - the analogue clock in the video uses a 200 x 240 2-bit buffer.
The T-watch has very few peripherals compared with the Bangle - speaker, vibration motor, infra-red receiver and accelerometer with in-built step counter (ASIC). It does however have wifi which I plan to look at next. The software is all on Github here but completely undocumented at the moment.
Wow, this looks impressive! Nice thing about ESP32 is WiFi should be trivial - you could even make it load apps off the BangleApps site directly.
I'd been looking at the buttons/touch situation for a Bangle.js v2 and I figured you could just emulate BTN1/2/3 using the right-hand side of the touchscreen - not sure if that helps?
ESP32 Espruino port initialises all GPIO pins with pullups. When I removed this initialisation, the sleep current dropped to 4ma
@MaBe after your work on the
dump()functionality I wonder whether pin state really should just be left as input? Using pullup always seemed like a bit of an odd thing to me.
Thanks for the kind words. Loading apps direct from Github is a great idea.
I am not sure about button emulations - there are a lot more possibilities on a touch screen swipe up/down as well as left/right,long-touch and double touch. It might be less intrusive visually to map BTN’s to some if these. In addition, for some apps - for example the calculator - it is more natural to use the full facilities of touch. With reference to your post on a unified interface , I think it would be equally important to manage variants of the same app for different targets in a general purpose Espruino App loader.
Yes, it's more for the simple apps - obviously there are some that would really benefit from being rewritten to handle touch properly.
Interesting thought about having different versions of the same app - I'd started adding some feature checking, so you could say 'this app needs a touchscreen' . I hadn't really considered that you might have two versions of the same app meant for different devices, but hopefully that wouldn't be too hard to handle.
From what I've heard though, the battery life was still pretty dismal on these? There are some things Espressif is very good at, but power saving isn't one of them...
The ESP32 power saving design is fine, its the board designers that let it down. For example, the light sleep current of the ESP32 itself is 20-40 microamps, however, the T-watch only manages to reduce to 2.5ma. The active current can be reduced by introducing sleep in the idle loops, but this is not currently supported in the Espruino port. However, turning on the Wifi drains the battery fairly quickly! Using it simply as a watch with on time between 5 and 30 seconds, I get about three days battery life which is OK.
I had a go at porting the App Manager from the Bangle and managed to run it unchanged by implementing a version of
E.showMenu()with emulated buttons as shown below:
I think the buttons are better at the bottom of the screen as otherwise your fingers obscure a lot of the screen when you use them. The implementation uses a 2-bit
ArrayBufferto eliminate screen flicker.
Nice, I really like it.
Are you planning to share the code?
However, turning on the Wifi drains the battery fairly quickly!
Also turning on Bluetooth Low Energy drains the battery fairly quickly. However one guy managed more than one day with BLE 'on' by runing BLE advertising every second (yes 1 packet sent each second) Then the horrible power drain with BLE turned on averaged into something reasonable.
Yes, I have made now made the repository public -jeffmer/Twatch_Espruino. My changes to the Espruino firmware are at jeffmer/Espruino.
I noticed that current partitions for the ESP32 allocate only 256K to Storage. In addition, the configuration is for 4Mb of flash. The T-watch has 16Mb of flash - I would grateful for any guidance as to how to build a version of Espruino with different partitions?
I completely agree that the ESP32 Bluetooth consumes a lot of power. I noted above that it seemed to require 40ma even if not active and so I removed it completely. This post https://github.com/espressif/esp-idf/issues/947#issuecomment-500312453 would seem to indicate that Bluetooth on current ESP32 hardware is a lost cause as you need an external 32.768Khz crystal to get effective low-power performance (yes, it uses 1 second advertising!).
Overall, I think the T-watch is great as it has a large bright touchscreen but it would be of much more practical use as a smartwatch if it was based on low-power Bluetooth SoC such as an NRF52840. (I have a P8 - NRF52832 - on order! )
I have a P8 - NRF52832 - on order!
Great watch for the price. This weekend I got SPI flash storage working together with the display (it has shared SPI pins between spi flash and display so was a bit tricky) so code runs from SPI like on Bangle, @enaon does great things with P8 and is always out of space so he nudged me to get it working.
Great - thanks for sharing
The T-watch has 16Mb of flash - I would grateful for any guidance as to how to build a version of Espruino with different partitions?
change .cvs file and convert to .bin
This is what could help you to get details about building it
add new areas
Heard of this one?