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
[{"id":"3b103181.712cee","type":"tab","label":"Flow 1"},{"id":"31f51798.fbcf78","type":"inject","z":"3b103181.712cee","name":"1s tick","topic":"","payload":"","payloadType":"date","repeat":"1","crontab":"","once":false,"x":161,"y":653,"wires":[["afb09ed3.3b053"]]},{"id":"c9638685.c54e28","type":"arduino out","z":"3b103181.712cee","name":"","pin":"9","state":"OUTPUT","arduino":"bbed5737.2789a8","x":664.5,"y":701,"wires":[]},{"id":"ff197310.fad94","type":"function","z":"3b103181.712cee","name":"Toggle output on input","func":"\n// If it does exist make it the inverse of what it was or else initialise it to false\n// (context variables persist between calls to the function)\ncontext.level = !context.level || false;\n\n// set the payload to the level and return\nmsg.payload = context.level;\nreturn msg;","outputs":1,"noerr":0,"x":369,"y":653,"wires":[["c9638685.c54e28"]]},{"id":"55a8abbd.d25d14","type":"debug","z":"3b103181.712cee","name":"","active":true,"console":"false","complete":"payload","x":667.5,"y":219," |
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
/* | |
IoT Snow Globe | |
Ron Dagdag @rondagdag | |
WiFi Web Server | |
A simple web server that shows the value of the analog input pins. | |
using a WiFi shield. | |
This example is written for a network using WPA encryption. For |
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
/******************************************************************* | |
Arduino Sketch to reorder items via Amazon Dash Service | |
Written by @RonDagDag and Johnathan Hottell | |
Read more at https://www.hackster.io/coffee-drinkers/amazon-drs-promise-never-miss-coffee-break-again-a88584 | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software | |
distributed under the License is distributed on an "AS IS" BASIS, |
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
/******************************************************************* | |
Check out the included Arduino sketches and the getting started | |
guide here! | |
https://github.com/andium/AmazonDRS | |
This is an Arduino implementation of an Amazon Dash Replenishment | |
device. It currently supports the critical API endpoints necessary | |
for registering a device and submitting replenishment requests. This | |
library is tightly coupled to the WiFi101 library, which means it will | |
work great with the Arduino MKR1000, Adafruit Feather MO w/ the ATWINC1500, |
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
// | |
// begin license header | |
// | |
// This code is created by Ron Dagdag | |
// | |
// All source code is provided under the terms of the | |
// GNU General Public License v2 (http://www.gnu.org/licenses/gpl-2.0.html). | |
// Those wishing to use Pixy source code, software and/or | |
// technologies under different licensing terms should contact us at | |
// ron at dagdag dot net. Such licensing terms are available for |
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
//Presses backspace then space every 15 seconds | |
#include <Keyboard.h>; | |
int timeSeconds = 15 ; //Change to change interval | |
const int pin = 0; // input pin for pushbutton | |
int counter = 0; // button push counter | |
void setup() { | |
// make the pushButton pin an input | |
pinMode(pin, INPUT_PULLUP); |
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 socket = require('socket.io-client')('ws://192.168.43.141:3000/'); | |
socket.on('connect', function(){ console.log('connect') }); | |
socket.on('event', function(data){ console.log('event') }); | |
socket.on('disconnect', function(){ console.log('disconnect') }); | |
socket.on('colors', function(colors){ | |
console.log(colors); | |
/*var sum = colors.clear; | |
var r, g, b; | |
r = colors.red; r /= sum; | |
g = colors.green; g /= sum; |
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 tessel = require('tessel'); | |
var rgbLib = require('rgb-tcs34725'); | |
var rgb = rgbLib.use(tessel.port.A); | |
var server = require('http').createServer(); | |
var io = require('socket.io')(server); | |
io.on('connection', function(socket){ | |
console.log('new connection'); | |
socket.on('event', function(data){}); | |
socket.on('disconnect', function(){}); |
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
// Developer: Ron Dagdag | |
// modified from https://github.com/krvarma/Particle-Core-Gesture/blob/master/firmware/gesture.ino | |
// This #include statement was automatically added by the Particle IDE. | |
#define DEBUG | |
#include "SparkFun_APDS9960/SparkFun_APDS9960.h" | |
// Interrupt Pin | |
#define APDS9960_INT D3 | |
char myIpAddress[24]; |
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
/* | |
Developed by Ron Dagdag | |
Email: [email protected] | |
*/ | |
'use strict'; | |
let https = require('https'); | |
//var request = require('request'); | |
// Route the incoming request based on type (LaunchRequest, IntentRequest, | |
// etc.) The JSON body of the request is provided in the event parameter. |
NewerOlder