This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'socket' | |
# 3 colors by 30 pixels by 16 pixels + 4 bytes of checksum (which is never checked) = 1924 byts | |
frame = (1..1924).map{|x|"\xFF"} * "" | |
u1 = UDPSocket.new | |
u1.send a, 0, "matelight", 1337 | |
# For the emulator use: | |
u1.send a, 0, "127.0.0.1", 1337 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python2.7 | |
# -*- coding: utf-8 -*- | |
import socket | |
import colorsys # for HSV-to-RGB-conversion | |
UDP_IP = "10.0.0.200" | |
UDP_PORT = 1337 | |
ROWS = 16 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import os, sys | |
import xml.etree.ElementTree as ET | |
tree = ET.parse("filename.kml") | |
places = list(tree.iter('{http://earth.google.com/kml/2.0}Placemark')) | |
print '"name", "longitude", "latidude", "elevation"' |
NewerOlder