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 <Arduino.h> | |
void setup() { | |
pinMode(PB3, OUTPUT); // clk | |
pinMode(PB4, OUTPUT); // latch | |
pinMode(PB5, OUTPUT); // data | |
for (int i = 0; i <= 255; i++) { | |
digitalWrite(PB5, HIGH); | |
digitalWrite(PB3, HIGH); |
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 machine import Pin | |
# Constants | |
COMMAND_MODE = 0x80 | |
WRITE_MODE = 0xA0 | |
BIAS = 0x52 # Bias 1/2, 4 common | |
INT_OSC = 0x30 # Internal RC oscilator | |
SYS_DIS = 0x00 | |
SYS_EN = 0x02 |
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 qrcode | |
import requests | |
import sys | |
import uuid | |
DEVICE_NAME = "TTYcka" | |
BASE_UZIS_URL="https://ocko.uzis.cz/api/v2/" | |
BASE_NIA_URL="https://ocko.uzis.cz/Account/Prihlaseni" | |
AUTH_ENDPOINT="auth/login" | |
PERSON_ENDPOINT="person" |
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
""" | |
Simple brainfuck interpreter | |
Copyright (c) <2016> <Jakub Dušek> [email protected] | |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | |
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | |
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | |
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, | |
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, |
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 collections import OrderedDict | |
nodes = { | |
"a": {"a": 0, "b": 4, "c": 1}, | |
"b": {"b": 0, "d": 2}, | |
"c": {"c": 0, "b": 5, "d": 6}, | |
"d": {"d": 0, "k": 7}, | |
"k": {"k": 0} | |
} |