Skip to content

Instantly share code, notes, and snippets.

@seco
seco / Energy_Monitor_Real.ino
Created August 10, 2016 23:48 — forked from whatnick/Energy_Monitor_Real.ino
ESP8266 Energy Monitor Real Power
/*
* This sketch sends ads1115 current sensor data via HTTP POST request to thingspeak server.
* It needs the following libraries to work (besides the esp8266 standard libraries supplied with the IDE):
*
* - https://github.com/adafruit/Adafruit_ADS1X15
*
* designed to run directly on esp8266-01 module, to where it can be uploaded using this marvelous piece of software:
*
* https://github.com/esp8266/Arduino
*
@seco
seco / youtube-vimeo-thumbnail.js
Created August 1, 2016 06:01 — forked from micalexander/youtube-vimeo-thumbnail.js
jquery:snippet:Get youtube or vimeo thumbnail url
function get_video_thumb(url, callback){
var id = get_video_id(url);
if (id['type'] == 'y') {
return processYouTube(id);
} else if (id['type'] == 'v') {
$.ajax({
url: 'http://vimeo.com/api/v2/video/' + id['id'] + '.json',
dataType: 'jsonp',
success: function(data) {
@seco
seco / esp8266-dht22-blynk.ino
Created February 14, 2016 10:56 — forked from anoochit/esp8266-dht22-blynk.ino
esp8266-dht22-blynk
/*
* This sketch demonstrates how to scan WiFi networks.
* The API is almost the same as with the WiFi Shield library,
* the most obvious difference being the different file you need to include:
*/
#define BLYNK_PRINT Serial // Comment this out to disable prints and save space
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
#include <SimpleTimer.h>
@seco
seco / ESP8266-nRF24L01.ino
Created November 30, 2015 00:01 — forked from crcastle/ESP8266-nRF24L01.ino
Using an Adafruit Huzzah ESP8266 with nRF24L01+ as a (one-way) internet gateway for several nRF24L01+ sensor nodes
#include <SPI.h>
#include <RF24Network.h>
#include <RF24.h>
#include <ESP8266WiFi.h>
const char* ssid = "ssid";
const char* password = "password";
const char* host = "coolapp.herokuapp.com";
@seco
seco / ESP8266 Code (RX node)
Created November 28, 2015 23:41 — forked from crcastle/ESP8266 Code (RX node)
Trying to use NRF24L01+ on ESP8266, using the ESP8266 as MCU (i.e. not an Arduino or ATmega328). See https://github.com/esp8266/Arduino for details on initial setup of ESP8266 as Arduino-compatible MCU. The serial output below does not show expected messages: a) the full output shows up all at once then stops dead and b) the values for _salt, vo…
#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
#define DEVICE_ID 2
#define CHANNEL 1 //MAX 127
RF24 radio(15, 15); // Set up nRF24L01 radio on SPI bus plus pins 7 & 8
// Topology
const uint64_t pipes[2] = { 0xFFFFFFFFFFLL, 0xCCCCCCCCCCLL };
@seco
seco / boards.txt
Created November 26, 2015 07:40 — forked from andysmithfal/boards.txt
NodeMCU Dev kit v2 for Arduino8266
##############################################################
nodemcuv2.name=NodeMCU Dev Kit 2.0 (ESP8266 ESP-12E Module)
nodemcuv2.upload.tool=esptool
nodemcuv2.upload.speed=115200
nodemcuv2.upload.resetmethod=ck
nodemcuv2.upload.maximum_size=4194304
nodemcuv2.upload.wait_for_upload_port=true
nodemcuv2.serial.disableDTR=true
nodemcuv2.serial.disableRTS=true
@seco
seco / esp8266.ino
Created November 21, 2015 09:26 — forked from xesscorp/esp8266.ino
This program issues commands to an ESP8266 Wifi module in order to receive an HTML page from a website.
///////////////////////////////////////////////////////////////////////////////////////
// This program uses the ESP8266 Wifi module to access a webpage. It's an adaptation of
// the program discussed at http://hackaday.io/project/3072/instructions
// and shown here http://dunarbin.com/esp8266/retroBrowser.ino .
//
// This program was ported to the ZPUino 2.0, a softcore processor that runs on an FPGA
// and emulates an Arduino.
//
// This program works with version 0018000902 of the ESP8266 firmware.
///////////////////////////////////////////////////////////////////////////////////////
@seco
seco / payload.h
Created October 22, 2015 08:17 — forked from rlogiacco/payload.h
Arduino to RaspberryPI communication test with nRF24 chipset and libraries
#ifndef __VIRIDI_NEXU_PAYLOAD__
#define __VIRIDI_NEXU_PAYLOAD__
enum PayloadType {
HERBA, METEO
};
typedef uint8_t vn_payload_type;
typedef uint8_t vn_payload_version;
@seco
seco / nRF24L01p.py
Last active August 29, 2015 14:22 — forked from klalle/nRF24L01p.py
#!/usr/bin/env python3
from quick2wire.spi import *
from quick2wire.gpio import Pin
from quick2wire.gpio import In,Out,pi_header_1
import time
import TCP_Server
PAYLOAD_SIZE = 3
SMALL_PAUSE = 0.05
#include <ESP8266WiFi.h>
const char* ssid = "-----------";
const char* password = "-----------";
// ThingSpeak Settings
char thingSpeakAddress[] = "api.thingspeak.com";
String writeAPIKey = "----------------------";
const int updateThingSpeakInterval = 15 * 1000; // Time interval in milliseconds to update ThingSpeak (number of seconds * 1000 = interval)