Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Making stuff

Andreas atchoo78

💭
Making stuff
View GitHub Profile
@atchoo78
atchoo78 / ledAlert.py
Last active Dec 16, 2017
Display current iTunes Track on LED display (max7219 or compatible Dot Matrix LED) connected to Raspberry PI/Arduino.
View ledAlert.py
# -*- coding: utf-8 -*-
#!/usr/bin/env python
# server side script for Raspberry PI
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
import re
import argparse
import time
# Luma.LED_Matrix drivers & library is © 2017 Richard Hull
@atchoo78
atchoo78 / Arduino_Yun_LCD_I2C-test.ino
Last active Jun 5, 2020
LiquidCrystal I2C - LCD display on Arduino Yún
View Arduino_Yun_LCD_I2C-test.ino
// Note: Connect SCL and SDA from the LCD to SCL & SDA on the Yun (closest to the ethernet port).
// You can also use digital 2 and 3, but I won't recommend it if you want a reliable serial port connection.
// In general: 16 chars, 2 or 4 lines of text: 0x27
// 20 chars, 4 lines of text: 0x3F
#include <LiquidCrystal_I2C.h>
#include <Wire.h>
LiquidCrystal_I2C lcd(0x27, 16, 2);
@atchoo78
atchoo78 / Arduino_Uno_LCD-I2c_test.ino
Last active Jun 5, 2020
LiquidCrystal I2C - LCD display test on Arduino Uno
View Arduino_Uno_LCD-I2c_test.ino
// Note: I recommend connecting SCL and SDA from the LCD to Analog 4 & 5 on the Uno.
// You can also use the SCL and SDA ports (near the USB).
// In general: 16 chars, 2 or 4 lines of text: 0x27
// 20 chars, 4 lines of text: 0x3F
// But remember that most of these i2c adapters are addressable
#include <LiquidCrystal_I2C.h>
#include <Wire.h>
LiquidCrystal_I2C lcd(0x27, 16, 2);
@atchoo78
atchoo78 / Example_sensor_data.json
Last active Jun 26, 2020
HTTP server on Raspberry Pi providing data from 5 different temperature & humidity sensors. Run "pip3 install -r requirements.txt" first.
View Example_sensor_data.json
[
{
"id": 1,
"name": "DS18B20",
"model": "ds18b20",
"battery": 254,
"deviceType": "0000000D-0001-1000-2005-ACCA54000000",
"uuid": "0000000D-0001-1000-2005-ACCA54000000",
"data": [
{
@atchoo78
atchoo78 / RPi_I2C_driver.py
Last active Jun 29, 2020 — forked from DenisFromHR/RPi_I2C_driver.py
RaspberryPi I2C LCD Python stuff
View RPi_I2C_driver.py
# -*- 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)
# 2015-02-10, ver 0.1
@atchoo78
atchoo78 / lifxScenes.py
Created Aug 17, 2020
LIFX Cloud Scenes CLI - Python 3
View lifxScenes.py
#!/usr/bin/env python3
# Get API key/token: https://cloud.lifx.com/settings
# PIFX python library: https://github.com/cydrobolt/pifx
from pifx import PIFX
import pifx
import sys
import subprocess
API_KEY = '<PASTE API TOKEN HERE>'