Giter VIP home page Giter VIP logo

ttgo-t-wristband's People

Contributors

hpsaturn avatar johnheenan avatar tioruben 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

Watchers

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

ttgo-t-wristband's Issues

Build instructions

Hello,

Can you help me with a detailed step-by-step plan of how to flash this repo on the T-wristband?

Testing battery usage with accelerometer permanently asleep

I have been testing the wristband with the accelerometer permanently asleep and skipped with button press.

The results are very encouraging and makes the wristband much more practical for me.

These are the steps I have taken so far:

Added to build_flags in plarform.ini:
-DIMU_SKIP

After initMPU() in setup() in main.cpp

#ifdef IMU_SKIP
    mpuSleep();
#endif

In showPage() in pages.cpp

  case 3:
#ifndef IMU_SKIP
    max_time_out = 60000;
    pageBearing(initialLoad);
    break;
#else
    page++;
#endif
  case 4:
#ifndef IMU_SKIP
    max_time_out = 30000;
    pageTemperature(initialLoad);
    break;
#else
    page++;
#endif

In handleSleep() of hardware/sleep.cpp

#ifndef IMU_SKIP
  mpuSleep();
#endif

also:

#ifndef IMU_SKIP
  esp_sleep_enable_ext1_wakeup(GPIO_SEL_33 | GPIO_SEL_39, ESP_EXT1_WAKEUP_ANY_HIGH);
#else
  // 39 is from IMU but has label IO38. 33 is from touch capacitor
  esp_sleep_enable_ext1_wakeup(GPIO_SEL_33, ESP_EXT1_WAKEUP_ANY_HIGH);
#endif

For completeness but not required: in handleAction() in pages/pages.cpp:

  case 3:
#ifndef IMU_SKIP
    actionBearing();
#endif
    break;

John Heenan

When wifi connection fails wristband becomes unusable

Whenever I try to connect to an wifi and i cancel the connection the wristband hangs on updating time... And heats up. The only way to stop this is waiting for the battery to discharge or pressing the reset button on the daughter board

Branch available with button press to take IMU into and out of deep sleep

There is a branch available which enables a button press to put the IMU (accelerometer etc) into deep sleep and lower power usage.

When off the watch will not wake up by moving it. There is a discussion of this issue at #5 (comment).

The IMU is toggled on or off by a long press on the battery screen, which used to be used activate OTA. The battery screen also lets you know if the IMU is on or off. The OTA screen can still be used to enable OTA download. The IMU on/off setting is recalled from NVS after wakeup.

When the IMU is turned off two screens are skipped.

The branch is further progress to allow a UTC offset and timezones to be set by button by allowing IMU_SKIP and timezone settings to be set to and recalled from NVS.

The platformio.ino setting -DIMU_SKIP now controls what the initial setting of the IMU is after firmware upload. IMU_SKIP set means leave IMU off by putting into a deep sleep after firmware upload. To force all settings to be reinitialised from firmware settings instead of NVS settings each time with a wake up use -DEEPROM_REINIT. For now this is only relevant to the IMU_SKIP firmware setting.

I am happy to make a PR from the branch, which can be downloaded by:

git clone https://github.com/johnheenan/TTGO-T-Wristband.git
cd TTGO-T-Wristband
git checkout -b origin/poweropts 

Discussions are welcome

John Heenan

Timezone and isDST function problem

The customise the code for different time zones hardcoding is required in two files: wifi/ntp.cpp and hardware/clock.cpp.

In function isDST (for is Daylight Savings Time) the return line:
return previousSunday >= 20;
looks OK for month 3 but not for month 10.

Suggested change:

if (now.month == 3)
    return previousSunday >= 20;
else // now.month can now only be 10 
    return previousSunday < 20;

John Heenan

Entire isDST() function:

bool isDST(RTC_Date now)
{
  uint8_t dayOfWeek = rtc.getDayOfWeek(now.day, now.month, now.year);
  if (now.month < 3 || now.month > 10)
  {
    return false;
  }
  if (now.month > 3 && now.month < 10)
  {
    return true;
  }
  int previousSunday = now.day - dayOfWeek;
  return previousSunday >= 20;
}

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.