Coder Social home page Coder Social logo

ttgo_twatch_library's Introduction

🌟LilyGO T-Watch🌟

English | δΈ­ζ–‡

⭐ News

  1. T-Watch-S3 version is here
  2. In order to be compatible with multiple versions of T-Watch, all examples include a config.h file. For the first use, you need to define the T-Watch model you use in the config.h file
  3. In the config.h file, you can also see similar definitions, such as LILYGO_WATCH_LVGL, LILYGO_WATCH_HAS_MOTOR, this type of definition, it will be responsible for opening the defined module function, all definitions Will be available here View
  4. Most of the examples are only used as hardware function demonstrations. This library only completes some initialization work and some demonstrations. For more advanced gameplay, please see TTGO.h, to understand how to initialize, after being familiar with it, you can completely leave this library for more advanced gameplay

sharandac/My-TTGO-Watch sharandac/My-TTGO-Watch sharandac/My-TTGO-Watch sharandac/My-TTGO-Watch sharandac/My-TTGO-Watch sharandac/My-TTGO-Watch sharandac/My-TTGO-Watch sharandac/My-TTGO-Watch sharandac/My-TTGO-Watch sharandac/My-TTGO-Watch

  • Demonstration effect of T-Watch2020-V3 from lunokjod

lunokjod/watch lunokjod/watch lunokjod/watch lunokjod/watch lunokjod/watch lunokjod/watch lunokjod/watch lunokjod/watch lunokjod/watch

πŸš€ Characteristics

  1. The library already contains all the hardware drivers for T-Watch
  2. Using TFT_eSPI as the display driver, you can directly call TFT_eSPI through the construction object.
  3. Using lvgl v7.7.2 as the display graphics framework, the driver method has been implemented, you only need to call lvgl api according to your own needs.
  4. For the use of lvgl please refer to lvgl docs

