Skip to content

Instantly share code, notes, and snippets.


  • UK
Block or report user

Report or block bassdread

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
bassdread / .pre-commit-config.yaml
Created Jun 28, 2018
Example .pre-commit-config.yaml
View .pre-commit-config.yaml
# See for more information
# See for more hooks
- repo:
sha: v0.9.2
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-json
bassdread / monitor.ino
Created Nov 28, 2016
Arduino code for reading a TSL2561 and a ds18S20
View monitor.ino
#include <OneWire.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_TSL2561_U.h>
int DS18S20_Pin = 3;
OneWire ds(DS18S20_Pin);
Adafruit_TSL2561_Unified tsl = Adafruit_TSL2561_Unified(TSL2561_ADDR_FLOAT, 12345);
void setup() {
bassdread / servo.ino
Created Aug 30, 2016
Simple servo code to control a gong
View servo.ino
#include <Servo.h>
Servo myservo;
String inputString = ""; // a string to hold incoming data
boolean stringComplete = false; // whether the string is complete
void setup()
bassdread / gist:83b9b912e6a409d5baf2e357dda484c0
Created Jul 10, 2016
Error when trying to setup connection to Maplin Arm
View gist:83b9b912e6a409d5baf2e357dda484c0
>>> s = MaplinRobot()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "", line 26, in __init__
self.rctl = usb.core.find(idVendor=self.usb_vendor_id, idProduct=self.usb_prod_id) #Object to talk to the robot
File "/Library/Python/2.7/site-packages/usb/", line 1263, in find
raise NoBackendError('No backend available')
usb.core.NoBackendError: No backend available
# fix
bassdread /
Created Apr 4, 2016
Fetch stats about a service's response time from Server Density.
import json
import requests
from datetime import datetime, timedelta
import serial
from time import sleep
from copy import deepcopy
DEVICE_PATH = "/dev/tty.usbmodem1421"
token = "YOUR_TOKEN"
View sd_map.ino
// NeoPixel Ring simple sketch (c) 2013 Shae Erisson
// released under the GPLv3 license to match the rest of the AdaFruit NeoPixel library
#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
#include <avr/power.h>
// Which pin on the Arduino is connected to the NeoPixels?
// On a Trinket or Gemma we suggest changing this to 1
View example.ino
#include <DHT.h>
#include <Wire.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_BMP085.h>
#define DHTPIN 2
#define DHTTYPE DHT22
int LDR_Pin = A0;
import json
import requests
from datetime import datetime, timedelta
import serial
from time import sleep
token = "YOUR TOKEN"
subject_id = "SERVICE ID FROM Server Density"
bassdread / website_monitor.ino
Created Feb 20, 2016
Basic code to control 8 bit shift register
View website_monitor.ino
Adafruit Arduino - Lesson 4. 8 LEDs and a Shift Register - Brightness
int latchPin = 5;
int clockPin = 6;
int dataPin = 4;
int outputEnablePin = 3;
byte leds = 0;
bassdread /
Created Feb 19, 2016
Yo when a disk fails smartctl asscessment
import collections
from datetime import datetime
import json
import sys
from pySMART import Device
except ImportError:
You can’t perform that action at this time.