Skip to content

Instantly share code, notes, and snippets.

View sfentress's full-sized avatar

Sam Fentress sfentress

  • Concord Consortium
View GitHub Profile
var doc, env, report, schema;
schema = {
"paneSchema": {
"type": "object",
"properties": {
"height": {
"type": "number"
}
}
schema = {
"properties": {
"topPane": {
"$ref": "paneSchema" // referring directly by a new id, not #/paneSchema
},
"bottomPane": {
"$ref": "paneSchema"
}
},
"paneSchema": {
/*
Fade
This example shows how to fade an LED on pin 9
using the analogWrite() function.
This example code is in the public domain.
*/
int brightness = 0; // how bright the LED is
/*
AnalogReadSerial
Reads an analog input on pin A0, prints the result to the serial monitor
This example code is in the public domain.
*/
int pin = A0;
void setup() {
/*
sfentress: Set up: a piezoelectric or other speaker with one lead on ground and the other on pin D8
*/
/*
Melody
Plays a melody
circuit:
// Sweep
// by BARRAGAN <http://barraganstudio.com>
// This example code is in the public domain.
#include <Servo.h>
Servo myservo; // create servo object to control a servo
// a maximum of eight servo objects can be created
<?xml version="1.0" encoding="UTF-8"?>
<java version="1.6.0_29" class="java.beans.XMLDecoder">
<object id="Element0" class="org.concord.mw2d.models.Element">
<void property="mass">
<double>0.16666666666666666</double>
</void>
<void property="sigma">
<double>7.0</double>
</void>
</object>
$ ./script/gh-pages.sh
remote: Counting objects: 303, done.
remote: Compressing objects: 100% (172/172), done.
remote: Total 248 (delta 182), reused 134 (delta 68)
Receiving objects: 100% (248/248), 41.88 KiB, done.
Resolving deltas: 100% (182/182), completed with 45 local objects.
From github.com:concord-consortium/lab
4b6c277..01d3c22 gh-pages -> origin/gh-pages
b4b018a..10f47ea master -> origin/master
@sfentress
sfentress / dgApi.js
Created May 21, 2012 18:11
Arduino Data
// [KCPT]
// The dgApi object contains everything needed to communicate back to the DG application.
dgApi = {};
// For now we go through 'DG.currGameController.doCommand'.
// Very shortly a development branch will be merged to the trunk
// which simplifies that to 'DG.doCommand'.
dgApi.gameController = window.parent.DG.currGameController;
dgApi.doCommand = dgApi.gameController && dgApi.gameController.doCommand;
@sfentress
sfentress / dgApi.js
Created May 21, 2012 19:41
Arduino Data with Generic dgApi
// [KCPT]
// The dgApi object contains everything needed to communicate back to the DG application.
dgApi = {};
// For now we go through 'DG.currGameController.doCommand'.
// Very shortly a development branch will be merged to the trunk
// which simplifies that to 'DG.doCommand'.
dgApi.gameController = window.parent.DG.currGameController;
dgApi.doCommand = dgApi.gameController && dgApi.gameController.doCommand;