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);
        }

    } 
}