import { spawn } from 'child_process'; export default function serial(opts) { return { pttDown: () => { spawn('./ptt_daemon', [opts.serial.port, '1']); }, pttUp: () => { spawn('./ptt_daemon', [opts.serial.port, '0']); } }; };