Skip to content

Instantly share code, notes, and snippets.

View henrikekblad's full-sized avatar

Henrik Ekblad henrikekblad

View GitHub Profile
L.Control.Button = L.Control.extend({
options: {
position: 'bottomleft'
},
initialize: function (options) {
this._button = {};
this.setButton(options);
},
/* please read copyright-notice at EOF */
#include <stdint.h>
#define CRC8INIT 0x00
#define CRC8POLY 0x18 //0X18 = X^8+X^5+X^4+X^0
uint8_t crc8( uint8_t *data, uint16_t number_of_bytes_in_data )
{
uint8_t crc;
Interpreting the logs from your node or gateway can be a bit tedious. On this page you can paste the output and get a more human readable output. [More details about the log messages](https://www.mysensors.org/apidocs/group__MyTransportgrp.html#details).
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.1.10/vue.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js"></script>
<div id="parser">
<h4>Paste log from gateway or node here:</h4>
<textarea class="form-control" @change="parse" rows="10" v-model="source"></textarea>
<button @click="parse" class="btn btn-primary">Parse</button>
<button @click="copy" class="btn btn-primary">Copy this log URL to clipboard</button>
<button @click="source=''" class="btn btn-default">Clear</button>
@henrikekblad
henrikekblad / render3Dpcb.jade
Created August 16, 2016 22:54
3D PCB renderer
// Creates an 3d representation of a pcb from bottm and top svg using three.js
// https://www.openhardware.io
// Henrik Ekblad <henrik.ekblad@openhardware.io>
//
doctype html
html
head
!= css('main')
base(target="_parent")
block header