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 zlib | |
import binascii | |
def jsonToBlueprint(jsonfilename,outputfilename): | |
with open(jsonfilename,'rt') as f: | |
plain = f.read() | |
compressed = zlib.compress(plain.encode('utf-8'),level=9) | |
base = binascii.b2a_base64(compressed,newline=False) | |
with open(outputfilename,'wt') as f: | |
f.write("0") |
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
// rgData: input, raw digital sample array | |
// rgValue: output, decoded data array | |
// rgFlag: output, decoded flag array | |
// reference: https://www.ooaccess.com/kb/37-bit-fc/ | |
// | |
const cSamples = rgData.length // number of acquisition samples | |
const numBits=37; | |
var pData, fData = 0; // previous and current bit value | |
var result = 0; |
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
# uses https://github.com/damiandennis/code128cgen | |
# the config barcodes for the netum C570 barcode scanner have controll characters hidden inside them. | |
# to create your own (ie 2050209) | |
# MakeMyCode("205020",9,"2050209\nAutomatic") | |
# creates 2050209.png | |
import code128cgen | |
def MakeMyCode(codeStart,codeDigit,text): |
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
clock = Pin(14,Pin.OUT) #wemos D5 | |
data = Pin(13,Pin.OUT) #wemos D7 | |
numPixels=20 | |
apa = APA102(clock,data,numPixels) | |
seg1 = Segment(apa,0,9,Segment.dotScan,rainbow,2000,False) # outer ring | |
seg2 = Segment(apa,10,19,Segment.blink,primary,2000,False) # inner ring |