for Android Bluetooth Low Energy
Tired of remembering which properties go with which bits in the properties bitmask of a BluetoothGattCharacteristic
? Me too. Here's an easy-to-read table. Source.
Bit Value | Meaning
import json | |
PER_SIDE = 12 # The size of the square wall, in pixels per side | |
TIGHTNESS = 20 # A higher number places dots closer together | |
half = int(PER_SIDE / 2) | |
axis = [(x + 0.5) / TIGHTNESS for x in range(-half, half)] | |
# We reverse the array and plot them z, then x because gl_server's layouts | |
# are weird when used with the Fadecandy examples |
const int MAX_CHARS = 64; | |
char data[MAX_CHARS] = {0}; | |
uint8_t out[MAX_CHARS] = {0}; | |
void setup() | |
{ | |
Serial.begin(57600); | |
} |
for Android Bluetooth Low Energy
Tired of remembering which properties go with which bits in the properties bitmask of a BluetoothGattCharacteristic
? Me too. Here's an easy-to-read table. Source.
Bit Value | Meaning
import java.util.ArrayList; | |
import java.util.HashMap; | |
import java.util.List; | |
import java.util.Map; | |
import javax.annotation.Generated; | |
import com.fasterxml.jackson.annotation.JsonAnyGetter; | |
import com.fasterxml.jackson.annotation.JsonAnySetter; | |
import com.fasterxml.jackson.annotation.JsonIgnore; | |
import com.fasterxml.jackson.annotation.JsonInclude; | |
import com.fasterxml.jackson.annotation.JsonProperty; |
#!/usr/bin/env python3 | |
import appdirs | |
from imgurpython import ImgurClient | |
from watchdog.observers import Observer | |
from watchdog.events import FileSystemEventHandler | |
from pync import Notifier | |
import os | |
import json |
Git merge strategy for Android Manifest files. See main() for more info.
[email protected], created 2015-03-27
License: The MIT License
#include <Adafruit_NeoPixel.h> | |
#include "HSBColor.h" | |
// The pin that is connected to the NeoPixels | |
#define NEOPIXEL_PIN 1 | |
// The pin connected to the button | |
#define BUTTON_PIN 2 | |
// The amount of LEDs in the NeoPixels |
# Arduino makefile | |
# | |
# This makefile allows you to build sketches from the command line | |
# without the Arduino environment (or Java). | |
# | |
# The Arduino environment does preliminary processing on a sketch before | |
# compiling it. If you're using this makefile instead, you'll need to do | |
# a few things differently: | |
# | |
# - Give your program's file a .cpp extension (e.g. foo.cpp). |
def coordsFromRaw(raw): | |
return raw.split(',') | |
lat, lng = getCoordsFromRaw('-87.142,60.330') | |
print(lat, lng) |
#!/bin/bash | |
# From https://www.calazan.com/docker-cleanup-commands/ | |
echo '==============================' | |
echo 'Deleting stopped containers...' | |
echo '==============================' | |
docker rm $(docker ps -a -q) |