Skip to content

ac9207/badgie

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

badgie

This is some code for the e-ink badges for the open day that can be adapted to suit.

The badges have three modes, as follows -

  • mode a (button A) - this mode cycles through 3 types of display at random -
    • BOFH - quotes from the BOFH series stored in texts/bofh-excuses.txt
    • images - files in the images directory
    • epigrams - witty(for a given value of witty) sayings stored in texts/epigrams.txt
  • mode b (button B) - this mode just displays the persons name, role and School alongside a QR code or the Coventry Pheonix
  • mode c (button C) - this mode displays either the same as the QR version of mode b, or the persons name plus a message which comes from texts/mess.txt

For modes a and c, the image will change after a certain number of seconds (defined by speed * SPEED_MULTIPLIER)

The up and down buttons will either toggle between the QR code and the Pheonix (mode b) or change the value of speed and hence how quickly the badge displays something new (modes a and c)

Getting started

  1. Follow the instructions on the pimoroni badger page to get the environment set up.
  2. Copy these files to the badge-
    • badgie.py
    • battery.pi
    • boot.py
    • main.py
    • simplybadge.py
    • pheonix.bin
    • qr.bin
    • person.txt
  3. Create the following directories on the top level of the badge -
    • images
    • texts
  4. Copy the files in the images directory on the computer to the images directory on the badge
  5. Copy the files in the texts directory on the computer to the texts directory on the badge
  6. Run main.py to test to make sure everything is working.

Configuring the badge

The main things that you'll want to configure is your name, etc. and this is stored in the file person.txt. This file is four lines long, with the following structure, each on it's own line -

  • Your name
  • First line of the School name
  • Second line of the School name
  • Your role

You'll probably also want to create your own QR code. Whilest you can put a VCARD in a QR code, the chances of it displaying properly on the badge are remote. The best thing to do is to link the QR code to an online VCARD or a website with your contact details (e.g. your Pure profile) and code the URL of that site into the QR code. To do this -

  1. edit the file vCard-QR.py and generate the QR code (this should be done on the PC, not on the badge)

  2. Open the file generated (qr.png) in your favourite image editor (e.g. Gimp) and

    • reduce the image to 1 bit
    • scale the image to 104x104
    • enlarge the canvas (NOT the image) to 104x128 and centre the image on the canvas
    • save that image
  3. Run the convert.py programme (on your PC) with the image -

     convert.py --binary qr.png
    
  4. Upload the resultant file, qr.bin to the top level of the badge (do NOT load it into the images directory)

Other files

  • battery.py - gives the current state of the battery
  • conway.py - Conway's game of life from the Badger demos
  • simplebadge.py - a static badge which is the QR version of mode b. This saves the battery going down, so it's a good "sleep" type mode.

About

Cov Uni e-ink badges

Resources

Stars

Watchers

Forks

Releases

No releases published

Languages