improve DigitalReadSerial js