Skip to content

Instantly share code, notes, and snippets.

@Bouni
Bouni / errorlog.txt
Created September 7, 2014 18:00
Arduino IDE 1.5.7 serial errorlog
Serial1 sent 3E, received 3E, OK!
Serial2 sent 3E, received 3E, OK!
Serial3 sent 3E, received 3E, OK!
3455 bytes sent
Serial1 sent 3F, received 3F, OK!
Serial2 sent 3F, received 3F, OK!
Serial3 sent 3F, received 3F, OK!
3456 bytes sent
Test mode 12
Serial1 sent 0, received FFFFFFFF, >>>> FAIL <<<<
@Bouni
Bouni / testsketch.ino
Last active August 29, 2015 14:06
Arduino IDE 1.5.7 serial test sketch
int modes[30] = {
SERIAL_5N1,
SERIAL_5E1,
SERIAL_5O1,
SERIAL_5N2,
SERIAL_5E2,
SERIAL_5O2,
SERIAL_6N1,
SERIAL_6E1,
@Bouni
Bouni / modbus.py
Created November 5, 2014 11:56
Modbus connection to SICK FlexiSoft
#!/usr/bin/env python
#---------------------------------------------------------------------------#
# import the various server implementations
#---------------------------------------------------------------------------#
from pymodbus.client.sync import ModbusTcpClient as ModbusClient
from time import sleep
#---------------------------------------------------------------------------#
# configure the client logging
@Bouni
Bouni / matrix.ino
Last active August 29, 2015 14:13
A dot matrix test
int column[8] = {A0,A1,A2,A3,A4,A5,A6,A7};
int row[8] = {A8,A9,A10,A11,A12,A13,A14,A15};
int pattern[8] = {0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01};
/*
void writeByte(int byte, int *port) {
for(int i=0; i<8; i++){
if(byte & (1<<i)) {
@Bouni
Bouni / SmoothieSpindle.md
Last active August 29, 2015 14:19
Smothieboard Spindle improvement

Smoothieboard Spindle improvements

Modules

  • SpindleMaker: loads the right spindle module depending on the config, deletes itself after thats done. (Like the ExtruderMaker)
  • SpindleControl: Baseclass for other spindles
  • PWMSpindleControl: For DC spindles that are directly driven by one of the MOSFET outputs (the old spindle module)
  • AnalogSpindleControl: For controlling a VFD driven spindle with an analog 0-10V signal. Some additional electronic is required to convert the 3.3V PWM signal into a 0-10V signal
@Bouni
Bouni / SoftSerialTest.cpp
Last active August 29, 2015 14:21
BufferedSoftSerial issue
// SerialTestControl.h
#ifndef SERIAL_TEST_MODULE_H
#define SERIAL_TEST_MODULE_H
#include "SpindleControl.h"
class BufferedSoftSerial;
// This module implements closed loop PID control for spindle RPM.
@Bouni
Bouni / ulogger.c
Created June 13, 2015 21:24
ulogger
#ifndef F_CPU
#define F_CPU 16000000UL
#endif
#include <avr/io.h>
#include <util/delay.h>
#include <stdlib.h>
#define TEMPERATUR PF0
#define BUTTON PF1
@Bouni
Bouni / burning-seri.es-api.markdown
Last active December 23, 2015 15:37
burning-seri.es API

Short description of the burning-seri.es JSON API

Fetch a list all available series

GET https://burning-seri.es/api/series

Result (just a fragment):

[
@Bouni
Bouni / leaflet.draw store-reload
Last active January 3, 2016 20:58
My solution storing and reloading features on a leaflet map edited with leaflet.draw. The features are written to a hidden text-input exportGeoJson(drawnItems, $("#mapdata")); and also loaded from there importGeoJson(drawnItems, JSON.parse($("#mapdata").val()));
$(function () {
var map = L.map('map').setView([51.505, -0.09], 13);
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
attribution: '&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
}).addTo(map);
var drawnItems = new L.FeatureGroup();
map.addLayer(drawnItems);
@Bouni
Bouni / init.vim
Created March 21, 2017 19:58 — forked from samuelb/init.vim
" ~/.config/nvim/init.vim
"
" After add / remove Plugins, run :PlugInstall / :PlugClean
if has('nvim')
let $VIMHOME = '~/.config/nvim'
else
let $VIMHOME = '~/.vim'
endif