Skip to content

Instantly share code, notes, and snippets.

View chaeplin's full-sized avatar

chaeplin chaeplin

View GitHub Profile
@chaeplin
chaeplin / findingnemo.py
Last active January 31, 2019 18:11
find darkcoin address of stratum pool
#!/usr/bin/python
import subprocess
import os
import simplejson
import datetime
import sys
import math
import re
from time import time
@chaeplin
chaeplin / 8x8text.py
Last active August 29, 2015 14:18
Raspberry Pi and Adafruit 8x8 Matrix display / python
#!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
import time
import Image
import ImageDraw
import ImageFont
from Adafruit_LED_Backpack import Matrix8x8
@chaeplin
chaeplin / 01.sensor.py
Created April 13, 2015 06:04
01.sensor.py
#!/usr/bin/env python2.7
import os, sys
import RPi.GPIO as g
from instapush.instapush import Instapush, App
import datetime
import time
#---------
insta = Instapush(user_token='token')
#!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
import io
import sys
import time
import picamera
import picamera.array
import cv2
import numpy as np
@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 / esp8266_wifi_test.ino
Last active September 3, 2015 19:38
esp8266_wifi_test
#include <ESP8266WiFi.h>
//#include <IPAddress.h>
const char* ssid = "wifi_ssid";
const char* password = "wifi_password";
WiFiClient wifiClient;
long startMills;
void setup() {
@chaeplin
chaeplin / hx711test.log
Last active August 29, 2015 14:21
hx711 + esp-12, hx711 + uno/nano
1) hx711 + uno/nano
two reading: 0.692
two reading: 4.272
two reading: 4.260
two reading: 4.584
two reading: 4.688
two reading: 4.616
two reading: 4.702
two reading: 4.685
two reading: 4.689
@chaeplin
chaeplin / Arduino_Record_Long_AirConditioner_Infrared_Signals_10.ino
Last active July 15, 2018 15:48
Arduino_Record_Long_AirConditioner_Infrared_Signals_10
// http://www.analysir.com/blog/2014/03/19/air-conditioners-problems-recording-long-infrared-remote-control-signals-arduino/
// http://www.analysir.com/blog/wp-content/uploads/2014/03/Arduino_Record_Long_AirConditioner_Infrared_Signals_10.txt
// For LG AC
/*
Author: AnalysIR
Revision: 1.0
This code is provided to overcome an issue with Arduino IR libraries
It allows you to capture raw timings for signals longer than 255 marks &amp; spaces.
@chaeplin
chaeplin / sample raw
Last active August 29, 2015 14:25
sample of Arduino_Record_Long_AirConditioner_Infrared_Signals_10 output
// on
Raw: (59) 8000, -4000, 520, -1564, 524, -524, 520, -540, 500, -536, 500, -1592, 500, -528, 520, -532, 520, -548, 500, -532, 520, -548, 500, -532, 520, -548, 500, -532, 520, -552, 496, -540, 500, -524, 520, -1584, 500, -1564, 520, -540, 500, -536, 500, -548, 500, -532, 520, -1600, 500, -540, 500, -1576, 500, -1588, 520, -1576, 500, -540, 500,
// off
Raw: (59) 8000, -4000, 524, -1544, 552, -496, 548, -512, 524, -500, 548, -1556, 528, -520, 524, -500, 548, -520, 528, -1532, 552, -1548, 524, -516, 524, -496, 552, -520, 524, -512, 528, -512, 524, -508, 548, -496, 552, -504, 548, -504, 552, -516, 504, -528, 552, -1572, 500, -536, 504, -1572, 500, -540, 500, -540, 496, -548, 520, -1540, 552,
@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()
{
}