Skip to content

Instantly share code, notes, and snippets.

@jpliew
jpliew / WebUSBLeonardo.hex
Created February 2, 2018 23:09
WebUSB Leonardo RGB Demo
:100000000C946D010C9495010C9495010C94950140
:100010000C9495010C9495010C9495010C94950108
:100020000C9495010C9495010C94DD020C94B7038B
:100030000C9495010C9495010C9495010C949501E8
:100040000C9495010C9495010C9495010C949501D8
:100050000C9495010C9495010C9495010C941C0A38
:100060000C9495010C9495010C9495010C949501B8
:100070000C9495010C9495010C9495010C949501A8
:100080000C9495010C9495010C9495010C94950198
:100090000C9495010C9495010C9495010C94950188
@jpliew
jpliew / gist:6a61c3fa8da72ea8bd863b522d59ceac
Created March 18, 2018 11:50
WiegandNG 100 times key and 100 times card scan
Bits=8
RAW Binary=11100001
Bits=8
RAW Binary=11100001
Bits=8
RAW Binary=11100001
Bits=8
RAW Binary=11100001
Bits=8
RAW Binary=11100001
Info: Thank you for choosing to chat with us. An agent will be with you shortly.
Info: All agents are currently assisting others. Thank you for your patience.
Info: All agents are currently assisting others. Thank you for your patience.
Info: All agents are currently assisting others. Thank you for your patience.
Info: All agents are currently assisting others. Thank you for your patience.
Info: You are now chatting with Lana_ext_2274.
Lana_ext_2274: Welcome to Digi-Key Live-Help. How may I assist you?
JP Liew: Hi
JP Liew: I was trying to pay an order using PayPal
JP Liew: Web ID: xxxxxxxxx Access ID: xxxxx
@jpliew
jpliew / image2grf.php
Created July 5, 2019 04:27 — forked from thomascube/image2grf.php
PHP function to convert a PNG image to a .GRF file for use with Zebra printers
<?php
/**
* Converts a PNG image to a .GRF file for use with Zebra printers
*
* The input is preferably a 1-bit black/white image but RGB images
* are accepted as well.
*
* This function uses PHP's GD library image functions.
*
@jpliew
jpliew / TUT3-1A.ino
Created March 25, 2020 05:49
Tutorial 3 - 1A
int pinR = 10;
int pinG = 9;
int pinB = 11;
void setup() {
pinMode(pinR, OUTPUT);
pinMode(pinG, OUTPUT);
pinMode(pinB, OUTPUT);
}
@jpliew
jpliew / TUT3-1B.ino
Created March 25, 2020 06:02
Tutorial 3 - 1B
int pinR = 10;
int pinG = 9;
int pinB = 11;
int valueX;
void setup() {
pinMode(pinR, OUTPUT);
pinMode(pinG, OUTPUT);
pinMode(pinB, OUTPUT);
}
@jpliew
jpliew / TUT3-1C.ino
Created March 25, 2020 06:13
Tutorial 3 - 1C
int pinR = 10;
int pinG = 9;
int pinB = 11;
void setup() {
pinMode(pinR, OUTPUT);
pinMode(pinG, OUTPUT);
pinMode(pinB, OUTPUT);
}
@jpliew
jpliew / TUT3-1D.ino
Created March 25, 2020 06:27
Tutorial 3 - 1D
int pinR = 10;
int pinG = 9;
int pinB = 11;
int btnPin = 2;
int isPressed =0;
void setup() {
pinMode(pinR, OUTPUT);
pinMode(pinG, OUTPUT);
pinMode(pinB, OUTPUT);
@jpliew
jpliew / TUT3-2A.ino
Created March 25, 2020 06:41
Tutorial 3 - 2A
int sensorPin = 2;
int isTilted = 0;
void setup() {
Serial.begin(9600);
pinMode(sensorPin, INPUT);
}
void loop() {
isTilted=digitalRead(sensorPin);
@jpliew
jpliew / TUT3-2B.ino
Created March 25, 2020 06:45
Tutorial 3 - 2B
int sensorPin = 2;
int LEDPin = 13;
int isTilted = 0;
void setup() {
Serial.begin(9600);
pinMode(sensorPin, INPUT);
pinMode(LEDPin, OUTPUT);
}