Skip to content

Instantly share code, notes, and snippets.

View rmeissn's full-sized avatar

Roy Meissner rmeissn

View GitHub Profile
@rmeissn
rmeissn / README.md
Last active December 11, 2023 14:32
Flashforge Adventurer 3 Cura

The firmware of the Flashforge Adventurer 3 seems to understand only a subset of typical marlin gcode:

  • no G0 support (use G1 instead)
  • if XYZ coordinates are combined within G1, the bed leveling mesh seems to be ignored (use two G1 (one for Z and one for XY) instead)
  • M140 does not support decimal point numbers (only e.g. S50 instead of S50.0)
  • M104 does not support decimal point numbers (only e.g. S50 instead of S50.0)
  • no relative E value support (cura produces absolute E values either way)
  • a Z-Offset needs to be included in each Z coordinate if required (use cura Z-Offset plugin and tick "extensive z-offset processing")

-> I've created a bash script to convert cura gcode to flashforge gcode. I'm not sure I've covered all edge cases, but it seems to work.

#! /usr/bin/env bash
usage() {
echo "
Bind/unbind a USB device from a given vendor:product id
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-d|--dry-run] [--hdmi|microsd|usba|ssd250] [--detect=deviceid:vendorid] [on|off]
Example usage: $(basename "${BASH_SOURCE[0]}") --hdmi off
Example usage: $(basename "${BASH_SOURCE[0]}") --detect=27c6:609c
" >&2
@rmeissn
rmeissn / outliersFilter.js
Last active July 20, 2021 12:13
A Javascript function to filter an array of values for outliers by using an interquartile filter
function filterOutliers(someArray) {
if(someArray.length < 4)
return someArray;
let values, q1, q3, iqr, maxValue, minValue;
values = someArray.slice().sort( (a, b) => a - b);//copy array fast and sort
if((values.length / 4) % 1 === 0){//find quartiles