attiny-common
A common library for Tessel's ATTiny based modules
Last updated 3 years ago by hipsterbrown .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install attiny-common 
SYNC missed versions from official npm registry.

Attiny-common

This library is designed to encapsulate all of the shared behavior of Tessel's attiny-attx4 and ir-attx4 libraries. They share much of the same hardware design so most of the non-domain specific logic can be abstracted out. These features include:

  • Initilization
  • Firmware Updating
  • CRC Checking
  • SPI Transmissions
  • IRQ Handling

Install

npm install attiny-common

Usage

var Attiny = require('attiny-common');

// Create a new tiny agent
var attiny = new Attiny(hardware);

// Store our firmware checking and updating options
var firmwareOptions = {
  firmwareFile : FIRMWARE_FILE,
  firmwareVersion : FIRMWARE_VERSION,
  moduleID : MODULE_ID,
  signature : TINY84_SIGNATURE,
  crc : (CRC_HIGH << 8) | CRC_LOW,
}

// Initialize (check firmware version, update as necessary)
attiny.initialize(firmwareOptions, function(err) {
  console.log('done initializing module!');

  attiny.setIRQCallback(irqHit);
});

function irqHit() {
  console.log("IRQ is active");
}

Current Tags

  • 0.1.1                                ...           latest (3 years ago)

12 Versions

  • 0.1.1                                ...           3 years ago
  • 0.1.0                                ...           4 years ago
  • 0.0.11                                ...           4 years ago
  • 0.0.10                                ...           4 years ago
  • 0.0.9                                ...           4 years ago
  • 0.0.8                                ...           5 years ago
  • 0.0.7                                ...           5 years ago
  • 0.0.6                                ...           6 years ago
  • 0.0.5                                ...           6 years ago
  • 0.0.3                                ...           6 years ago
  • 0.0.2                                ...           6 years ago
  • 0.0.1                                ...           6 years ago
Downloads
Today 0
This Week 1
This Month 3
Last Day 0
Last Week 2
Last Month 2
Dependencies (2)
Dev Dependencies (2)
Dependents (2)

Copyright 2014 - 2016 © taobao.org |