Skip to content

Instantly share code, notes, and snippets.

#define APP_VERSION 1.1
double distance = 0;
double echo = 0;
int ultraSoundSignal = D0; // Ultrasound signal pin
// Elapsed Millis Stuff
unsigned int publishInterval = 2000; // Every 2000 ms (2 seconds)
elapsedMillis timeElapsed; //declare global if you don't want it reset every time loop runs
// -------------------------------------------- //
// Documentation
// ------------------
// -------------------------------------------- //
// Compiler Defines
// ------------------
#define APP_VERSION 1.2 // Keep track of what version this code is
#define NUM_MEASUREMENTS 20 // The number of measurements we want to take befoe averaging and publishing
/*jslint node: true */
"use strict";
// Setup the modules we need to use
var spark = require('spark');
var fs = require('fs');
// Login and start doing things!
spark.on('login', function() {
//Get test event for specific core