View DS3231 bus change
This file contains 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
## For raspberry pi Model B | |
## edit DS3231.py | |
### was (Model A version) | |
class DS3231: | |
def __init__(self): | |
self.ds3231 = Adafruit_I2C(DS3231_I2C_ADDR) | |
### change to new Model B version | |
class DS3231: |
View Alpha5
This file contains 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
/* | |
AlphaClock.ino | |
-- Alpha Clock Five Firmware, version 2.1 -- | |
Version 2.1.0 - January 31, 2013 | |
Copyright (c) 2013 Windell H. Oskay. All right reserved. | |
http://www.evilmadscientist.com/ | |
View firmware_code.ino
This file contains 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
enum CMDTYPE | |
{ | |
SETUP_DATA = 1, | |
PIXEL_DATA = 2, | |
BRIGHTNESS = 3, | |
GETID = 4, | |
SETID = 5, | |
GETVER = 6, | |
GET_NUM_LEDS = 7 | |
}; |
View ULTiM8_ScreenGrab.py
This file contains 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
from pixel_maps import ultim8x8, ultim8x24, ultim8x72, ultim24x24, ultim16x56 | |
from bibliopixel.drivers.serial_driver import DriverSerial, LEDTYPE | |
from bibliopixel import LEDMatrix, log | |
from BiblioPixelAnimations.matrix.ScreenGrab import ScreenGrab | |
log.setLogLevel(log.DEBUG) | |
# pixel_map = ultim8x8 ### ULTiM8x8 | |
# pixel_map = ultim8x24 ### ULTiM8x24 | |
# pixel_map = ultim24x24 ### ULTiM24x24 |
View wmd.ino
This file contains 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
import time | |
from pixel_maps import ultim8x8, ultim8x24, ultim8x72, ultim24x24, ultim16x56 | |
from bibliopixel.drivers.serial_driver import DriverSerial, LEDTYPE | |
from bibliopixel.drivers.visualizer import DriverVisualizer | |
from bibliopixel import LEDMatrix, log, MatrixRotation | |
from BiblioPixelAnimations.matrix.bloom import Bloom | |
ROTATE_0 = MatrixRotation.ROTATE_0 | |
ROTATE_90 = MatrixRotation.ROTATE_90 | |
ROTATE_180 = MatrixRotation.ROTATE_180 |
View WMD.py
This file contains 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
import time | |
from numpy import * | |
import struct | |
import serial | |
PIXEL_DATA = 2 | |
BRIGHTNESS = 3 | |
def msg(s, code, payload): | |
sz = len(payload) |
View led.py
This file contains 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
class updateDriverThread(threading.Thread): | |
... cut | |
def run(self): | |
while not self.stopped(): | |
try: | |
self._wait.wait() | |
self._updating.clear() | |
self._driver._update(self._data) | |
self._data = [] |
View Wolfram_rules.py
This file contains 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
from bibliopixel.animation import BaseMatrixAnim | |
import bibliopixel.colors as colors | |
def getRule(val, n=8): | |
bits = [(val >> i) & 1 for i in range(n)] | |
def f(i): | |
return bits[i] | |
return f | |
def getVal(l): |
View graph.py
This file contains 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
import numpy as np | |
import pylab as pl | |
def check_edges(edges): | |
'''Check that no edge is a loop or that has a multiple edge.''' | |
sorted_edges = [] | |
out = True | |
try: | |
for i, j in edges: | |
assert i != j, "No loop allowed in Graph" |
View ClockIOT.ino
This file contains 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
#include <Time.h> | |
#include <Wire.h> | |
#include <WiFiManager.h> | |
#include <FastLED.h> | |
#include <PubSubClient.h> | |
#include <EEPROM.h> | |
#include <EEPROMAnything.h> | |
#include <NTPClient.h> | |
#include <WebSocketsServer.h> |
OlderNewer