Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
arduino and node - saving raw data as a file
var fs = require('fs');
var writeStream = fs.createWriteStream(__dirname + 'jpeg.jpg');
serialPort.on('data', function(data) {
// data is: FF D8 ...
writeStream.write(new Buffer(data, 'hex'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.