Skip to content

Instantly share code, notes, and snippets.

View Lauszus's full-sized avatar
✈️
In foiling mode

Kristian Sloth Lauszus Lauszus

✈️
In foiling mode
View GitHub Profile
M104 S0 ; turn off temperature
M140 S0 ; turn off heatbed
G28 X0 ; home X axis
G1 Y150.0 ; move bed forward
M84 ; disable motors
@Lauszus
Lauszus / sixad
Created July 11, 2017 01:04
OSMC PS3 controller via Bluetooth on the Raspberry Pi 3
#!/bin/bash
### BEGIN INIT INFO
# Provides: sixad
# Required-Start: $local_fs $syslog $remote_fs bluetooth
# Required-Stop: $local_fs $syslog $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start sixad
### END INIT INFO
#
@Lauszus
Lauszus / pyqtgraph_pyqt5.py
Last active April 22, 2019 02:24
Scatter plot example using pyqtgraph with PyQT5
#!/usr/bin/python3
#
# Scatter plot example using pyqtgraph with PyQT5
#
# Install instructions for Mac:
# brew install pyqt
# pip3 install pyqt5 pyqtgraph
# python3 pyqtgraph_pyqt5.py
import sys
@Lauszus
Lauszus / Makefile
Last active January 30, 2018 17:40
Changes to blhost for Mac
#-----------------------------------------------
# Make command:
# make build=<build> all
# <build>: debug or release, release by default.
#-----------------------------------------------
#-----------------------------------------------
# setup variables
# ----------------------------------------------
@Lauszus
Lauszus / install-8192eu.sh
Created February 1, 2018 13:12
Small script for downloading and installing the drivers for the Realtek RTL8192EU WiFi adapter from http://fars-robotics.net
#!/bin/bash -e
kernel=$(uname -r | tr -d '+')
build=${build:-$(uname -v | awk '{print $1}' | tr -d '#')}
tarfile=8192eu-$kernel-$build.tar.gz
wget http://fars-robotics.net/$tarfile
tar xzf $tarfile
./install.sh
@Lauszus
Lauszus / script.sh
Created March 10, 2018 21:31
Automount bootcamp as needed for VirtualBox
#!/bin/bash -e
diskutil list
read -p $'This script will unmount "/Volumes/BOOTCAMP" and set the permission for the EFI (/dev/disk0s1) and BOOTCAMP (/dev/disk0s3) permissions to executable\nPress enter to continue'
diskutil unmount /Volumes/BOOTCAMP
sudo chmod 777 /dev/disk0s1
sudo chmod 777 /dev/disk0s3
@Lauszus
Lauszus / ap_config.sh
Created April 7, 2018 16:16 — forked from totti2/ap_config.sh
Adding accesspoint-mode to SSRPARI's stretch-branch (found here: https://www.raspberrypi.org/documentation/configuration/wireless/access-point.md)
#!/bin/bash
if [ "$WIFIPASS" == "" ]
then
read -p "Wifi Interface: " WLAN # wlan0, wlan1 etc
read -p "Wifi Network name: " APName
read -p "Wifi Password: " WIFIPASS
fi
if [ -z "$exc" ]
then
source functions.sh
@Lauszus
Lauszus / install-8192eu.sh
Created April 7, 2018 18:31
Script for installing 8192eu kernel module on a Raspberry Pi
#!/bin/bash -e
kernel=$(uname -r | tr -d '+')
build=${build:-$(uname -v | awk '{print $1}' | tr -d '#')}
tarfile=8192eu-$kernel-$build.tar.gz
wget http://downloads.fars-robotics.net/wifi-drivers/8192eu-drivers/$tarfile
tar xzf $tarfile
./install.sh
@Lauszus
Lauszus / README.md
Last active November 5, 2024 19:31
VESC 6 flash bootloader using ST-LINK/V2

Pinout

ST-LINK/V2 VESC
VAPP (pin 1) VCC
TCK_SWCLK (pin 9) CLK
GND (pin 20) GND
TMS_SWDIO (pin 7) IO
NRST (pin 15) RST
@Lauszus
Lauszus / polyfit.py
Last active August 17, 2018 08:36
Modified PX4 polyfit class to use Eigen instead of PX4 Matrix library and added Python version
#!/usr/bin/python
# /****************************************************************************
# *
# * Copyright (c) 2015-2016 PX4 Development Team. All rights reserved.
# *
# * Redistribution and use in source and binary forms, with or without
# * modification, are permitted provided that the following conditions
# * are met:
# *
# * 1. Redistributions of source code must retain the above copyright