This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// CmdMessenger library (included in local libraries folder) | |
// Origin: https://github.com/dreamcat4/cmdmessenger | |
#include "CmdMessenger.h" | |
// Streaming4 library (included in local libraries folder) | |
// Origin: http://arduiniana.org/libraries/streaming/ | |
#include "Streaming.h" | |
// Mustnt conflict / collide with our message payload data. | |
char field_separator = ','; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ------------------ M A I N ( ) -------------------------------------------- | |
// Timeout handling | |
long timeoutInterval = 2000; // 2 seconds | |
long previousMillis = 0; | |
int counter = 0; | |
void timeout() | |
{ | |
// add code in here you want to | |
// execute every timeoutInterval seconds |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// CmdMessenger library (included in local libraries folder) | |
// Origin: https://github.com/dreamcat4/cmdmessenger | |
#include "CmdMessenger.h" | |
// Streaming4 library (included in local libraries folder) | |
// Origin: http://arduiniana.org/libraries/streaming/ | |
#include "Streaming.h" | |
// Mustnt conflict / collide with our message payload data. Fine if we use base64 library ^^ above | |
char field_separator = ','; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// __________________ FUNCTION DECLARATIONS _________________________________ | |
void led_on(); | |
void led_off(); | |
void readDataOnce(); | |
char * readSensors(); | |
messengerCallbackFunction messengerCallbacks[] = | |
{ | |
led_on, // 004 | |
led_off, // 005 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<s:Module xmlns:fx="http://ns.adobe.com/mxml/2009" | |
xmlns:s="library://ns.adobe.com/flex/spark" | |
xmlns:mx="library://ns.adobe.com/flex/mx" | |
xmlns:swiz="http://swiz.swizframework.org" | |
backgroundColor="#bdcdf4" | |
width="100%" height="100%" > | |
<fx:Script> | |
<![CDATA[ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[EventHandler(event="BluetoothTxRxEvent.RX", properties="data")] | |
public function receive(data:String):void { | |
// parse the message and do something with it | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<s:Module xmlns:fx="http://ns.adobe.com/mxml/2009" | |
xmlns:s="library://ns.adobe.com/flex/spark" | |
xmlns:mx="library://ns.adobe.com/flex/mx" | |
xmlns:swiz="http://swiz.swizframework.org" | |
backgroundColor="#bdcdf4" | |
width="100%" height="100%" > | |
<fx:Script> | |
<![CDATA[ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body { | |
background-color:white; font-size:90%; | |
/*background-image:url(../images/dynamicAnchorBg.jpg); */ | |
background-image:url(http://colourlovers.com.s3.amazonaws.com/images/patterns/222/222733.png?1221244242); | |
font-family:Helvetica; | |
height: 100%; | |
} | |
#editorCanvas { | |
position: absolute; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// in models/user.js | |
var mongoose = require('mongoose'); | |
var Schema = mongoose.Schema | |
, ObjectId = mongoose.SchemaTypes.ObjectId | |
// example model | |
var UserSchema = new Schema({ | |
email: { type: String, unique: true, index: true } | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var FooWrapper = (function() { | |
// private module scope, shared among all Foo instances | |
var _private1 = "private1"; | |
var _private3 = "private3"; | |
var Foo = function(arg1, arg2, arg3) { | |
// private instance var, only visible to privileged methods |
OlderNewer