Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View chaeplin's full-sized avatar

chaeplin chaeplin

View GitHub Profile
@chaeplin
chaeplin / lgac.MD
Last active September 23, 2023 07:00
LG AC

=== decoding for LG A/C ====

=== *** ===

@chaeplin
chaeplin / irsend.sendRaw.ino
Last active September 20, 2023 01:19
IR SEND RAW
// https://github.com/shirriff/Arduino-IRremote
#include <IRremote.h>
IRsend irsend;
void setup()
{
}
@chaeplin
chaeplin / _01.temp_sensor_01.ino
Last active July 18, 2023 16:21
esp8266+dht22+mqtt
// Code based on
// https://github.com/adafruit/DHT-sensor-library/blob/master/examples/DHTtester/DHTtester.ino
// https://gist.github.com/igrr/7f7e7973366fc01d6393
// https://github.com/iot-playground/Arduino/blob/master/ESP8266ArduinoIDE/DS18B20_temperature_sensor/DS18B20_temperature_sensor.ino
// esp8266 + dht22 + mqtt
#include "DHT.h"
#include <PubSubClient.h>
#include <ESP8266WiFi.h>
@chaeplin
chaeplin / mqtt_test.ino
Created November 15, 2015 19:06
mqtt_test.ino
#include <ESP8266WiFi.h>
#include <PubSubClient.h>
#include "/usr/local/src/ap_setting.h"
// Update these with values suitable for your network.
char* topic = "/30/Status/MQTT";
char* subtopic = "inTopic";
@chaeplin
chaeplin / esp8266_fpm_mdem_sleep.ino
Created January 26, 2016 11:39
esp8266_fpm_mdem_sleep.ino
#include <ESP8266WiFi.h>
#include <PubSubClient.h>
#include "/usr/local/src/ap_setting.h"
extern "C" {
#include "user_interface.h"
}
#define FPM_SLEEP_MAX_TIME 0xFFFFFFF
@chaeplin
chaeplin / mqtt-tls.ino
Last active January 10, 2022 01:59
mqtt-tls.ino
#include <ESP8266WiFi.h>
#include <WiFiClientSecure.h>
#include <PubSubClient.h>
#include <ESP8266mDNS.h>
#include <WiFiUdp.h>
#include <ArduinoOTA.h>
#include "/usr/local/src/ap_setting.h"
#define DEBUG_PRINT 1
@chaeplin
chaeplin / WPA2 -EAP-TLS.ino
Last active January 6, 2022 13:50
WPA2 -EAP-TLS.ino
/*
WPA2-ENT EAP-TLS
based on joostd's code : https://github.com/joostd/esp8266-eduroam
https://github.com/joostd/esp8266-eduroam/blob/master/gen_cert.sh
wifi_station_set_cert_key
Function: Set certificate and private key for connecting to WPA2-ENTERPRISE AP.
Note:
• Connecting to WPA2-ENTERPRISE AP needs more than 26 KB memory, please ensure enough space (system_get_free_heap_size).
@chaeplin
chaeplin / dht22_deepsleep.ino
Last active November 10, 2021 22:17
dht22_deepsleep.ino
// CPU 80MHZ, FLASH 4M/1M
/*
*** Sample using esp-01, D16 is connected to RST
*** If DHT22 is powered by a gpio( VCC of DHT22 is connected to a gpio) and OUTPUT of DHT22 is connected to D2, boot will fail.
*** Power off ----> D2 is in LOW( == DHT22 is in LOW) ==> SDIO boot mode.
Temperature and humidity values are each read out the results of the last measurement.
For real-time data that need continuous read twice, we recommend repeatedly to read sensors,
and each read sensor interval is greater than 2 seconds to obtain accuratethe data.
@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>
@chaeplin
chaeplin / Vagrantfile
Created September 7, 2017 14:28 — forked from evianzhow/Vagrantfile
Cross-compile Vagrant box for EdgeRouter
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.provider "virtualbox" do |vb|
vb.memory = "1024"
end
config.vm.provision "shell", inline: <<-SHELL