Skip to content

Instantly share code, notes, and snippets.

@huggre
huggre / let_there_be_light.ini
Created Jul 28, 2018
INI file used to store index counter for the get_new_addresses() function
View let_there_be_light.ini
[IndexCounter]
addrindexcount = 0
@huggre
huggre / hourglass.xbm
Created Jul 28, 2018
Hourglass icon in XBM format
View hourglass.xbm
#define 9f6e8ef561174ca49d14dc1aef035896_width 128
#define 9f6e8ef561174ca49d14dc1aef035896_height 128
static char 9f6e8ef561174ca49d14dc1aef035896_bits[] = {
0x00, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0x3F, 0x00, 0x00, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x00, 0x00, 0xFE, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x00,
0x00, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0x7F, 0x00, 0x00, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x00, 0x00, 0xFE, 0xFF, 0xFF,
View iota_debit_card_pin.py
# Imports some required libraries
import RPi.GPIO as GPIO
import MFRC522
import signal
import regex
continue_reading = True
# Capture SIGINT for cleanup when the script is aborted
def end_read(signal,frame):
View keypad.py
import RPi.GPIO as GPIO
import time
class keypad():
# CONSTANTS
KEYPAD = [
[1,2,3],
[4,5,6],
[7,8,9],
View I2C_LCD_driver.py
# -*- coding: utf-8 -*-
# Original code found at:
# https://gist.github.com/DenisFromHR/cc863375a6e19dce359d
"""
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
View cleaning_log.py
# Imports from the PyOTA library
from iota import Iota
from iota import Address
from iota import Transaction
from iota import TryteString
# Import json library
import json
# Import datetime libary
View cleaning_register.py
# Import datetime library
from datetime import datetime
# Import GPIO library
import RPi.GPIO as GPIO
# Import simplified version of the MFRC522 library
import SimpleMFRC522
# Import the PyOTA library
@huggre
huggre / validate_fingerprint.py
Last active Dec 15, 2018
Validate fingerprint
View validate_fingerprint.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Imports from the PyOTA library
from iota import Iota
from iota import Address
from iota import Transaction
from iota import TryteString
# Import json library
@huggre
huggre / upload_fingerprint.py
Last active Dec 15, 2018
Upload fingerprint
View upload_fingerprint.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Import the PyOTA library
import iota
# Import json
import json
# Import PyFingerprint library
View barcode.py
# Import the PyOTA library
import iota
from iota import Address
from iota import Transaction
from iota import TryteString
from iota.crypto.kerl import Kerl
# Import datetime libary
import datetime
You can’t perform that action at this time.