This file contains hidden or 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
| // RFM12B Receiver for RaspberryPI | |
| // | |
| // Basiert zum Teil auf der Arbeit von Nathan Chantrell | |
| // | |
| // modified by meigrafd @ 16.12.2013 - for UART on RaspberryPI | |
| //------------------------------------------------------------------------------ | |
| #include <RFM12B.h> | |
| #include <avr/sleep.h> | |
| #include <SoftwareSerial.h> | |
| //------------------------------------------------------------------------------ |
This file contains hidden or 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
| #include "FastLED.h" | |
| // How many leds in your strip? | |
| #define NUM_LEDS 248 | |
| // For led chips like Neopixels, which have a data line, ground, and power, you just | |
| // need to define DATA_PIN. For led chipsets that are SPI based (four wires - data, clock, | |
| // ground, and power), like the LPD8806 define both DATA_PIN and CLOCK_PIN | |
| #define DATA_PIN 5 | |
| //#define CLOCK_PIN 13 |
This file contains hidden or 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
| #include <Wire.h> | |
| #define SLAVE_ADDRESS 0x04 | |
| #define FLOATS_SENT 3 | |
| float data[FLOATS_SENT]; | |
| void setup() { | |
| pinMode(13, OUTPUT); | |
| Serial.begin(9600); // start serial for output |
This file contains hidden or 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
| // | |
| // Produce a formatted string in a buffer corresponding to the value provided. | |
| // If the 'width' parameter is non-zero, the value will be padded with leading | |
| // zeroes to achieve the specified width. The number of characters added to | |
| // the buffer (not including the null termination) is returned. | |
| // | |
| unsigned | |
| fmtUnsigned(unsigned long val, char *buf, unsigned bufLen, byte width) | |
| { |
This file contains hidden or 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
| /* | |
| * alarmsystem.ino | |
| * | |
| * This sketch uses the ESP8266WiFi library | |
| */ | |
| #include <TimeLib.h> | |
| #include <Time.h> | |
| #include <TimeAlarms.h> | |
| #include <ESP8266WiFi.h> |
This file contains hidden or 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 io = require('/usr/local/lib/node_modules/socket.io/node_modules/socket.io-client'); | |
| var mqtt = require('/usr/local/lib/node_modules/mqtt'); | |
| var mqttClient = mqtt.connect('mqtt://mqtt.server.ip', { | |
| username: 'user', | |
| password: 'password', | |
| rejectUnauthorized: false | |
| }); | |
| var host = 'pimatichost'; | |
| var port = 1607; //pimatic port | |
| var u = encodeURIComponent('user'); //pimatic username |
This file contains hidden or 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
| #! /bin/sh | |
| ### BEGIN INIT INFO | |
| # Provides: mosquitto | |
| # Required-Start: $remote_fs $syslog | |
| # Required-Stop: $remote_fs $syslog | |
| # Default-Start: 2 3 4 5 | |
| # Default-Stop: 0 1 6 | |
| # Short-Description: mosquitto MQTT v3.1 message broker | |
| # Description: |
This file contains hidden or 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
| #! /bin/sh | |
| # Starts and stops Node-RED | |
| # /etc/init.d/nodered | |
| ### BEGIN INIT INFO | |
| # Provides: node-red | |
| # Required-Start: $syslog | |
| # Required-Stop: $syslog | |
| # Default-Start: 2 3 4 5 | |
| # Default-Stop: 0 1 6 | |
| # Short-Description: Node-RED initialisation |
This file contains hidden or 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
| /* | |
| PROJECT: MySensors / LiON charger board | |
| PROGRAMMER: AWI | |
| DATE: 28 april 2015/ last update: 11 may 2015 / BH1750 added: 5 September 2015 | |
| FILE: MS_Solar_2.ino | |
| LICENSE: Public domain | |
| Hardware: Ceech - ATmega328p board w/ ESP8266 and NRF24l01+ socket LTC4067 lithium battery charger | |
| and MySensors 1.4 |
This file contains hidden or 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
| git clone --branch 2.2.7 https://github.com/phpredis/phpredis | |
| cd phpredis | |
| cat php_redis.h | grep VERSION | |
| phpize | |
| ./configure | |
| sudo make | |
| sudo make install |