Skip to content

Instantly share code, notes, and snippets.

View cosmopaco's full-sized avatar

Francisco Cosmo cosmopaco

View GitHub Profile
@GeorgeDewar
GeorgeDewar / gist:11171561
Created April 22, 2014 09:21
Checksum calculation example for IR codes of a Fujitsu heat pump (remote AR-RAH1E)
# Sample data
data = []
data[0] = '00101000110001100000000000001000 00001000011111111001000000001100 00001101100000001000000000000000 00000000000000000000010001111111'
data[1] = '00101000110001100000000000001000 00001000011111111001000000001100 00000011100000001000000000000000 00000000000000000000010001110111'
data[2] = '00101000110001100000000000001000 00001000011111111001000000001100 00001101100011001000000000000000 00001011111110010000010011111010'
data[3] = '00101000110001100000000000001000 00001000011111111001000000001100 00001101100000001000100000000000 00000000000000000000010001110111'
data[4] = '00101000110001100000000000001000 00001000011111111001000000001100 00001101000000000000100000000000 00000000000000000000010000001111'
# Checksum function
@jeje
jeje / DS3231.cpp
Created March 12, 2012 10:53
Modified DS3231 library for compatibility with Arduino 1.0
// DS3231 Class is by Seeed Technology Inc(http://www.seeedstudio.com) and used
// in Seeeduino Stalker v2.1 for battery management(MCU power saving mode)
// & to generate timestamp for data logging. DateTime Class is a modified
// version supporting day-of-week.
// Original DateTime Class and its utility code is by Jean-Claude Wippler at JeeLabs
// http://jeelabs.net/projects/cafe/wiki/RTClib
// Released under MIT License http://opensource.org/licenses/mit-license.php
#include <Wire.h>