Skip to content

Instantly share code, notes, and snippets.

@huggre
huggre / let_there_be_light.ini
Created July 28, 2018 08:56
INI file used to store index counter for the get_new_addresses() function
[IndexCounter]
addrindexcount = 0
@huggre
huggre / hourglass.xbm
Created July 28, 2018 09:02
Hourglass icon in XBM format
#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,
import RPi.GPIO as GPIO
import time
class keypad():
# CONSTANTS
KEYPAD = [
[1,2,3],
[4,5,6],
[7,8,9],
# -*- 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
@huggre
huggre / validate_fingerprint.py
Last active December 15, 2018 10:07
Validate fingerprint
#!/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 / barcode.py
Last active December 15, 2018 16:16
# 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
@huggre
huggre / zmq_cube.py
Last active November 11, 2019 23:00
# Import some standard Python libraries
import time
import random
# Import the Raspberry PI GPIO library
import RPi.GPIO as GPIO
# Import the PyZMQ library
import zmq
@huggre
huggre / plates.csv
Last active December 1, 2019 12:04
NO36256 SEED_FOR_NO36256_GOES_HERE
NO12345 SEED_FOR_NO12345_GOES_HERE
NO46256 SEED_FOR_NO46256_GOES_HERE
@huggre
huggre / car-iota-p2.py
Created December 28, 2019 21:20
Python script for receiving IOTA address using IR
#Import some libraries
import RPi.GPIO as GPIO
from datetime import datetime
# Import the PyOTA library
import iota
from iota import Address
# Input pin used by IR reciever
pin = 12
@huggre
huggre / car-iota-p2.ino
Created December 28, 2019 21:52
Arduino code for the Car-IOTA Part 2 tutorial
// Include the IRemote library
#include <IRremote.h>
IRsend irsend;
// A hexadecimal representation of the IOTA payment address
// where each element in the array consist of four characters
const int long msgArray[] = {0x47545a55,0x48515350,0x52415143,0x54535142,0x5a45454d,0x4c5a5051,0x55504141,0x394c504c,0x4757434b,0x464e4556,0x4b42494e,0x5845585a,0x52414356,0x4b4b4b43,0x59505750,0x4b483941,0x574c474a,0x48504c4f,0x5a5a4f59,0x54414c41,0x574f5653,0x494a4959,0x565a};
// Defines the delay in milliseconds between each IR message
const int delay_time = 500;