Skip to content

Instantly share code, notes, and snippets.

View Wurstnase's full-sized avatar

Nico Tonnhofer Wurstnase

View GitHub Profile
@Wurstnase
Wurstnase / g29_test
Last active August 29, 2015 14:18
g29 thinkyhead debuggin
===================
Offset X-40 Y0 Z-0.2
Inductive Sensor
===================
23:29:44.895 : echo:Marlin1.0.3 dev
23:29:44.898 : echo: Last Updated: Apr 8 2015 23:27:18 | Author: (none, default config)
23:29:44.899 : Compiled: Apr 8 2015
23:29:44.902 : echo: Free Memory: 89172 PlannerBufferBytes: 1344
23:29:45.042 : echo:V19 stored settings retrieved (392 bytes)
@Wurstnase
Wurstnase / gist:50e10248218fd5b1eaac
Last active September 23, 2015 08:14
dead_timer
int dt_1 = HEATER_CHECK_INTERVAL; // letztes Zeititervall
unsigned int temp_m1 = 0; // Temperatur bei letzter Messung
float m_1; // aktuelle Steigung
float m_4; // mittlere Steigung in den letzten Zeitintervallen
unsigned int temp_prog; // Temperaturprognose
int t_tot = 10000; // Totzeit in ms
...
void manage_heater()
{
dt_1 = millis() - previous_millis_heater; // letztes Zeitintervall merken
@Wurstnase
Wurstnase / nm_teacup
Created September 14, 2015 18:45
nm -Cg build/teacup.elf
000802ab W ADC_Handler
w atexit
20070068 D __bss_end__
20070068 D __bss_start__
0008029f W BusFault_Handler
w __call_exitprocs
000802ab W CAN0_Handler
000802ab W CAN1_Handler
000802ab W DACC_Handler
20070068 D __data_end__
# Generic Gen7 configuration.
make -f Makefile-AVR USER_CONFIG=testcases/config.regtest-gen7-avr.h \
MCU=atmega644 F_CPU=20000000UL EXTRA_CFLAGS=-Werror all
make[1]: Entering directory `/home/nico/Documents/github/Traumflug/Teacup_Firmware'
mkdir -p build/testcases/config.regtest-gen7-avr
CC build/testcases/config.regtest-gen7-avr/analog.o
CC build/testcases/config.regtest-gen7-avr/clock.o
CC build/testcases/config.regtest-gen7-avr/cmsis-system_lpc11xx.o
CC build/testcases/config.regtest-gen7-avr/cmsis-system_stm32f4xx.o
CC build/testcases/config.regtest-gen7-avr/cpu-arm.o
// Thermistor lookup table for RepRap Temperature Sensor Boards (http://reprap.org/wiki/Temperature_Sensor_2_0)
// Made with createTemperatureLookup.py (https://github.com/traumflug/Teacup_Firmware/blob/master/createTemperatureLookup.py)
// (patched per https://github.com/drf5n/Teacup_Firmware/blob/Gen7/createTemperatureLookup.py)
// default thermistor lookup table
// You may be able to improve the accuracy of this table in various ways.
// 1. Measure the actual resistance of the resistor. It's "nominally" 4.7K, but that's ± 5%.
// 2. Measure the actual beta of your thermistor:http://reprap.org/wiki/MeasuringThermistorBeta
// 3. Generate more table entries than you need, then trim down the ones in uninteresting ranges.
// In either case you'll have to regenerate this table, which requires python, which is difficult to install on windows.
// Since you'll have to do some testing to determine the correct temperature for your application anyway, you
@Wurstnase
Wurstnase / Wilco_sqrt
Created December 2, 2015 19:16
Wilco 3cycle/bit square root
Source:http://www.verycomputer.com/24_e95a6e361498c566_1.htm
In the 1/sqrt() thread, I made the remark that a square root does take
only 3 cycles per bit. OK, here is the algorithm:
Goal: Calculate root = INT (SQRT (N)), for N = 0 .. 2^32 -1
Idea: Successive approximation of the equation (root + delta) ^ 2 = N until
delta < 1. If delta < 1 we have the integer part of SQRT (N).
Use delta = 2^i for i = 15 .. 0.
@Wurstnase
Wurstnase / arduino-due_high-speed-ADC.ino
Created January 28, 2016 09:55 — forked from pklaus/arduino-due_high-speed-ADC.ino
Arduino Due: ADC → DMA → USB @ 1MSPS
#undef HID_ENABLED
// Arduino Due ADC->DMA->USB 1MSPS
// by stimmer
// from http://forum.arduino.cc/index.php?topic=137635.msg1136315#msg1136315
// Input: Analog in A0
// Output: Raw stream of uint16_t in range 0-4095 on Native USB Serial/ACM
// on linux, to stop the OS cooking your data:
// stty -F /dev/ttyACM0 raw -iexten -echo -echoe -echok -echoctl -echoke -onlcr
@Wurstnase
Wurstnase / board.ramps-v1.4h
Created December 27, 2016 12:43
dda_queue issue
/***************************************************************************\
* *
* 1. CPU *
* *
\***************************************************************************/
/** \def CPU_TYPE
CPU types a user should be able to choose from in configtool. All
commented out.
@Wurstnase
Wurstnase / printer.p3steel.h
Created December 27, 2016 12:44
dda_queue issue
/***************************************************************************\
* *
* 6. MECHANICAL/HARDWARE *
* *
\***************************************************************************/
/** \def KINEMATICS_STRAIGHT KINEMATICS_COREXY
This defines the type of kinematics your printer uses. That's essential!
@Wurstnase
Wurstnase / swan.gcode
Created December 27, 2016 12:45
dda_queue issue
This file has been truncated, but you can view the full file.
; G-Code generated by Simplify3D(R) Version 3.1.1
; Dec 24, 2016 at 5:20:49 AM
; Settings Summary
; processName,PLA-NB-Grey-025
; applyToModels,odile_the_swan
; profileName,Prusa3-BlackSteel (modified)
; profileVersion,2015-05-01 08:00:00
; baseProfile,Prusa Mendel (modified)
; printMaterial,PLA
; printQuality,High