Skip to content

Instantly share code, notes, and snippets.

@koenkooi
koenkooi / spidev-max31855.c
Created July 18, 2012 08:28
Simple SPIdev example to read the data from an MAX31855 thermocouple amplifier
/* Simple SPIdev example to read the data from an MAX31855 thermocouple amplifier */
#include <stdio.h>
#include <fcntl.h>
#include <stdlib.h>
#define ARRAY_SIZE(array) sizeof(array)/sizeof(array[0])
/* Dataformat:
* D[31:18] These bits contain the signed 14-bit thermocouple temperature value in degrees Celsius * 4.
iMac:MultiWii koen$ git diff
diff --git a/EEPROM.cpp b/EEPROM.cpp
index 11e57d5..38675df 100644
--- a/EEPROM.cpp
+++ b/EEPROM.cpp
@@ -166,11 +166,11 @@ void LoadDefaults() {
conf.dynThrPID = 0;
conf.thrMid8 = 50; conf.thrExpo8 = 50;
for(i=0;i<CHECKBOXITEMS;i++) {conf.activate[i] = 0;}
-
2015-08-09 07:11:51,594 - octoprint.server.util.sockjs - INFO - New connection from client: 172.20.0.174
2015-08-09 07:26:51,630 - octoprint.server.util.sockjs - INFO - Client connection closed: 172.20.0.174
2015-08-09 08:12:43,480 - octoprint.server.util.sockjs - INFO - New connection from client: 172.20.0.174
2015-08-09 08:28:56,070 - octoprint.server.util.sockjs - INFO - Client connection closed: 172.20.0.174
2015-08-09 08:59:54,888 - octoprint.server.api - INFO - Performing command: sudo shutdown -h now
2015-08-09 08:59:59,766 - octoprint.server - INFO - Shutting down...
2015-08-09 08:59:59,938 - octoprint.server - INFO - Goodbye!
2015-08-09 09:56:32,542 - octoprint.server - INFO - Starting OctoPrint 1.2.4 (master branch)
2015-08-09 09:56:32,548 - octoprint.plugin.core - INFO - Loading plugins from /home/pi/.octoprint/plugins, /home/pi/oprint/lib/python2.7/site-packages/OctoPrint-1.2.4-py2.7.egg/octoprint/plugins and installed plugin packages...
2015-08-09 09:56:33,206 - octoprint.plugin.core - INFO - Fou
@koenkooi
koenkooi / duco.py
Created May 8, 2017 08:25
Ducobox python
#!/usr/bin/env python
import time
import serial
import urllib2
import base64
import json
from decimal import *
def ducocommand(command, verbose = 0):
2018-04-13 04:40:23,352 - octoprint.server.heartbeat - INFO - Server heartbeat <3
2018-04-13 04:40:23,369 - octoprint.server - INFO - --- Log roll over detected ---------------------------------------------------
2018-04-13 04:40:23,371 - octoprint.server - INFO - OctoPrint 1.3.8.dev93+g84b8bed
2018-04-13 04:40:23,376 - octoprint.plugin.core - INFO - 11 plugin(s) registered with the system:
| Announcement Plugin (bundled) = /usr/lib/python2.7/site-packages/octoprint/plugins/announcements
| Core Wizard (bundled) = /usr/lib/python2.7/site-packages/octoprint/plugins/corewizard
| CuraEngine (<= 15.04) (bundled) = /usr/lib/python2.7/site-packages/octoprint/plugins/cura
| Discovery (bundled) = /usr/lib/python2.7/site-packages/octoprint/plugins/discovery
| DisplayProgress (0.1.2) = /usr/lib/python2.7/site-packages/octoprint_displayprogress
| Logging (bundled) = /usr/lib/python2.7/site-packages/octoprint/plugins/logging
2018-04-14 14:10:29,771 - octoprint.server - INFO - --- Log roll over detected ---------------------------------------------------
2018-04-14 14:10:29,772 - octoprint.server - INFO - OctoPrint 1.3.8.dev35+g5475aa1
2018-04-14 14:10:29,775 - octoprint.plugin.core - INFO - 13 plugin(s) registered with the system:
| Announcement Plugin (bundled) = /usr/lib/python2.7/site-packages/octoprint/plugins/announcements
| Core Wizard (bundled) = /usr/lib/python2.7/site-packages/octoprint/plugins/corewizard
| CuraEngine (<= 15.04) (bundled) = /usr/lib/python2.7/site-packages/octoprint/plugins/cura
| Discovery (bundled) = /usr/lib/python2.7/site-packages/octoprint/plugins/discovery
| DisplayProgress (0.1.2) = /usr/lib/python2.7/site-packages/octoprint_displayprogress
| Firmware Updater (0.6.0) = /var/lib/octoprint/.local/lib/python2.7/site-packages/octoprint_firmwareupdater
| Logging (bundled) = /usr/lib/python2.7/site-packages/octoprint/plugins/logging
koen@beast:/build/pkg/xbmc$ git show
commit b66dcb6788aecfc5f9ef5d3e258a49075fd4688a
Author: Koen Kooi <koen@dominion.thruhere.net>
Date: Fri Apr 20 09:22:40 2018 +0200
EGLutils: don't request 16 bit depth
aka "Make it work with lima". Inspired by
https://github.com/superna9999/meta-meson/blob/topic/mesa-lima/recipes-benchmark/glmark2/files/0001-Make-it-run-with-Lima.patch
2018-04-29 07:59:16,006 - octoprint.server.heartbeat - INFO - Server heartbeat <3
2018-04-29 07:59:16,019 - octoprint.server - INFO - --- Log roll over detected ---------------------------------------------------
2018-04-29 07:59:16,020 - octoprint.server - INFO - OctoPrint 1.3.9.dev142+gb1a4a6e
2018-04-29 07:59:16,025 - octoprint.plugin.core - INFO - 14 plugin(s) registered with the system:
| Announcement Plugin (bundled) = /usr/lib/python2.7/site-packages/octoprint/plugins/announcements
| Bed Visualizer (0.0.8) = /var/lib/octoprint/.local/lib/python2.7/site-packages/octoprint_bedlevelvisualizer
| Core Wizard (bundled) = /usr/lib/python2.7/site-packages/octoprint/plugins/corewizard
| CuraEngine (<= 15.04) (bundled) = /usr/lib/python2.7/site-packages/octoprint/plugins/cura
| Discovery (bundled) = /usr/lib/python2.7/site-packages/octoprint/plugins/discovery
| DisplayProgress (0.1.2) = /usr/lib/python2.7/site-packages/octoprint_displayprogress
Jun 07 08:02:46 solar easy-server[29864]: 172.20.0.66 - - [07/Jun/2018:06:02:46 +0000] "GET /bridge/heatingCircuits/hc1/actualSupplyTemperature HTTP/1.1" 200 163 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/602.37 (KHTML, like Gecko) Chrome/54.0.36706.0 Safari/602.37"
Jun 07 08:02:46 solar easy-server[29864]: 2018-06-07T06:02:46.184Z nefit-easy-core preparing message: /system/appliance/displaycode (retries = 0)
Jun 07 08:02:46 solar easy-server[29864]: 2018-06-07T06:02:46.192Z nefit-easy-core queuing request (retries = 0)
Jun 07 08:02:46 solar easy-server[29864]: 2018-06-07T06:02:46.193Z nefit-easy-core sending message
Jun 07 08:02:46 solar easy-server[29864]: 2018-06-07T06:02:46.344Z nefit-easy-core received stanza of type "message"
Jun 07 08:02:47 solar easy-server[29864]: 2018-06-07T06:02:47.460Z nefit-easy-core cleaning up for /system/appliance/displaycode
Jun 07 08:02:47 solar easy-server[29864]: 172.20.0.66 - - [07/Jun/2018:06:02:47 +0000] "GET /bridge/system/appliance/displaycode HTTP/1.1" 20
Jun 07 12:41:44 solar easy-server[9660]: 172.20.0.66 - - [07/Jun/2018:10:41:44 +0000] "GET /bridge/system/sensors/temperatures/outdoor_t1 HTTP/1.1" 200 225 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/601.38 (KHTML, like Gecko) Chrome/55.0.60255.0 Safari/601.36"
Jun 07 12:41:52 solar easy-server[9660]: 2018-06-07T10:41:52.573Z nefit-easy-core sending ping
Jun 07 12:42:14 solar easy-server[9660]: 2018-06-07T10:42:14.017Z nefit-easy-core preparing message: /ecus/rrc/uiStatus (retries = 0)
Jun 07 12:42:14 solar easy-server[9660]: 2018-06-07T10:42:14.024Z nefit-easy-core queuing request (retries = 0)
Jun 07 12:42:14 solar easy-server[9660]: 2018-06-07T10:42:14.027Z nefit-easy-core sending message
Jun 07 12:42:16 solar easy-server[9660]: 2018-06-07T10:42:16.041Z nefit-easy-core message timed out, retrying...
Jun 07 12:42:16 solar easy-server[9660]: 2018-06-07T10:42:16.048Z nefit-easy-core queuing request (retries = 1)
Jun 07 12:42:16 solar easy-server[9660]: 2018-06-07T10:42:16.051Z nefit-easy-core sendin