Skip to content

Instantly share code, notes, and snippets.

@DenisFromHR
DenisFromHR / RPi_I2C_driver.py
Last active December 1, 2023 21:05
RaspberryPi I2C LCD Python stuff
# -*- coding: utf-8 -*-
"""
Compiled, mashed and generally mutilated 2014-2015 by Denis Pleic
Made available under GNU GENERAL PUBLIC LICENSE
# Modified Python I2C library for Raspberry Pi
# as found on http://www.recantha.co.uk/blog/?p=4849
# Joined existing 'i2c_lib.py' and 'lcddriver.py' into a single library
# added bits and pieces from various sources
# By DenisFromHR (Denis Pleic)
{
"device":"flo",
"updates":[
{
"name":"pa_flo-4.0-BETA6-20131222.zip",
"version":4020131222,
"size":"148.8 MiB",
"url":"http://download.paranoidandroid.co/roms/flo/pa_flo-4.0-BETA-20131222.zip",
"md5":"9156b442f7ca4aeb894c58a20d56a24f",
"delta":{
@klovadis
klovadis / gist:2549029
Created April 29, 2012 09:35
Short circuit function chains if an error occurs
var fs = require('fs');
// read a file
function read_the_file(filename, callback) {
// begin by reading a file
fs.readFile(filename, function (err, contents) {
// an error occurred, i.e. the file was not found.
// instead of throwing an error, skip the other