Git Product home page Git Product logo

adafruit-macropad-hotkeys-with-extensions's Introduction

Macropad Hotkeys With Extension Support

This is a modified version of the OG Hotkeys script from Adafruit. This script allows you to define custom functions to override the main loop to create your own functionalities. Currently, this repo includes a Pomodoro timer and a Bongo Cat thingy as extentions.

Included Extensions

Pomodoro Timer (?)

screenshot of pomodoro

/macros/pomodoro.py

Buttons

  • Green - Start a pomodoro session
  • Yellow - Pause/resume a session
  • Red - Skip the current session

Configuring Pomodoro Sessions

You can customize the sessions duration, short break duration, long break duration and the sequence in which they occur by changing the constant variables defined in /macros/pomodoro.py

Notes

  • "Slacking time" displayed after a session is calculated by (time since first open) - (focused time)
  • Code is a bit messy as of now

Bongo Cat

bonogo

/macros/bongo.py

Bongo cat that taps when you tap. Based off of this repo. Dependencies required by bongo cat are included in the /lib directory.

Creating your own extensions

You can use the template given in /macros/sample.py to create your own extensions.

Roadmap

  • Base structure
  • Pomodoro Timer
  • Bongo Cat
  • Track focused time
  • Track slacking time
  • Refactor/clean up Pomodoro timer ๐Ÿงน

adafruit-macropad-hotkeys-with-extensions's People

Contributors

notnavindu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

adafruit-macropad-hotkeys-with-extensions's Issues

Specify adafruit_imageload dependencies

This project inherits the adafruit_imageload dependency from the bongo repo, but doesn't mention it in README.
I'm not sure what best practices are for Adafruit package managed stuff, but it might be good either to include adafruit_imageload in /lib, or at least to link back to the installation instructions for circuitpython-bongo that resolve the dependency.

Cheers, I hope to contribute to this soon. Pomodoro timers are useful.

Crashing with CircuitPython 7.3.3

Hi,
I did a clean fresh install after UF2 nuke of adafruit-circuitpython-adafruit_macropad_rp2040-en_GB-7.3.3
I then installed the contents of this repo and nothing else.
It fails to load any of the bongo or pomodoro macros with a crash.
This is what I get in teh REPL:
Traceback (most recent call last):
File "code.py", line 159, in
File "code.py", line 59, in switch
TypeError: function takes 2 positional arguments but 3 were given

I also get this:
ERROR in bongo.py
Traceback (most recent call last):
File "code.py", line 125, in
File "code.py", line 47, in init
KeyError: custom_data

It seems like you need to add the data argument to the line 73 of pomodoro:
def Pomodoro(data, macropad, encoder_position):

For bongo, just create an empty data and do the same line 109:
def Loop(data, macropad, encoder_position):

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.