Skip to content

Instantly share code, notes, and snippets.

@mharizanov
mharizanov / thematrix.ino
Last active November 12, 2018 12:59
the matrix ili9431
// A fun MATRIX-like screen demo of scrolling
// Screen will flicker initially until fully drawn
// then scroll smoothly
#define ILI9341_VSCRDEF 0x33
#include "Adafruit_GFX.h"
#include "Adafruit_ILI9341.h"
#include <SPI.h>
SPIClass SPI2(HSPI);
@mharizanov
mharizanov / gist:e8c01130c72909393b50
Created September 2, 2014 13:28
Solar water tank node with DQ checks
[{"id":"ba386057.845d3","type":"mqtt-broker","broker":"localhost","port":"1883"},{"id":"650ec6ce.937bc","type":"mqtt in","name":"Solar water tank raw","topic":"home/solar/raw","broker":"ba386057.845d3","x":94,"y":1469,"z":"31c82d7c.ce37d2","wires":[["1a8bcb53.521cf5"]]},{"id":"f6db14b.48de768","type":"trigger","op1":"","op2":"","op1type":"nul","op2type":"pay","duration":"15","extend":"true","units":"min","name":"Heratbeat monitor","x":476,"y":1400,"z":"31c82d7c.ce37d2","wires":[["fc298d6a.cf894"]]},{"id":"650a1683.332eb8","type":"inject","name":"Initial heartbeat","topic":"","payload":"","payloadType":"none","repeat":"","crontab":"","once":true,"x":103,"y":1400,"z":"31c82d7c.ce37d2","wires":[["f6db14b.48de768"]]},{"id":"a0c7803f.d6f2a","type":"function","name":"Parse solar node payload","func":"// The received message is stored in 'msg'\n// It will have at least a 'payload' property:\n// console.log(msg.payload);\n// The 'context' object is available to store state\n// between invocations of the function\n/
@mharizanov
mharizanov / Wallpaper_prank
Last active December 15, 2015 22:09
Description: Minimizes all windows to desktop, takes screenshot, disables desktop icons, saves screenshot in %userprofile% and sets as wallpaper
//Description: Minimizes all windows to desktop, takes screenshot, disables desktop icons, saves screenshot in %userprofile% and sets as wallpaper
void setup(){
delay(10000);
Keyboard.begin();
//Show desktop
Keyboard.press(KEY_LEFT_GUI);
Keyboard.write('d');
@mharizanov
mharizanov / WiFiCheck
Created April 6, 2013 08:50
Script to check and re-connect WiFi on Raspberry Pi
#!/bin/bash
##################################################################
# A Project of TNET Services, Inc
#
# Title: WiFi_Check
# Author: Kevin Reed (Dweeber)
# dweeber.dweebs@gmail.com
# Project: Raspberry Pi Stuff
#
# Copyright: Copyright (c) 2012 Kevin Reed <kreed@tnet.com>