Skip to content

Instantly share code, notes, and snippets.

#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
/*
* Fix Point Support
*/
// https://en.wikipedia.org/wiki/Q_(number_format)
// Q12.20 / ARM Q13.20
// 12 because:
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@garethky
garethky / prusa_xl_start.gcode
Created December 20, 2023 15:16
Pruse XL Start Gcode
M17 ; enable steppers
M862.3 P "XL" ; printer model check
M862.5 P2 ; g-code level check
M862.6 P"Input shaper" ; FW feature check
M115 U5.1.0+13455
G90 ; use absolute coordinates
M83 ; extruder relative mode
; set print area
M555 X{first_layer_print_min[0]} Y{first_layer_print_min[1]} W{(first_layer_print_max[0]) - (first_layer_print_min[0])} H{(first_layer_print_max[1]) - (first_layer_print_min[1])}
; inform about nozzle diameter
@garethky
garethky / bambu_x1_start.gcode
Created December 20, 2023 15:09
Bambu Lab X1 Carbon Start Gcode
;===== machine: X1 =========================
;===== date: 20230707 =====================
;===== turn on the HB fan =================
M104 S75 ;set extruder temp to turn on the HB fan and prevent filament oozing from nozzle
;===== reset machine status =================
G91
M17 Z0.4 ; lower the z-motor current
G380 S2 Z30 F300 ; G380 is same as G38; lower the hotbed , to prevent the nozzle is below the hotbed
G380 S2 Z-25 F300 ;
G1 Z5 F300;
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@garethky
garethky / graph.html
Created May 3, 2023 17:38
Tool to dump data fron Moonraker's websicket and display in a browser
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Graph Load Cell Data</title>
<script src="https://cdn.jsdelivr.net/npm/echarts@5.3.2/dist/echarts.min.js"></script>
</head>
<body>
<h2>Moonraker Server:
<form id="serverForm">
@garethky
garethky / graph-load-cell.html
Created May 4, 2022 04:27
Temporary load cell data capture and display Tool
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Graph Load Cell Data</title>
<script src="https://cdn.jsdelivr.net/npm/echarts@5.3.2/dist/echarts.min.js"></script>
</head>
<body>
<h2>Moonraker Server:
<form id="serverForm">
@garethky
garethky / GlowforgeColorific.cps
Last active January 2, 2020 04:41
Select the color cycle based on the number of sections. This keeps the colors pretty for simpler documents.
/**
Copyright (C) 2015 by Autodesk, Inc.
All rights reserved.
$Revision: 41602 8a235290846bfe71ead6a010711f4fc730f48827 $
$Date: 2017-09-14 12:16:32 $
FORKID {2E27B627-115A-4A16-A853-5B9B9D9AF480}
*/