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
; Configuration file for Duet WiFi (firmware version 1.17 to 1.19)
; executed by the firmware on start-up
;
; generated by RepRapFirmware Configuration Tool on Wed Nov 15 2017 23:36:04 GMT-0700 (MST)
; General preferences
M111 S0 ; Debugging off
G21 ; Work in millimetres
G90 ; Send absolute coordinates...
M83 ; ...but relative extruder moves
; 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 / 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
; 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 / 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 -)
W: https://get.replicated.com/apt/dists/all/Release.gpg: Signature by key 68386EDB2C8B75CA615A8C985D4781862AFFAC40 uses weak digest algorithm (SHA1)
E: Failed to fetch https://get.replicated.com/apt/dists/all/Release No Hash entry in Release file /var/lib/apt/lists/partial/get.replicated.com_apt_dists_all_Release which is considered strong enough for security purposes
vagrant@ubuntu:~$ uname -a
Linux ubuntu 4.4.0-36-generic #55-Ubuntu SMP Thu Aug 11 18:01:55 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
vagrant@ubuntu:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
@nraynaud
nraynaud / gist:75650aae6ebad2f97d77
Created March 30, 2015 16:13
STM32F4: receiving one shot of data on the SPI bus in receive only
#include <stm32f4xx.h>
#include "stm32f4xx_conf.h"
#include "stm32f4_discovery.h"
#include "math.h"
#include "arm_math.h"
volatile uint16_t counter = 0;
volatile uint16_t savedCounter = 0;
uint16_t parallelPins = GPIO_Pin_3 | GPIO_Pin_4 | GPIO_Pin_5 | GPIO_Pin_6 | GPIO_Pin_7 | GPIO_Pin_8 | GPIO_Pin_9 | GPIO_Pin_10;
@nraynaud
nraynaud / main.c
Created March 24, 2015 22:12
STM32F4: sending data to 2 chained 74HCT595 shift registers
#include <stm32f4xx.h>
#include "stm32f4xx_conf.h"
#include "stm32f4_discovery.h"
#include "math.h"
#include "arm_math.h"
uint16_t counter = 0;
void sendCounter();
<!DOCTYPE html >
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="chrome=1"/>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<title>Visual CAM</title>
<script src="webapp/libs/require.js"></script>
<script src="webapp/config.js"></script>
<script>
requirejs.config({
@nraynaud
nraynaud / registers.ads
Created October 11, 2014 09:38
started reworking Adacore's modeling of registers in STM32F4
--------------------------------------------------------------------
---
-----------
-- --
-- GNAT EXAMPLE --
-- --
-- Copyright (C) 2014, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --