Skip to content

Instantly share code, notes, and snippets.

View AnthonyMyatt's full-sized avatar

AnthonyMyatt.Net AnthonyMyatt

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