const sendCommand = (speed, angle) => { robot.sendCommand(DRIVE, [uB(speed), lB(speed), uB(angle), lB(angle)]) }
startByte: 0x03, numBytes: 2 }, { name: 'humidity', startByte: 0x02, numBytes: 2 }, { name: 'proximity', startByte: 0x02, numBytes: 2 } ] var robot = new RobotSerialInterface() // Start the interface... robot.start(SERIAL_PORT, SERIAL_OPTIONS, SENSORS) robot.on('temperature', function (temp) { console.log('Temperature: %d', temp) }) robot.on('humidity', function (hum) { console.log('Humidity: %d', hum) }) robot.on('proximity', function (speed) { console.log('Proximity: %d', speed) })