Skip to content

Instantly share code, notes, and snippets.

View amcjen's full-sized avatar

Allison Clift-Jennings amcjen

View GitHub Profile
const byte PROGMEM atmega16u2_bootloader [] = {
0x77, 0xC0, 0x00, 0x00, 0x90, 0xC0, 0x00, 0x00, 0x8E, 0xC0, 0x00, 0x00, 0x8C, 0xC0, 0x00, 0x00,
0x8A, 0xC0, 0x00, 0x00, 0x88, 0xC0, 0x00, 0x00, 0x86, 0xC0, 0x00, 0x00, 0x84, 0xC0, 0x00, 0x00,
0x82, 0xC0, 0x00, 0x00, 0x80, 0xC0, 0x00, 0x00, 0x7E, 0xC0, 0x00, 0x00, 0xF9, 0xC3, 0x00, 0x00,
0x9E, 0xC4, 0x00, 0x00, 0x78, 0xC0, 0x00, 0x00, 0x76, 0xC0, 0x00, 0x00, 0x74, 0xC0, 0x00, 0x00,
0x72, 0xC0, 0x00, 0x00, 0x70, 0xC0, 0x00, 0x00, 0x6E, 0xC0, 0x00, 0x00, 0x6C, 0xC0, 0x00, 0x00,
0x6A, 0xC0, 0x00, 0x00, 0x68, 0xC0, 0x00, 0x00, 0x66, 0xC0, 0x00, 0x00, 0xAD, 0xC1, 0x00, 0x00,
0x62, 0xC0, 0x00, 0x00, 0x60, 0xC0, 0x00, 0x00, 0x5E, 0xC0, 0x00, 0x00, 0x5C, 0xC0, 0x00, 0x00,
0x5A, 0xC0, 0x00, 0x00, 0x12, 0x03, 0x50, 0x00, 0x69, 0x00, 0x6E, 0x00, 0x6F, 0x00, 0x63, 0x00,
0x63, 0x00, 0x69, 0x00, 0x6F, 0x00, 0x00, 0x00, 0x12, 0x03, 0x50, 0x00, 0x69, 0x00, 0x6E, 0x00,
Hello from Pinoccio!
(Shell based on Bitlash v2.0 (c) 2014 Bill Roy)
Bootstrap Sketch (rev 2014082001-0-g98ff785)
17724 bytes free
Lead Scout ready
> pin.status
Note: pin.status currently only works on Serial
# name mode value
---------------------------------
0 rx0 reserved -

#2014082001

  • #####Add module support (library-pinoccio, #151) A Module is a class the defines a bunch of functionality that can be dynamically enabled at runtime. The code is already present in Flash, but the relevant setup steps (in particular, big memory allocations) have not been performed and the associated bitlash function are not registered yet until the module is enabled.

Each module should define a single instance of itself (and make its


Hello from Pinoccio!
(Shell based on Bitlash v2.0 (c) 2014 Bill Roy)
Custom Sketch (rev unknown)
17838 bytes free
Field Scout ready
> ls
function on.message.group { if (arg(1) == 8) { led.torch(250); }};
function blinkit { if (led.isoff) { led.on } else { led.off } };
> function on.d2.low { led.red(1000); }
#elif defined(__AVR_ATmega256RFR2__)
inline static void initSS() { pinMode(SS, OUTPUT); };
inline static void setSS() { digitalWrite(SS, LOW); };
inline static void resetSS() { digitalWrite(SS, HIGH); };
#elif defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB162__)
inline static void initSS() { pinMode(SS, OUTPUT); };
inline static void setSS() { digitalWrite(SS, LOW); };
inline static void resetSS() { digitalWrite(SS, HIGH); };
#if defined(__AVR_ATmega256RFR2__)
inline static void initSS() { DDRB |= _BV(0); };
inline static void setSS() { PORTB &= ~_BV(0); };
inline static void resetSS() { PORTB |= _BV(0); };
In file included from /Volumes/Data/Users/eric/Documents/Arduino/libraries/pinoccio/src/Scout.h:17:0,
from PinPip.ino:4:
/Volumes/Data/Users/eric/Documents/Arduino/libraries/pinoccio/src/util/Callback.h:65:1: error: 'constexpr' does not name a type
constexpr Callback<Ret, Args...> build_callback(Ret (*f)(Args...)) {
^
/Volumes/Data/Users/eric/Documents/Arduino/libraries/pinoccio/src/util/Callback.h:65:1: note: C++11 'constexpr' only available with -std=c++11 or -std=gnu++11
bool PinoccioScout::pinWrite(uint8_t pin, uint8_t value) {
if (isPinReserved(pin) || !isOutputPin(pin)) {
return false;
}
if (Scout.isDigitalPin(pin)) {
if (getPinMode(pin) == PWM) {
analogWrite(pin, value);
} else {
digitalWrite(pin, value);
#include <SPI.h>
#include <Wire.h>
#include <Scout.h>
#include <GS.h>
#include <bitlash.h>
#include <lwm.h>
#include <js0n.h>
extern "C" {
#include "key/key.h"
}