You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • Hi Martin,

    I can't actually remember if anyone has used DMX before, but I'm quite interested in getting something working (I have some kit here already)... You should be able to send a 513 character string in one chunk pretty easily, so DMX output should be trivial (although the 128 byte output buffer will mean that you code will block until most of the DMX data is sent unless you send it in chunks).

    On the input side, Espruino has a 512 byte input buffer so getting reliable data in shouldn't be too hard either as long as your code doesn't block for too long. The only potential issue would be in detecting the gap between frames - if it's the minimum of 88us then you might have to resort to some external hardware (a capacitor + resistor) to detect the gap so that a function like setWatch will work.

    So yes, it should be fine - getting RX and TX at the same time might take a bit more fiddling, but should still be possible.

    The only potential problem area is if you were to try and control WS2811 LEDs - because in order to get the output speed high enough, Espruino has to disable interrupts when writing to them - which means it'd lose characters of serial data.

About

Avatar for Gordon @Gordon started