Skip to content

Instantly share code, notes, and snippets.

View nraynaud's full-sized avatar
🌵
learning new things

Nicolas Raynaud nraynaud

🌵
learning new things
View GitHub Profile
@nraynaud
nraynaud / vmdk.grammar
Last active February 26, 2022 01:31
VMDK grammar for synalyze pro
<?xml version="1.0" encoding="UTF-8"?>
<ufwb version="1.17">
<grammar name="VMDK" start="id:6" author="Nicolas Raynaud" email="nraynaud@gmail.com" fileextension=".vmdk">
<description>VMDK streamOptimized file format. Licenced under Affero GPL, the copyright owner is Vates SAS. This is a work for hire by Nicolas Raynaud.</description>
<scripts>
<script name="Sector64" type="DataType" id="142">
<source language="Python"># custom data type script
def parseByteRange(element, byteView, bitPos, bitLength, results):
# this method parses data starting at bitPos, bitLength bits are remaining
@nraynaud
nraynaud / dxf_color.cps
Last active February 16, 2022 23:18
A Fusion 360 DXF post processor whose output uses one color per operation, useful for users of Lasercut 5.3. See: https://www.reddit.com/r/ChineseLaserCutters/comments/b793x5/i_improved_the_dxf_post_processor_for_fusion_360/
/**
Copyright (C) 2015-2018 by Autodesk, Inc.
All rights reserved.
Altered by nraynaud
*/
description = "Color AutoCAD DXF";
vendor = "Autodesk/nraynaud";
vendorUrl = "http://www.autodesk.com";
; Lift Z relatively to current position
G91
G1 S2 Z2 F6000
; split Z motor control to Z and U
; for it to work we have to show U (param P4) in the UI
M584 Z2 U3 P4
; Move Z and U down until the switches triggers
G1 S1 Z-205 U-205 F1000
@nraynaud
nraynaud / am5729-beagleboneai-custom.dts
Last active December 4, 2020 01:57
beaglebone AI PRU2 unipolar stepper
#include "am5729-beagleboneai.dts"
// make it easy to determine which dtb you're currently running on
// (via /proc/device-tree/chosen/)
/ {
chosen {
base_dtb = "am5729-beagleboneai-custom.dts";
base_dtb_timestamp = __TIMESTAMP__;
};
};
// eventually these should be available in a header
@nraynaud
nraynaud / Readme.md
Last active September 6, 2020 18:49
Unattended installation of Xenserver with iso file

Unattended installation of Xenserver with iso file

  • create answers.xml
  • unpack iso file
    mount sudo mount XenServer-7.1.0-s1-install-cd.iso /mnt
    mkdir newContent
    (cd /mnt; sudo tar cf - .) |  (cd newContent; tar xfp -)
@nraynaud
nraynaud / Save Tool Offsets.g
Created March 20, 2020 20:57
Saving probed tool offset in duet wifi
M500 P10
@nraynaud
nraynaud / 10 Probe Tool Z.g
Last active March 20, 2020 20:56
How to use M585 in Duet wifi
G53 G0 Z30 F10000
G0 X419.2 Y2.6 F10000
M585 F200 Z-23.6 P0 S1 ;
G0 Z30 F10000
@nraynaud
nraynaud / tim4.c
Last active December 24, 2019 14:51
Connect a rotary encoder to STM32F4. Needs time base initialization on TIM4 but not on TIM8, no idea why
#include "stm32f4_discovery.h"
#include "arm_math.h"
/*
- TIM4_CH1 pin (PB.06)
- TIM4_CH2 pin (PB.07)
*/
void configureEncoder() {
; Relative positioning
G91
; Lift Z without endstop protection
G1 S2 Z2 F6000
; Course home X and Y
G1 X-215 Y-215 F4200 S1
; Move away from the endstops
@nraynaud
nraynaud / config.g
Last active November 7, 2019 23:07
M208 X0 Y0 Z0 U0 S1 ; Set axis minima
M208 X210 Y210 Z200 U200 S0 ; Set axis maxima
;DUAL Z
M584 X0 Y1 Z2:3 U3 E4 P3
; Endstops
M574 X1 Y1 Z1 U1 S0 ; Set active low endstops
M558 P0 X0 Y0 Z0 H2 F60 T6000 ; Set Z probe type to switch, the axes for which it is used and the dive height + speeds
G31 P600 X0 Y0 Z0 ; Set Z probe trigger value, offset and trigger height