Skip to content

Instantly share code, notes, and snippets.

View chaeplin's full-sized avatar

chaeplin chaeplin

View GitHub Profile
@chaeplin
chaeplin / esp8266-lgwhisen-slack-bot.ino
Created June 27, 2016 03:49
esp8266-lgwhisen-slack-bot.ino
// 80MHZ NODEMCU V.1
// slackbot testing using https://github.com/urish/arduino-slack-bot
/**
Arduino Real-Time Slack Bot
Copyright (C) 2016, Uri Shaked.
Licensed under the MIT License
*/
@chaeplin
chaeplin / lgacdecode.ino
Created June 24, 2016 13:34
lgacdecode.ino
#include <IRremoteESP8266.h>
//#include <IRremote.h>
int RECV_PIN = 14;
IRrecv irrecv(RECV_PIN);
void setup ( )
{
Serial.begin(115200);
irrecv.enableIRIn();
@chaeplin
chaeplin / ESP.getVcc.ino
Last active June 13, 2016 21:14
ESP.getVcc.ino
extern "C" {
#include "user_interface.h"
}
ADC_MODE(ADC_VCC);
int vdd;
void setup() {
Serial.begin(115200);
@chaeplin
chaeplin / for_kozoke.ino
Created May 29, 2016 06:13
for_kozoke.ino
#include <ESP8266WiFi.h>
#include <ESP8266Ping.h>
#include <PubSubClient.h>
#include <Average.h>
#include <pgmspace.h>
#include <Wire.h>
#include <ESP8266mDNS.h>
#include <WiFiUdp.h>
#include <ArduinoOTA.h>
//#include "/usr/local/src/ap_setting.h" // comment out this line
@chaeplin
chaeplin / readMifare.ino
Last active May 25, 2016 18:43
readMifare.ino
/**************************************************************************/
/*!
This example will wait for any ISO14443A card or tag, and
depending on the size of the UID will attempt to read from it.
If the card has a 4-byte UID it is probably a Mifare
Classic card, and the following steps are taken:
- Authenticate block 4 (the first block of Sector 1) using
the default KEYA of 0XFF 0XFF 0XFF 0XFF 0XFF 0XFF
@chaeplin
chaeplin / attiny85.ino
Created May 17, 2016 11:17
attiny85.ino
/*
* Mushroom driver 1.0
* Author: anilsson of 1069 Design
* Interrupt on digital pin 1
* 10 K resistor on digital pin 1 to GND
*/
#include <avr/sleep.h>
#include <avr/wdt.h>
@chaeplin
chaeplin / video_upload.sh
Created April 24, 2016 06:42 — forked from brndnblck/video_upload.sh
Script for Resumable Media Uploads to Twitter
function video-upload() {
if [ $# -lt 1 ]; then
echo "[ERROR] Missing required file name."
else
FILESIZE=$(wc -c "$1" | awk '{print $1}')
printf "[START] Uploading $FILESIZE bytes.\n"
MEDIAID=$(twurl /1.1/media/upload.json -H upload.twitter.com -d "command=INIT&media_category=amplify_video&media_type=video/mp4&total_bytes=$FILESIZE" | jq .media_id_string | sed 's/\"//g')
INDEX=0
split -b 5m $1 twitter-video-
@chaeplin
chaeplin / WiWi_FTP_Client.ino
Created April 23, 2016 09:16
WiWi_FTP_Client.ino
// File: WiWi_FTP_Client.ino for ESP8266 NodeMCU
/*
Original Arduino: FTP passive client
http://playground.arduino.cc/Code/FTP
Modified 6 June 2015 by SurferTim
You can pass flash-memory based strings to Serial.print() by wrapping them with F().
2015-12-09 Rudolf Reuter, adapted to ESP8266 NodeMCU, with the help of Markus.
*/
@chaeplin
chaeplin / SPIFFShelper.h
Created April 23, 2016 09:12 — forked from sticilface/SPIFFShelper.h
Use SPIFFS like EEPROM
struct spiffs_helper_t {
File f;
spiffs_helper_t(const char * _path ) {
f = SPIFFS.open(_path, "r+"); // try to open if there... for read and write
if (!f) {
f = SPIFFS.open(_path, "w+"); // if fail open for read/write but new
}
};
@chaeplin
chaeplin / esp8266-twitter.ino
Last active October 7, 2021 19:35
esp8266-twitter.ino
// check update : https://github.com/chaeplin/esp8266_and_arduino/tree/master/_56-gopro-control
// based on tweeting_silicon : http://harizanov.com/2015/06/tweeting-silicon/
// https://github.com/igrr/axtls-8266/blob/master/crypto/hmac.c
// http://hardwarefun.com/tutorials/url-encoding-in-arduino
// chaeplin
#include <TimeLib.h>
#include <ESP8266WiFi.h>
#include <WiFiClientSecure.h>
#include <ESP8266HTTPClient.h>