Skip to content

Latest commit

 

History

History
107 lines (74 loc) · 4.17 KB

README.md

File metadata and controls

107 lines (74 loc) · 4.17 KB

Main

ZeBadge

badgerrpi2040

Droidcon 2023: The time a new badge saw the light of the day, full with delight and android programming capabilities.

Droidcon 2024: Same amazing badge but with better software, extension modules and a splash of AI.

ZeApp

App for configuring static images on your badge from your Android phone. Connect ZeBadge to the phone with a USB cable, select an card to display and hit "Send". Super easy, barely an inconvenience.

You can build ZeApp locally or download the latest build from:

  1. (Coming soon, see #58) Firebase App Distribution
  2. GitHub Release Page

WebApp

Go to ZeOffizialWebSeite If you have a compatiable browser (chrome, edge), great. If not, not so great.

You will see a website with a badge and several text boxes. Please put words and numbers into the boxes and check what happens. Once you are content with the results, attach ZeBadge, press the "sent to badge"-button and observe the magic of a flashing light. After a few seconds the new image is flashed and you can show it off.

This magic happens through WebSerial, a ktor backend, the dithering algorithm from Kotlin and some custom crafted js frontend. Fjoi.

Building WebApp

Build server and pack into one archived jar

./gradlew server:fatJar

copy jar to server

scp zeapp/server/build/libs/server-1.0-SNAPSHOT-standalone.jar myamazingserver:

log into server

ssh myamazingserver

execute jar (jolo)

sudo java -jar *jar 80

The last step started the remote webserver on port 80, with root rights. 🤓

Building the WebApp with Docker

Just run the following docker commands to build and run the server.

docker build -t ze-server -f ./zeapp/Dockerfile ./zeapp
docker run -p 1337:1337 -p 433:433 ze-server:latest

Open the http://localhost:8080/ should display "yes" in the browser.

Droidcon 2024 contribution guide:

If you don't have a badge:

  1. Fork the repo & make write your code.
  2. Use "droidcon/${name}" format for the branch name so we can find it.
  3. When done, open a PR and come to the booth to get you badge.
  4. Open a new PR with some more changes and get one of the extension boards (WiFi module or a keyboard)

If you already have a badge from Droidcon 2023:

  1. Visit GDG booth to get you badge flashed with the newest firmware.
  2. Open a new PR with some more changes and get one of the extension boards (WiFi module or a keyboard)

Getting Started

The following sections are describing the badge in detail, but if you just want to get started, please feel free to follow our Getting Started guide.

Graph

The following diagram shows which parts are involved in this badge:

sequenceDiagram
Alice -->> App: Start
App --> App: Load last configuration
App -->> Alice: Show Bitmaps for A, B, C, U(p), D(down)
App -->> Badge: Connected?
Badge -->> App: Yes!
Alice -->> App: Tab on `update name on badge` button
App -->> Alice: What is your `name` and your contact info?
Alice --> App: `Alice Alicia` and `[email protected]`
App --> App: Layout view with provided info
App --> App: Save view to bitmap
App --> App: Convert bitmap to black and white format understood by badge
App -->> Badge: New `name` page set
Badge --> Badge: Save page
Badge --> Badge: Show page `a` (name)
Alice -->> Badge: Button 'b'
Badge --> Badge: Show sponsor 1 page 
Alice -->> Badge: Button 'c'
Badge --> Badge: Show sponsor 2 page
Alice -->> Badge: Button 'up'
Badge --> Badge: Show user page `u`
Alice -->> Badge: Button 'down'
Badge --> Badge: Show user page `d`
Loading

ZeContributors

Made with contrib.rocks.