Skip to content

Instantly share code, notes, and snippets.

@MarkJB
MarkJB / gcodeSender.pde
Created February 13, 2020 21:15
Processing gcode sender thing (first pass at sending gcode to grbl)
import processing.serial.*;
Serial myPort = new Serial(this, "COM6", 115200);
int counter =0;
boolean grblInit = false;
void senderInit(String initCommand) {
println("In init");
String val = "";
while (myPort.available()==0){println("waiting for serial port");}
#include "ofApp.h"
using namespace ofxCv;
using namespace cv;
void ofApp::gcode() {
vGcode.clear(); //Make sure our list of gcode stuff is empty
// Iterate over each blob in contourFinder
[14:34:32:253] echo:Hardcoded Default Settings Loaded␊
[14:34:32:254] ok␊
[14:34:34:465] echo:Settings Stored (614 bytes; crc 15129)␊
[14:34:34:482] ok␊
[14:34:38:920] echo:DEBUG:INFO,ERRORS,DRYRUN,COMMUNICATION,LEVELING␊
[14:34:38:921] ok␊
[14:34:42:577] echo:Home XYZ First␊
[14:34:42:578] >>> G28␊
[14:34:42:578] Machine Type: Cartesian␊
[14:34:42:582] Probe: FIX_MOUNTED_PROBE␊
/**
* Marlin 3D Printer Firmware
* Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
@MarkJB
MarkJB / pizero_usb_internet.sh
Last active January 16, 2017 23:09 — forked from lurch/pizero_usb_internet.sh
Script to automatically provide internet access to a PiZero connected to a Linux host over a USB-network (only tested on Ubuntu 14.04)
#!/bin/bash
# Automatically setup routing and DNS for a PiZero connected over a USB-network
# NOTE: Before running this script for the first time, you need to run the
# following two commands on your Linux PC
# sudo sysctl -w net.ipv4.ip_forward=1
# sudo iptables -t nat -A POSTROUTING -s 169.254.0.0/16 -o eth0 -j MASQUERADE
# (replace eth0 in the second command with your internet-facing network device,
# e.g. wlan0 on a laptop)
# The Avahi-discovered hostname