Skip to content

Instantly share code, notes, and snippets.

Smart Puck'in

Kevin Sidwar sidwarkd

Smart Puck'in
Block or report user

Report or block sidwarkd

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
sidwarkd /
Last active Aug 2, 2019
Pycom class for interacting with the ADS1115 ADC
import ustruct
import time
_REGISTER_MASK = const(0x03)
_REGISTER_CONVERT = const(0x00)
_REGISTER_CONFIG = const(0x01)
_REGISTER_HITHRESH = const(0x03)
sidwarkd / pi_stats.js
Last active Feb 5, 2019
Python and NodeJS example code for getting memory and cpu usage information on the Raspberry Pi
View pi_stats.js
'use strict'
// A very simple nodeJS script that demonstrates how you can access
// memory usage information similar to how free -m works on the
// Raspberry Pi. Goes with µCast #14.
// Usage: node pi_mem.js
// Example Output
sidwarkd / twilio.json
Created Dec 10, 2016
Particle Webhook Config File Template for Twilio Integration
View twilio.json
"eventName": "[EVENT TO LISTEN FOR]",
"url": "[ACCOUNT SID]/Messages",
"requestType": "POST",
"auth": {
"username": "[ACCOUNT SID]",
"password": "[AUTH TOKEN]"
"form": {
sidwarkd /
Last active Jun 4, 2018
Lambda Functions for the NHL Score Twitter Bot

Need to locally install all dependencies with pip install [package] -t ./ so they can be packaged before uploading to AWS. The packages need to be created in their own folders and the filenames changed to


  • The nhl package is required for get_nhl_game_brief
sidwarkd / Dockerfile_particle_firmware
Created Feb 25, 2018
Dockerfile for a debian-based image to build particle firmware locally
View Dockerfile_particle_firmware
# Base Image
FROM debian
# Install Dependencies
RUN ["/bin/sh","-c","\
dpkg --add-architecture i386 \
&& apt-get update \
&& apt-get install -y \
libc6:i386 \
libncurses5:i386 \
sidwarkd /
Last active Feb 3, 2018
A simple script to convert a bmp file to a header file for the GDEP015OC1 e-paper display
#!/usr/bin/env python
# You need to install Pillow for this script to work
# pip install Pillow
import argparse
from PIL import Image
# Currently this utility script is very specific to my needs for generating
# a header file from a 200x200 pixel bmp. It could easily be expanded to work
sidwarkd / deep_sleep.ino
Created Dec 14, 2017
Sleep Examples for Particle Photon
View deep_sleep.ino
void setup() {
Serial.println("Running setup code");
void loop() {
// Do some stuff here like read a sensor
Serial.println("Start sensor read");
Serial.println("End sensor read");
sidwarkd / shell_commands.txt
Created Sep 5, 2017
Install Docker on the Pi and run at startup
View shell_commands.txt
curl -sSL | sh
sudo systemctl enable docker
sudo systemctl start docker
sudo usermod -aG docker pi
# Log out and back in to use docker commands
sidwarkd / compile_errors.ino
Created Aug 5, 2017
Particle Dev Missing Compiler Errors
View compile_errors.ino
String s = "WTF?"
void setup() {
void loop() {
sidwarkd / null_string_error.ino
Created May 29, 2017
Test app from Issue #1322 for Particle Firmware
View null_string_error.ino
String x = NULL;
void setup() {}
void loop() {}
You can’t perform that action at this time.