Initial commit of work directory

This commit is contained in:
2026-01-17 15:31:46 +01:00
parent 7b6f164130
commit 16b15a5307

27
robot/ComSender.js Executable file
View File

@@ -0,0 +1,27 @@
const fs = require('fs');
module.exports = class ComSender{
constructor(){
}
moveTo(mOld, mNew){
try {
const fd = fs.openSync('/dev/tty0', 'w'); // may require root
fs.writeSync(fd, 'Hello console from Node.js!\n');
fs.closeSync(fd);
console.log('Wrote to /dev/tty0');
} catch (err) {
console.error('Failed to write to /dev/tty0:', err);
}
}
}