All Projects → newrelic → futurestack14_badge

newrelic / futurestack14_badge

Licence: MIT license
Source code for the badges from New Relic's FutureStack 2014 conference

Programming Languages

Squirrel
32 projects
ruby
36898 projects - #4 most used programming language

Archived header

FutureStack 14 Badge Firmware

This firmware will turn your FutureStack badge into a simple NFC tag reader and screen target. To get started, register an account with http://electricimp.com, BlinkUp your badge using the Electric Imp Android or iOS mobile app, and create a new model using the IDE containing the code in device.nut and agent.nut. Hit "Build and Run" and your badge should be ready to go. Additionally, you can use robot.rb to push an image to your badge. Just make sure to edit it with your agent URL.

Tips for getting started

  • If you're using an Android phone, you may have better luck using the "legacy mode" during the BlinkUp process.
  • The main runloop of the device firmware can be found at the very bottom of the file here.
  • The device code is a little lengthy due to the number of driver classes. Use code collapsing to make the file a bit more navigable.
  • When blinking the badge up, you'll need to hold your phone over the phototransistor labeled Q1: phototransistor
  • Electric Imp has an excellent guide on the BlinkUp process here.
  • The badge's WiFi radio will only work on 2.4GHz networks.
  • See this troubleshooting guide if you're having issues getting the badge online.

Other resources

Electric Imp

To explore more about Electric Imp, check out their dev center here. If you want to use your Imp in your own hardware project, check out this page to find a breakout board.

E-Paper Screen

The e-paper screen on your badge is made by Pervasive Displays. You can find more information on the generation 2 2.7" display here.

NXP NFC Controller

The NFC chip on the badges is an NXP PN532. You can find the datasheet here. The user manual (a bit higher level) is here and an application note is here. With these datasheets, you'll be able to tailor the NFC chip's behavior to your heart's content.

Flash Memory

Details on the flash memory chip on the badges can be found here.

IO Expander

Since the Imp is a little short on pins, the badge includes a handy IO expander (datasheet). The unused pins of the IO expander are broken out on the side of the PCB. The interrupt line of this chip is connected to pin 1 of the Imp, which can be used for waking interrupts.

Power

Your badge is rechargeable via the micro USB port on the side. It does not need to be on to charge. The 850mAh lithium polymer battery (datasheet) is protected by an over/under charge and short protection circuit (datasheet).

Pushing an Image to Your Badge

You can use robot.rb to push an image to your badge. You'll need to edit the AGENT_URL variable with your Electric Imp agent URL.

robot.rb requires that the ImageMagick libraries are installed.

  • On Ubuntu: $ sudo apt-get install libmagickwand-dev
  • On CentOS: $ yum install ImageMagick-devel
  • On Mac, you can use Homebrew: $ brew install imagemagick

To install the gems needed for robot.rb:

    $ gem install rmagick
    $ gem install httparty

You can push the robot.png image to your badge with the command: $ ruby robot.rb

If you want to use your own image, replace robot.png with your own black and white image. The e-ink screen of the badge is 264 x 176, so your image should fit within those dimensions.

Contributions

Contributions are more than welcome. Bug reports with specific reproduction steps are great. If you have a code contribution you'd like to make, open a pull request with suggested code.

Pull requests should:

  • Clearly state their intent in the title
  • Have a description that explains the need for the changes

By contributing to this project you agree that you are granting New Relic a non-exclusive, non-revokable, no-cost license to use the code, algorithms, patents, and ideas in that code in our products if we so choose. You also agree the code is provided as-is and you provide no warranties as to its fitness or correctness for any purpose.

License

Portions of this code used with permission from Javier Montaner.

Copyright (c) 2014 New Relic, Inc. See the LICENSE file for license rights and limitations (MIT).

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].