Help with drivers

[deleted] I’m an idiot.

Dang, now no one will be able to say “I could have told him that!” :slight_smile:

1 Like

That’s no fun. There isn’t even a cool gif saying “Deleted!”

Here is one for you.


Mike, have you seen sandify? Would you want to help me incorporate some of your pretty designs into that? I have ob my list to add some simple cycloids. Since you’re writing in node.js, it must be close to a copy-paste.

I have done a bunch of work to manage boundaries well with gcode, and the web interface of course. Those might be helpful for you (and it’s MIT license, so you could take that without contributing back).

There is plenty of interest in running sandify from a pi using node.js and connecting directly to Marlin. If you have that worked out, that would be another awesome contribution.

Hey, I’m certainly up for sharing my work once I’m happy with it. Most of what I’ve been working on lately is to use genetic algorithms recreate photos/images using a single path - this is an example of an earlier version of one of the algorithms:

Looks like Sandify is React based which is great - I use React a lot at work. I’ll get stuck in when I get time.


For anyone reading this in the future, communicating to marlin from node is super easy:

const SerialPort = require('serialport');
const Readline = SerialPort.parsers.Readline;

// get a list of possible ports

// or just connect
const settings = {
    baudRate: 250000,
    autoOpen: false

const connection = new SerialPort('/dev/tty.usbmodem14201', settings);
connection.on('open', (...args) => console.log('open', args));
connection.on('close', (...args) => console.log('close', args));
connection.on('error', (...args) => console.log('error', args));

const parser = connection.pipe(new Readline({ delimiter: '\n' }));
parser.on('data', console.log); => console.log('connected'));

// send a command
setTimeout(() => {
    connection.write('G0 X10 Y10\n');
}, 5e3);

If you send a command and it was successfully added to the buffer, marlin will send ‘ok’. If the buffer it’ll respond with another message (can’t remember what it says), and you’ll need to wait until you know the buffer is clear before sending another message.

Awesome! Just don’t make fun of me. I use C++ at work…

I have been meaning to poke around at CNC.js code to see what they are doing. Sending the first line doesn’t seem like the hard part, it’s waiting for the buffer, and adding stop, pause type of logic. I’m sure it’s not as hard as I’m thinking it will be.

This is really cool. The single path is a nice additional challenge. I am sure that is a fun project and I look forward to reading it.