Giter Site home page Giter Site logo

badger-driver's Introduction

Library

This is a Python module that can drive BADGEr through a PagePrint object.

import BADGEr
pp = BADGEr.PagePrint('/dev/tty.usbserial-A5047MW8')
pp.println('Hello World')
pp.println('Line 7, highlighted',7,True)
pp.fflush()

The constructor connects to the TTY device and lines are printed using the println function. Optional arguments to this function are the line number and a highlight flag. If the highlight flag is set, the line will be printed in negative (white text and black background).

Each println caches a line on a page but BADGEr does not display the content until the fflush function is called. This will toggle BADGEr's pixels and display the new page.

How to Use

First, we need to prepare BADGEr,

  • Copy the files in Receiver/sdcard to the root of BADGEr's SD Card.
  • Add Wyolum's eReader library to your Arduino enviornment: http://wyolum.com/wyolum-ereader-library/
  • Load Receiver/BADGEr_Display.ino onto BADGEr. Note, I've had to use Arduino 1.0.5 for this.

Then, we can use the driver.

  • Include the Sender/BADGEr module in your Python project.

Timing

The println and fflush functions have a 0.5s and 2s delay respectively.

Credits

I'd like to recognize a blog post by www.jeremyblum.com

badger-driver's People

Contributors

jegentile avatar

Watchers

James Cloos avatar  avatar

Forkers

cribstone

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.