Skip to content

Instantly share code, notes, and snippets.

View DHT.ino
#include "DHT.h"
#define DHTPIN 2
#define DHTTYPE DHT22
DHT dht(DHTPIN, DHTTYPE);
void setup(void) {
Serial.begin(9600);
dht.begin();
View serial_nodered.json
[
{
"id":"64325772.978db8",
"type":"serial in",
"z":"18eb1548.cf005b",
"name":"",
"serial":"cd679ecd.7f72f",
"x":160,
"y":140,
"wires":[
View setTimer.py
class setTimer(object):
def __init__(self, say, keyword):
self.say = say
self.keyword = keyword
def to_number(self, number_string):
number = {'one':1,
'two':2,
'three':3,
View playRadio.py
# =========================================
# Makers! Implement your own actions here.
# =========================================
class playRadio(object):
def __init__(self, say, keyword):
self.say = say
self.keyword = keyword
@ktinkerer
ktinkerer / connect.lua
Created Mar 9, 2017
Connecting NodeMCU to wifi using enduser setup.
View connect.lua
-- file: connect.lua
local module = {}
function module.start()
enduser_setup.start(
function()
print("Connected to wifi as: " .. wifi.sta.getip())
end,
function(err, str)
print("enduser_setup: Err #" .. err .. ": " .. str)
View socket_nodered.json
[
{
"id":"34541282.b27bae",
"type":"exec",
"z":"950c840e.c0af58",
"command":"sudo /home/pi/raspberry-strogonanoff/src/strogonanoff_sender.py --channel 1 --button 1 --gpio 0 on",
"addpay":false,
"append":"",
"useSpawn":"",
"timer":"",
@ktinkerer
ktinkerer / sunIFTTT.json
Created Mar 4, 2016
Sun events to IFTTT Node-RED example
View sunIFTTT.json
[
{
"id":"988f87a9.677078",
"type":"sun events",
"z":"371c357.fc8e3ca",
"testmode":true,
"verbose":false,
"topic":"Sun",
"name":"Sun",
"x":114.21900939941406,
You can’t perform that action at this time.