edison-js / Edison

💡Edison can controll microcomputer with TypeScript and React💡
https://edison-js-document.vercel.app/
MIT License
45 stars 6 forks source link

If two input devices are used, one of them will not work. #76

Closed yoshihikko-kodaira closed 4 months ago

yoshihikko-kodaira commented 4 months ago

(exanple)

import { Board, Button, Led, render } from "edison"
import React from "react"

const App: React.FC = () => {
return (
    <Board port={'/dev/ttyUSB0'}>
      <Button
        pin={9}
        onPress={handlePress}
        onRelease={handleRelease}
      >
        <Led
          pin={5}
          isOn={isOn}
        />
      </Button>

      <InfraredObstacleAvoidance
        pin={12}
        onPress={handlePress1}
        onRelease={handleRelease1}
      >
        <Led
          pin={13}
          isOn={isOn1}
        />
      </InfraredObstacleAvoidance>
    </Board>
  )
}

render(<App />)
yoshihikko-kodaira commented 4 months ago
console.log(data)
<Buffer 91 12 00 91 12 00 91 12 00 91 12 00>
AllenShintani commented 4 months ago

Thanks for your reporting! Can you fix it? if you can't this issue, I will do that👍

AllenShintani commented 4 months ago

The issue is resolved! Thank you so much https://github.com/edison-js/Edison/pull/77