Coder Social home page Coder Social logo

area3001anniversarybadgefirmware's Introduction

Area3001AnniversaryBadgeFirmware

Test firmware for the Area3001 anniversary badge.

Content:

installation

  1. Download micropython for ESP32.
    This firmware depends on the espnow feature of ESP. This is not yet available in 1.20.0
    Download a Nightly build untill the espnow feature is in the release version
  2. Flash the firmware to the badge using your favorite tool
    See instructions on the download page
  3. Copy the files inside the sources directory to the root of the ESP filesystem.
    This can be done using Thonny, mpremote or other tools.

How it works

Time synchronization

  1. On startup the ESP will listen for any packet containing a time value inside a JSON document. If such a packet is received within 3 seconds it will synchronize it's time value with the remote ESP.
  2. If no other devices are found it will assume a master role and start transmitting it's own time every second.
  3. if other devices are allready there it can do 2 things.
    a) the other mac is larger: exit master mode, stop broadcasting
    b) there is not higher mac: enter master mode
  4. When the current master stops transmitting for more than 3 seconds all ESP's will enter master mode and broadcast their current time. The ESP with the highest mac address wins and becomes the new master.

Animation

The animation is devided in frames of each 33ms long (30FPS).
A every 33ms a function is called to draw a frame. the id of the frame is calculated by taking the modulus of the current network time devided by 33.
frame_id = (network_time // frame_length) % frame_count

Frame types that are currently implemented:

  • solid color
  • Color wheel. (left or right shifting)

Some ideas of frame types I like to add are: wheel that shifts in time, sparkle, gradient (moving or solid), chase and bounce.
In a future version I might be tempted to add regions that each have their own animaton, however I feel this is a bit overkill for now :)

area3001anniversarybadgefirmware's People

Contributors

melazarus avatar

Watchers

 avatar

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.