Skip to content

Instantly share code, notes, and snippets.

View kgantsov's full-sized avatar
🇺🇦

Kostiantyn Hantsov kgantsov

🇺🇦
  • iconik.io
  • Stockholm, Sweden
View GitHub Profile
@kgantsov
kgantsov / gist:cbdfabf992cf4ee12841
Created August 24, 2014 12:56
Gets temperature from USB Temper, show it by LED lighting of BerryClip on Raspberry Pi and log it into a file.
#!/usr/bin/python
# coding: utf-8
import RPi.GPIO as GPIO
import datetime
import logging
import usb
from temperusb import TemperDevice
@kgantsov
kgantsov / gist:6269126d012254387aa0
Last active August 29, 2015 14:05
Sends morse code messages by Raspberry Pi
#!/usr/bin/python
# coding: utf-8
import argparse
import RPi.GPIO as GPIO
import time
import sys
MORSE_CODE = {
u'A': '.-', u'a': '.-', u'А': '.-', u'а': '.-',