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 | |
import requests | |
import datetime | |
from dashing import * | |
url_address = 'http://localhost:7076' | |
time_out = 5 | |
ui = HSplit( | |
VSplit( |
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
#!/usr/bin/env python | |
import socket | |
import traceback | |
import time | |
TCP_IP = '138.201.94.249' | |
TCP_PORT = 7075 | |
BUFFER_SIZE = 128 | |
byte_message = bytearray( [ 0x52, 0x43, 0x11, 0x11, 0x0d, 0x02, 0x00, 0x00 ] ) |
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
CH926 | Devices | |
---|---|---|
Power | 12v Power Adaptor |
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
Raspberry Pi | Devices | |
---|---|---|
Camera Port | Zero Cam | |
GPIO 1 | CH926 LED 1 (1p) | |
GPIO 2 | CH926 LED 2 (2p) | |
GPIO 3 | CH926 LED 3 (5p) | |
GPIO 4 | CH926 LED 4 (10p) | |
GPIO 5 | CH926 LED 5 (20p) | |
GPIO 6 | CH926 LED 6 (50p) | |
Ground | Ground | |
Power (VCC USB) | 5v USB cable + Power Adapter |
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
Parts | Source | Costs (£) | |
---|---|---|---|
Raspberry Pi Zero W | Pimoroni | 9.30 | |
Zero Cam | Pimoroni | 14.00 | |
CH926 Coin Acceptor | Ebay | 11.81 | |
Wires and Stuff | Junk Box | 0 | |
Case | 3D Printed | 0 (spare filament) | |
Total = 35.11 |
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
#Base code from https://www.eclipse.org/paho/clients/python/ lifted on 29/4/19 | |
import paho.mqtt.client as mqtt | |
# The callback for when a PUBLISH message is received from the server. | |
def on_message(client, userdata, msg): | |
print("{}: {}".format(msg.topic, msg.payload.decode("utf-8") )) | |
client = mqtt.Client() | |
client.on_message = on_message |
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 bitstring import BitArray | |
import ctypes | |
library_name = "librai_lib.dylib" | |
librai = ctypes.CDLL(library_name) | |
print("Calculating PoW") | |
work = librai.xrb_work(b"FC5A7FB777110A858052468D448B2DF22B648943C097C0608D1E2341007438B0") |
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 settings | |
import twitter | |
import json | |
import time | |
import pycurl | |
from io import BytesIO | |
import dataset |
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
#!/bin/sh | |
export Qt5_DIR=/Users/jamescoxon/Qt/5.8/clang_64 | |
export BOOST_ROOT=/usr/local/Cellar/boost/1.63.0 | |
make clean | |
git submodule init | |
git submodule update |
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
/* | |
UKHASnet rf69_repeater code | |
based on rf22_client.pde/ino from the RF22 library | |
*/ | |
#include <SPI.h> | |
//You'll need to use the RFM69 library from the UKHASnet repo | |
#include <RFM69.h> |
NewerOlder