Giter Club home page Giter Club logo

watch's People

Contributors

seth10 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

watch's Issues

OLED on Trinket

The Trinket has an ATtiny85, which has just 8K of flash and 512 bytes of SRAM. Can we get the Adafruit_SSD1306 library (including the Adafruit-GFX-Library) to run on this little guy?

Save battery by only turning on the 14-segment display when needed

The 4-digit 14-segment alphanumeric display lasts 6 hours at full brightness (default). Lowering it to the minimum brightness lets it last 9 hours. These tests were done with a 105mAh battery. Still a 9 hour watch isn't that useful. To save power, only turn on the screen with a user's input.

Ideas

  1. Put a switch between the battery and trinket. This was my first idea, but without a real-time clock the "watch" wouldn't be able to keep track of how much time has passed.

  2. Turn on the screen for a few seconds when a button is pressed. Even better, because we can control the brightness, I can fade the screen on, pause a few moment, then fade it out. For this idea I would need to unbridge Vcc and Vi2c, leaving Vi2c connected but now connecting Vcc to a pin, say pin 3. There's no reason to ever need to disconnect Vi2c, so leave that connected. Pin 0 and 2 are used for I2C data and clock, so that leaves pins 1, 3 and 4 open. Pins 3 and 4 are used for programming the ATtiny85, but unfortunately we'll have to use one of them. We need two pins: one for [conditionally] powering the display, and one for the button. I wanted to keep these new functions on the other side of the board and noise away from the I2C lines, hence pins 3 and 4, but the trinket pinout page recommends using them for output, if unavoidable. So we'll save pin 1 for the button input and use pin 3 for powering the display. Setting this pin to an OUTPUT and HIGH should end up being no different than if we had just connected it to power.
    Instead of constantly polling the button, we'll use an interrupt to handle it. This video greatly helped me see how to do this with the trinket. This would be great if we could actually even put the Attiny85 to sleep and use the pin change interrupt to wake it up. This would save even more power. We don't need to worry about only listening for the RISING or FALLING edge or debouncing, because (hopefully) this would just make the display stay on for a moment longer before it falls back asleep.
    Waking the processor with a pin change interrupt either resumes execution from where it went to sleep or just calls loop again (need to test it), as seen in the video linked earlier (note ISR (PCINT0_vect) is left empty). So after setting pin 3 to high, we'll probably have to send the .begin command each time we power on the display.

  3. Use a switch to turn on the display. Similar to above, but instead of dealing with all of that added complexity, just put a switch between Vcc and 5V on the trinket. Unfortunately, then the trinket wouldn't be able to know when the display gets turned on. If the display doesn't remember the digits it was last displaying, the trinket would need to constantly be sending I2C data. I'm not sure how much power this would take as I have not tested it. I have also not tested if the display remembers its state when it loses and regains Vcc. Vi2c will remain on, if that makes any difference. I also wouldn't be able to fade in the display with this method.

  4. Same as the previous idea, but use a button. The display would be on as the push button is held. The advantage is that it's a simple button press, the disadvantage is that you have to hold it. However, you wouldn't have to remember to turn it off like the switch. The button has a reasonable, satisfying click, while the switch is quite firm. I would be concerned of it snapping off.

Grey

"I wonder if you can oscillate it fast enough to make greys" @pimlu

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.