πŸ”· Install

  • Install the Arduino IDE. Note: Later instructions may not work if you use Arduino via Flatpak.
  • Download a zipfile from github using the "Download ZIP" button and install it using the IDE ("Sketch" -> "Include Library" -> "Add .ZIP Library...", OR:
  • Clone this git repository into your sketchbook/libraries folder. For more info, see https://www.arduino.cc/en/Guide/Libraries

πŸ”· Note

πŸ”· FAQ

  • The following code is reported as an error when uploading. Please change the default upload baud rate in ArduinoIDE from '20000' to '921600'.
    A fatal error occurred: Failed to write to target RAM(result was 01070000)
    
  • This error may also occur on MacOS if using a poorly compatible USB to serial driver. The driver at wch.cn is a better match. The webpage is in Chinese but the driver is digitally signed for security.

πŸ”Ά How to find the sample program

  • T-Watch & LilyPi
  • In the Arduino board select TTGO T-Watch
  • In the Arduino File -> Examples -> TTGO_TWatch_Library

πŸ”Ά Precautions

  • T-Watch-2019 & LilyPi: Since uses a special IO as the SD interface, please remove the SD card when downloading the program.

πŸ”· Resources

🚩 Version comparison

Product T-Watch-2019 T-Watch-2020-V1 T-Watch-2020-V2 T-Watch-2020-V3 T-Block/T-Block-V1 LilyPi
Core ESP32-D0WDQ6 ESP32-D0WDQ6 ESP32-D0WDQ6 ESP32-D0WDQ6 ESP32-D0WDQ6 ESP32-WROVER-B
PSRAM 16MBytes 16MBytes 16MBytes 16MBytes 16MBytes 16MBytes
Flash 8MBytes 8MBytes 4MBytes 8MBytes 8MBytes 8MBytes
PMU AXP202 AXP202 AXP202 AXP202 AXP202 ❌
IMU BMA423 BMA423 BMA423 BMA423 MPU6050 ❌
TFT 1.54"/240X240/ST7789V 1.54"/240X240/ST7789V 1.54"/240X240/ST7789V 1.54"/240X240/ST7789V [1] [1]
TouchScreen FT6336 FT6336 FT6336 FT6336 [1] [1]
Real Time Clock PCF8563 PCF8563 PCF8563 PCF8563 PCF8563 PCF8563
Infrared sensor ❌ βœ… βœ… βœ… ❌ ❌
Scalable βœ… ❌ βœ… ❌ βœ… βœ…
Microphone [1] ❌ ❌ SPM1423HM4H [1] ❌
GPS [1] ❌ Quectel L76K ❌ [1] ❌
Decoder [1] MAX98357A ❌ MAX98357A [1] ❌
Tactile [1] βœ…(IO Control) DRV2605(I2C Control) βœ…(IO Control) [1] ❌
Button βœ… βœ…[2] βœ…[2] βœ…[2] βœ…[2] βœ…
  • [1]:Need expansion board to support
  • [2]:The buttons are AXP202 PEK programmable buttons

πŸ”Ά More interesting projects

ttgo_twatch_library's People

Contributors

alexgoodyear avatar billyischilly avatar chipguyhere avatar codefaux avatar datacute avatar dervomsee avatar destroyedlolo avatar infinnovation-dev avatar lewisxhe avatar lilygo avatar mibus avatar mingzey avatar northerndiy avatar sdrabb avatar sharandac avatar sukaibin11 avatar sweetlilmre avatar thiswillbeyourgithub avatar vanvuongngo avatar varind avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ttgo_twatch_library's Issues

Documentation for upgrading the tft library

The TFT_eSPI library bundled within the watch library makes it convenient to use with minimal configuration, but it makes it difficult to know how to use a more recent version. The current library version is 2.2.14 and includes some bug fixes since 2.2.6. I hoped it'd be as simple as specifying 2.2.14 as the TFT_eSPI version, and copying over the setup header file, but that left me without a working display.

Can you share what other steps are taken to make the display work with the library?

Where is config.h?

Sorry to ask a noob question. But readme mentions config.h for selection of watch type. I download the zip and go through the Arduino TTGO_TWatch_Library-master folder. I cannot find config.h. Thanks in advance.

Instructions to use Arduino IDE on Mac OS X

Are there instructions for developing on Arduino IDE on Mac OS X (Catalina)? I installed the TTGO_TWatch_Library and see under File -> Examples the TTGO examples are listed as INCOMPATIBLE. Also, I'm not sure what I should be doing to compile for ESP32? -Frank

question regarding touch and commit to move "touch" to private

The commit 98dc859
moved "touch" to private inside TTGO class.

I have a T-Watch 2019 with display and touch.

I was initializing my code doing "ttgo->touch->enterSleepMode();" to reduce power consumption, as I was not using the touch screen.

But I cannot do it anymore.

In the code you can do ttgo->displayOff() that executes "touch->enterSleepMode()", but also turns off the display.

If I want to keep the display ON, but still do "touch->enterSleepMode()", I cannot do it anymore, because touch is now private.

How can I do this? is this a bug?

Update for twatch 2020

Can the author update data for their latest watch model?

If the hardware, pin map for 2020 is exactly the same as previous models, please confirm in your README.MD. I don't think it's exactly the same, and am not sure where and how are they different.

sketch cannot be uploaded

What could be the problem? The watch new,original firmware working..
Arduino 1.8.9. (https://dl.espressif.com/dl/package_esp32_index.json) ESP32 driver ok,TTGO T-Watch ok,sketch compile ok.
Upload - then error :
esptool.py v2.6
Connecting.....................................................
A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header
(on-off button pressing does not help ..)

condition is always true in button2.c

file src/drive/button/Button2.cpp
function void Button2::loop()
line 106: if(pin < 0)return;

pin variable is declared as "byte", which means 0 to 255 values. Which means it can never be negative.

This condition is always true.

What do you want to test?
If it is useful for somebody to set it to negative, maybe you should declare it as "int", or just "char"

Backlight Pin?

Hello,

I'm trying to do control of the backlight on the T-Watch 2020, but the schematic doesn't say which pin controls the backlight, and I can't find it in the backlight code in src/drive/tft/bl.h. Is it Pin 12? I also see there is something about the AXP202 LDO2 in src/TTGO.h, do I also need to switch that on to turn the backlight on?

Thanks.

Playing Audio on the LILYGO_WATCH_2020_V1 breaks the display

I saw that the example using earlephilhower/ESP8266Audio wasn't supported on the LILYGO_WATCH_2020_V1.

So I tried using this library to play an MP3 from SPIFFS with the following sketch;

#define LILYGO_WATCH_2020_V1
#define LILYGO_WATCH_LVGL 
#include <LilyGoWatch.h>
TTGOClass *ttgo;

#include "Audio.h" //https://github.com/schreibfaul1/ESP32-audioI2S
#include "SPIFFS.h"

// Digital I/O used
#define I2S_DOUT      33 // TTGO correct
#define I2S_BCLK      26 // TTGO correct
#define I2S_LRC       25 // TTGO correct

Audio audio;

void setup() {
    Serial.begin(115200);
    Serial.println("Hello");
    
    //Init watch
    ttgo = TTGOClass::getWatch();
    ttgo->begin();
    ttgo->openBL(); //Backlight

    //Test for LVGL
    ttgo->lvgl_begin();
    lv_obj_t *text = lv_label_create(lv_scr_act(), NULL);
    lv_label_set_text(text, "T-Watch");
    lv_obj_align(text, NULL, LV_ALIGN_CENTER, 0, 0);

    ttgo->enableLDO3(); //Turn on the audio power

    SPIFFS.begin(); //Mount SPIFFS
    
    audio.setPinout(I2S_BCLK, I2S_LRC, I2S_DOUT);
    audio.setVolume(21); // 0...21
  
    audio.connecttoFS(SPIFFS, "/pno-cs.mp3"); //Load MP3
}

void loop()
{
    audio.loop();
    lv_task_handler();
    delay(5);
}

This works but it makes the LVGL fail. I can see the backlight turning on but nothing is displayed.
If I remove the #include "Audio.h" it does show the text on the screen.

Is there a way to make the LILYGO_WATCH_2020_V1 play Audio from SPIFFS without breaking LVGL?

struct initialization is wrong in bma4.c

file src/drive/bma423/bma4.c
function bma4_perform_accel_foc()
line 2520: struct offset_delta delta = { {0} };

the offset_delta struct contains 3 fields, which are each a struct of 2 fields

initialization should be:
struct offset_delta delta = { {0,0},{0,0},{0,0} };

Maybe you should consider setting the warnings to ALL, and take a look at them, and fix them. They can be very important.

MenuBar::lv_menu_config_t register periodic task

Hi community,

is there any way to register a periodic task while a "face" is active?
(Which will be closed on exit)

For example i would like to light up the internal LED every second when the following "face" is active:
wifi_event_cb

{.name = "WiFi", .img = (void *) &wifi, .event_cb = wifi_event_cb}

I need this because I would like to create a simple "compass" app for the SimpleWatch example. So i need to poll the AxisSensor every second.

Question about parameters for lv_task_create

Wondering if you could offer a brief description of the parameters associated with these statements. Is '1000' a one second delay for example?:
lv_task_create([](lv_task_t *t) {
}, 1000, LV_TASK_PRIO_MID, nullptr);

I have come to understand this part below, calling the task defined above from void loop(). I just want to understand the definition of lv_task. Thanks.

void loop()
{
lv_task_handler();
}

Is there an example for BLE connectivity to Android phone?

I'd love to have my watch connect to my phone to display push data, for example caller id on incoming calls. Don't expect call control, just would like to be able to look at my wrist so I can see if I really need to pick up my phone to deal with the call.

Writing to the display from multiple FreeRTOS tasks causes watchdog failure

Thanks for this watch. I’ve been using it as a way to learn FreeRTOS and enjoying it. I recently broke my code up into multiple tasks and the watch becomes unstable, crashing with watchdog errors.

I believe the reason is because the display code is getting preempted between the begin transmisson and end transmission lines, causing a thread to never get its response.

Does it make sense to add a mutex around those lines? I’d be happy to send a pull request if so.

No built-in way to stop lvgl

I'm making a multi-app project, with some apps using lvgl and some using tftespi. There is a nice lvgl_begin function, but nothing related to lvgl_end. There does seem to be a way to stop the ticker (stopLvglTick), but I'm pretty sure that doesn't clear any memory-related stuff.

If possible, adding a way to clear all memory related to lvgl / clearing info related to lvgl would be fantastic!

Error in link

Hi,
I try to compile my-ttgo-watch, all compile fine except for the link, I get :

C:\Users\DOMINI1\AppData\Local\Temp\arduino_build_534991\sketch\my-ttgo-watch.ino.cpp.o:(.literal._Z5setupv+0x50): undefined reference to motor_setup()' C:\Users\DOMINI~1\AppData\Local\Temp\arduino_build_534991\sketch\my-ttgo-watch.ino.cpp.o:(.literal._Z5setupv+0x54): undefined reference to display_setup(TTGOClass*)'
C:\Users\DOMINI
1\AppData\Local\Temp\arduino_build_534991\sketch\my-ttgo-watch.ino.cpp.o:(.literal._Z5setupv+0x58): undefined reference to screenshot_setup()' C:\Users\DOMINI~1\AppData\Local\Temp\arduino_build_534991\sketch\my-ttgo-watch.ino.cpp.o:(.literal._Z5setupv+0x5c): undefined reference to splash_screen_stage_one(TTGOClass*)'
C:\Users\DOMINI1\AppData\Local\Temp\arduino_build_534991\sketch\my-ttgo-watch.ino.cpp.o:(.literal._Z5setupv+0x60): undefined reference to splash_screen_stage_update(char const*, int)' C:\Users\DOMINI~1\AppData\Local\Temp\arduino_build_534991\sketch\my-ttgo-watch.ino.cpp.o:(.literal._Z5setupv+0x64): undefined reference to powermgm_setup(TTGOClass*)'
C:\Users\DOMINI
1\AppData\Local\Temp\arduino_build_534991\sketch\my-ttgo-watch.ino.cpp.o:(.literal._Z5setupv+0x68): undefined reference to gui_setup()' C:\Users\DOMINI~1\AppData\Local\Temp\arduino_build_534991\sketch\my-ttgo-watch.ino.cpp.o:(.literal._Z5setupv+0x6c): undefined reference to weather_app_setup()'
C:\Users\DOMINI1\AppData\Local\Temp\arduino_build_534991\sketch\my-ttgo-watch.ino.cpp.o:(.literal._Z5setupv+0x70): undefined reference to stopwatch_app_setup()' C:\Users\DOMINI~1\AppData\Local\Temp\arduino_build_534991\sketch\my-ttgo-watch.ino.cpp.o:(.literal._Z5setupv+0x74): undefined reference to example_app_setup()'
C:\Users\DOMINI
1\AppData\Local\Temp\arduino_build_534991\sketch\my-ttgo-watch.ino.cpp.o:(.literal._Z5setupv+0x78): undefined reference to wifictl_on()' C:\Users\DOMINI~1\AppData\Local\Temp\arduino_build_534991\sketch\my-ttgo-watch.ino.cpp.o:(.literal._Z5setupv+0x7c): undefined reference to splash_screen_stage_finish(TTGOClass*)'
C:\Users\DOMINI1\AppData\Local\Temp\arduino_build_534991\sketch\my-ttgo-watch.ino.cpp.o:(.literal._Z5setupv+0x80): undefined reference to display_get_brightness()' C:\Users\DOMINI~1\AppData\Local\Temp\arduino_build_534991\sketch\my-ttgo-watch.ino.cpp.o:(.literal._Z5setupv+0x84): undefined reference to display_set_brightness(unsigned int)'
C:\Users\DOMINI
1\AppData\Local\Temp\arduino_build_534991\sketch\my-ttgo-watch.ino.cpp.o:(.literal._Z5setupv+0x88): undefined reference to blectl_setup()' C:\Users\DOMINI~1\AppData\Local\Temp\arduino_build_534991\sketch\my-ttgo-watch.ino.cpp.o:(.literal._Z4loopv+0x0): undefined reference to gui_loop(TTGOClass*)'
C:\Users\DOMINI1\AppData\Local\Temp\arduino_build_534991\sketch\my-ttgo-watch.ino.cpp.o:(.literal._Z4loopv+0x4): undefined reference to powermgm_loop(TTGOClass*)' C:\Users\DOMINI~1\AppData\Local\Temp\arduino_build_534991\sketch\my-ttgo-watch.ino.cpp.o: In function setup()':
C:\DISK_C_OneDrive\Arduino\Lilygo\My-TTGO-Watch-master\my-ttgo-watch/my-ttgo-watch.ino:51: undefined reference to motor_setup()' C:\DISK_C\_OneDrive\Arduino\Lilygo\My-TTGO-Watch-master\my-ttgo-watch/my-ttgo-watch.ino:51: undefined reference to display_setup(TTGOClass*)'
C:\DISK_C_OneDrive\Arduino\Lilygo\My-TTGO-Watch-master\my-ttgo-watch/my-ttgo-watch.ino:53: undefined reference to screenshot_setup()' C:\DISK_C\_OneDrive\Arduino\Lilygo\My-TTGO-Watch-master\my-ttgo-watch/my-ttgo-watch.ino:56: undefined reference to splash_screen_stage_one(TTGOClass*)'
C:\DISK_C_OneDrive\Arduino\Lilygo\My-TTGO-Watch-master\my-ttgo-watch/my-ttgo-watch.ino:58: undefined reference to splash_screen_stage_update(char const*, int)' C:\DISK_C\_OneDrive\Arduino\Lilygo\My-TTGO-Watch-master\my-ttgo-watch/my-ttgo-watch.ino:62: undefined reference to splash_screen_stage_update(char const*, int)'
C:\DISK_C_OneDrive\Arduino\Lilygo\My-TTGO-Watch-master\my-ttgo-watch/my-ttgo-watch.ino:65: undefined reference to splash_screen_stage_update(char const*, int)' C:\DISK_C\_OneDrive\Arduino\Lilygo\My-TTGO-Watch-master\my-ttgo-watch/my-ttgo-watch.ino:66: undefined reference to splash_screen_stage_update(char const*, int)'
C:\DISK_C_OneDrive\Arduino\Lilygo\My-TTGO-Watch-master\my-ttgo-watch/my-ttgo-watch.ino:67: undefined reference to splash_screen_stage_update(char const*, int)' C:\DISK_C\_OneDrive\Arduino\Lilygo\My-TTGO-Watch-master\my-ttgo-watch/my-ttgo-watch.ino:68: undefined reference to powermgm_setup(TTGOClass*)'
C:\DISK_C_OneDrive\Arduino\Lilygo\My-TTGO-Watch-master\my-ttgo-watch/my-ttgo-watch.ino:71: undefined reference to splash_screen_stage_update(char const*, int)' C:\DISK_C\_OneDrive\Arduino\Lilygo\My-TTGO-Watch-master\my-ttgo-watch/my-ttgo-watch.ino:72: undefined reference to gui_setup()'
C:\DISK_C_OneDrive\Arduino\Lilygo\My-TTGO-Watch-master\my-ttgo-watch/my-ttgo-watch.ino:72: undefined reference to weather_app_setup()' C:\DISK_C\_OneDrive\Arduino\Lilygo\My-TTGO-Watch-master\my-ttgo-watch/my-ttgo-watch.ino:74: undefined reference to stopwatch_app_setup()'
C:\DISK_C_OneDrive\Arduino\Lilygo\My-TTGO-Watch-master\my-ttgo-watch/my-ttgo-watch.ino:75: undefined reference to example_app_setup()' C:\DISK_C\_OneDrive\Arduino\Lilygo\My-TTGO-Watch-master\my-ttgo-watch/my-ttgo-watch.ino:75: undefined reference to wifictl_on()'
C:\DISK_C_OneDrive\Arduino\Lilygo\My-TTGO-Watch-master\my-ttgo-watch/my-ttgo-watch.ino:77: undefined reference to splash_screen_stage_finish(TTGOClass*)' C:\DISK_C\_OneDrive\Arduino\Lilygo\My-TTGO-Watch-master\my-ttgo-watch/my-ttgo-watch.ino:78: undefined reference to display_get_brightness()'
C:\DISK_C_OneDrive\Arduino\Lilygo\My-TTGO-Watch-master\my-ttgo-watch/my-ttgo-watch.ino:82: undefined reference to display_set_brightness(unsigned int)' C:\DISK_C\_OneDrive\Arduino\Lilygo\My-TTGO-Watch-master\my-ttgo-watch/my-ttgo-watch.ino:84: undefined reference to blectl_setup()'
C:\Users\DOMINI
1\AppData\Local\Temp\arduino_build_534991\sketch\my-ttgo-watch.ino.cpp.o: In function loop()': C:\DISK_C\_OneDrive\Arduino\Lilygo\My-TTGO-Watch-master\my-ttgo-watch/my-ttgo-watch.ino:100: undefined reference to gui_loop(TTGOClass*)'
C:\DISK_C_OneDrive\Arduino\Lilygo\My-TTGO-Watch-master\my-ttgo-watch/my-ttgo-watch.ino:100: undefined reference to `powermgm_loop(TTGOClass*)'
collect2.exe: error: ld returned 1 exit status

can you advice please,
thanks,
Domi.

preprocessor define error "-DARDUINO_T-Watch"

When compiling anything for the board: "TTGO T-Watch", the compilation under Arduino IDE adds the following to gcc:

"-DARDUINO_T-Watch"

This is an error.

You can see that the compilation shows a warning:
":0:10: warning: ISO C++11 requires whitespace after the macro name"

The preprocessor defines cannot have special characters like "-".

You have to change the "-DARDUINO_T-Watch" to "-DARDUINO_TWATCH", with underscore instead, and uppercase if possible.

This is a bug, and because of a lot of luck it does not show as an error. The "-" confuses the command line into thinking it is another parameter, and not the same define.

Is it possible to wake up the TWatch 2020 from deep sleep by pressing the button?

Everything already in the title.

I checked and uploaded the deep sleep sketch.
It's great and it might be necessary to use the deep sleep mode for a reasonable battery run time.

But IMHO the deep sleep makes only sense if one can wake it up by pressing the button.

As schematics are not available I would be really greateful an example sketch for such a solution.

Thanks a lot.
Nils

Doesn't work with platformio

Hello,

the LVGL examples don't seem to work with platformio. Neither when using the officially registered TTGO TWatch Library nor when using the this repo as the library.

My platformio.ini currently looks like this:

[env:ttgo-t-watch]
platform = espressif32
board = ttgo-t-watch
framework = arduino
lib_deps =
	https://github.com/Xinyuan-LilyGO/TTGO_TWatch_Library

And I am currently using an unmodified version of the examples/LVGL/SimpleWatch example. I also tried the Lvgl_Base example and that didn't work either.

This is the output of the serial monitor:

rst:0x1 (POWERON_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:0x3fff0018,len:4
load:0x3fff001c,len:1044
load:0x40078000,len:8896
load:0x40080400,len:5828
entry 0x400806ac
[E][esp32-hal-i2c.c:1426] i2cCheckLineState(): Bus Invalid State, TwoWire() Can't init sda=0, scl=1
ENTER IN LIGHT SLEEEP MODE

The screen backlight turns on, but nothing is displayed. Just a black screen. The watch did work before, and I think when I tried with the Arduino "IDE" it worked too.

How to use IR transmitter?

Hi.
Where can I find an example of using IR transmitter?
Or how can i use IR transmitter in TTGO T-Watch-2020 v1 with this library?

Using two I2C buses

Hi. I'm using GPIO25 and GPIO26 (on expansion connector) to comunicate by I2C. I have suceeded but touching the screen was out. I'm using Wire1 on extension communication, on IDE Arduino. What can I do to solve this issue?

Schematics

This is a developer watch.
The best thing would be that the project was open source, both hw and sw.
We can understand that maybe you don't want to provide the pcb project files, but at least the wiring diagram is absolutely necessary.
It is not possible to develop sw for an hw object safely without having at least the schematics

Backlight dims when calling shake()

After calling the shake() function the backlight dims.
Seems to be similar to #9 is there a way to reset the backlight brightness after using the motor?
To reproduce, replace the function setting_event_cb() in gui.cpp in the SimpleWatch example with

static void setting_event_cb()
{
  TTGOClass *ttgo = TTGOClass::getWatch();
  ttgo->motor_begin();
  ttgo->shake();
  menuBars.hidden(false);
}

No vibration motor control and backlight flicker

Hi there! I've been trying to get the vibration motor to vary its intensity or frequency for more advanced haptic feedback but it doesn't seem as though calling the motor adjust function or altering the frequency in the bl.h file has any effect. I've also noticed that at certain settings turning the motor on will cause the backlight to flicker or turn off completely. Not sure if this is something that can be fixed or whether it is just a limitation of the device, but if anyone has any ideas please let me know! Its a shame as the motor seems relatively powerful and low latency!!

Really Simple Instructions? (A call for help)

Hello, I'm not really a programmer, but I'd like to be.

I'm really new to all this, and have been trying to learn Python. I thought getting this watch would be a fun project, but it appears I underestimated the difficulty. I've tried looking for some instructional help for a beginner like myself, but as yet haven't found much. I really don't want this to become something I abandon out of frustration either.
I would like some help understanding the very basics. I've got the library installed in Arduino IDE, but I haven't been able to see the watch files on my desktop yet, or even how to push updated software to the watch.
I think the watch came pre-loaded with SimpleWatch... and I've tried to tweak things, but so far, I haven't even figured out how to set the time! πŸ˜…
Any help from someone willing to take the little steps with me would be really great. This looks like awesome hardware, and I'd really like to be able to figure out how to use it.

Sound example with noise and motor issue

I test in TTGO T-Watch 2019 with touch screen and motor/speaker/Hearth rate Bottom PCB. The examples with problems is:

1.- PlayMP3FromPROGMEM: continuos vibrating Motor with not sound.
2.- PlayMP3FromSPIFFS: Noise and overheating, probably motor heating.
3.- Play MP3FromSDToDAC: very low sound with noise, not volume control.

I use the TTGO_TWACH_Library in V1.2.0, ESP8266Audio and ESP8266_Spiram downloaded in 17-07-2020. Could you please update the examples or add sound examples for this Bottom PCB?.

Lora sample don't work

HI,
I am trying to compile the lora example using the arduino-LoRa library, the program compiles without errors, but stops when initializing the lora module.
Specifically it stops at the following code block:


int ret = 0;
do {
lv_task_handler();
ret = LoRa.begin(BAND);
delay(500);
} while (!ret);

Any suggestion?

Powering Modules and Proofreading simple App

Out of all the examples given, SimpleWatch is the most complex. One segment of code that really caught my attention is the following:

// Turn off unused power
    ttgo->power->setPowerOutPut(AXP202_EXTEN, AXP202_OFF);
    ttgo->power->setPowerOutPut(AXP202_DCDC2, AXP202_OFF);
    ttgo->power->setPowerOutPut(AXP202_LDO3, AXP202_OFF);
    ttgo->power->setPowerOutPut(AXP202_LDO4, AXP202_OFF);

What exactly do each of these AXP registers power? If I'm not going to use a certain module from the watch, is there a way of finding out which AXP register to disable?

Secondly, I want to write a sketch so that the watch will vibrate every 2, 3, or 5 minutes that is cycled everytime you push the button.

void setup() {
	Serial.begin(115200);

	ttgo = TTGoClass::getWatch();
	ttgo->begin();
	ttgo->openBL();

	pinMode(RTC_INT, INPUT_PULLUP);
    attachInterrupt(RTC_INT, [] {
        rtcIrq = 1;
    }, FALLING);

    ttgo->rtc->disableAlarm();
    ttimes_len = sizeof(ttimes)/sizeof(ttimes[0]);

    ttgo->tft->fillScreen(TFT_BLACK);
    ttgo->tft->setTextColor(TFT_WHITE, TFT_BLACK);
    ttgo->tft->setTextFont(4);
    ttgo->tft->drawString("Timer is OFF", MESSAGE_X, MESSAGE_Y);

    ttgo->button->setClickedHandler(clicked);
}

void loop() {
	if (rtcIrq) {
		vibrate();
	}
	ttgo->button->loop();
	if (millis() - millis_click > DISPLAY_CD) {
		ttgo->displaySleep();
	}
	delay(50);
}

The clicked handler wakes and updates the display, clears and resets the timer, and removes the interrupt request. I'd like to know that this code is correct and stable, because I've never done embedded systems before and I don't want to break the thing using bad software. There's also very little documentation so I had to look through a lot of the drivers and datasheets of the chips. I just want to make sure I know what I'm doing. Thanks.

USB-C to USB-C cable not working

When I connect my T-Watch with an USB-C to USB-C cable on my MacBook Pro 2018, it does not work. But when I connect an USB-C to USB-A adapter in my MacBook. And use an USB-A to USB-C cable, it works. I already tried different USB-C cables.

Is this a hardware or software issue ?

S7G firmware

I see you have kindly put up the firmware for the V1.6 board, but I could only buy the V1.3 board.
Do you have the firmware for V1.3 so I can restore the software if my experiments all go wrong? Thank you.

Rendering issues when switching image source

Howdy,

I created a small mario bros animation where the character jumps at regular interval. See the following video:
smb

As you can see in the video, from time to time, the image gets dirty and white pixels are rendered around the character.
Any idea why this is happening?
The code for rendering mario can be found here: https://github.com/wizche/ttgo-smb/blob/75df0a7e8fb3011f1353eb3817e7397935f53be9/src/mario.cpp#L14

Another question, since I set background transparency on the main screen object (see here), why do I need to apply it again to all the container added to the scene? Shouldn't be inherited?

Thanks a lot!

Compilation Errors

Trying to compile all this code runs into many errors, does anyone have a version that compiles?

thanks

Free Pins for SD

As there are no schematics available of T-watch2020, which SoC pins can be used for a uSD wiring?

SimpleWatch crashes with Guru Meditation Error: Core 1 panic'ed (InstrFetchProhibited). Exception was unhandled.

SimpleWatch has worked previously and I haven't changed any code. When I compile and upload it says upload complete and screen remains dark. Opening the serial monitor reveals this. What's going wrong?

Guru Meditation Error: Core 1 panic'ed (InstrFetchProhibited). Exception was unhandled.
Core 1 register dump:
PC : 0xfefefefe PS : 0x00060f30 A0 : 0x800d6e14 A1 : 0x3ffb1e70
A2 : 0x00000053 A3 : 0x3ffb1edd A4 : 0x00000001 A5 : 0x3ffb86ec
A6 : 0x00000000 A7 : 0xffffff01 A8 : 0x80166ef0 A9 : 0x00000053
A10 : 0x000000fe A11 : 0x00000053 A12 : 0x3ffb1edd A13 : 0x00000001
A14 : 0x00000051 A15 : 0x00000000 SAR : 0x00000001 EXCCAUSE: 0x00000014
EXCVADDR: 0xfefefefc LBEG : 0x4000c46c LEND : 0x4000c477 LCOUNT : 0x00000000

Backtrace: 0x7efefefe:0x3ffb1e70 0x400d6e11:0x3ffb1e90 0x400d71e5:0x3ffb1ed0 0x400d6b48:0x3ffb1f00 0x400d1edb:0x3ffb1f30 0x400fa5e3:0x3ffb1fb0 0x4008d3cd:0x3ffb1fd0

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:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1044
load:0x40078000,len:8896
load:0x40080400,len:5816
entry 0x400806ac

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.