Pretty cool :)
Just some nitpicking: You wrote "java" twice, but it's javascript, not java :)
And I think there is a bug in train_direction: if the value is 100, 200, 300, 400 or 500, sendvalue will stay at the initial [0x08, 0x00, 0x81, 0x00, 0x01, 0x51, 0x00, 0x00]. Probably would be hard to move the slider to that exact position, but still :)
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Pretty cool :)
Just some nitpicking: You wrote "java" twice, but it's javascript, not java :)
And I think there is a bug in
train_direction
: if the value is 100, 200, 300, 400 or 500,sendvalue
will stay at the initial[0x08, 0x00, 0x81, 0x00, 0x01, 0x51, 0x00, 0x00]
. Probably would be hard to move the slider to that exact position, but still :)