monteslu / remote-io

Remote control ANY Johnny-Five IO class via a virtual serialport
22 stars 0 forks source link

Remotio with raspi-io returns unhandled sysex with PWM #3

Closed virgilvox closed 9 years ago

virgilvox commented 9 years ago

Raspi-io PWM was fixed in latest 2.0.6, tested with basic analogwrite with success, except...

When sending message to servowrite or analogwrite returns this.

2 byte check [ 244, 24 ]
MIDI 244
MIDI_REQUEST[PIN_MODE] 24 3
MIDI_REQUEST[PIN_MODE] write
remote data in <Buffer f0 6f 18 5a 00 f7> 6
unhanled sysex [ 240, 111, 24, 90, 0, 247 ]
remote data in <Buffer f0 6f 18 5a 00 f7> 6
unhanled sysex [ 240, 111, 24, 90, 0, 247 ]
remote data in <Buffer f0 6f 18 5a 00 f7> 6
unhanled sysex [ 240, 111, 24, 90, 0, 247 ]
monteslu commented 9 years ago

Was missing EXTENDED_ANALOG (pin higher than 15) handling.

Pushed a new version, give it another shot.

virgilvox commented 9 years ago

Excellent! PWM works, but only one channel it seems.

If I'm setting it up to talk to wiring pin 24 and wiring pin 26 I get weirdness.

At first triggering pin 24 makes one of the servos move, trigger pin 26 to 0 makes the same servo stop, but then when i go to press for pin 24 again I get attempt to write to a destroyed prehipheral

SYSEX_REQUEST[EXTENDED_ANALOG] pin 26 value 90
error handling sysex [Error: Attempted to write to a destroyed peripheral]
handled
remote data in <Buffer f0 6f 1a 5a 00 f7> 6
handling sysex <Buffer f0 6f 1a 5a 00 f7> <Buffer 6f 79>
SYSEX_REQUEST[EXTENDED_ANALOG] pin 26 value 90
error handling sysex [Error: Attempted to write to a destroyed peripheral]
handled
remote data in <Buffer f0 6f 18 00 00 f7> 6
handling sysex <Buffer f0 6f 18 00 00 f7> <Buffer 6f 79>
SYSEX_REQUEST[EXTENDED_ANALOG] pin 24 value 0
handled
remote data in <Buffer f0 6f 18 0f 00 f7> 6
handling sysex <Buffer f0 6f 18 0f 00 f7> <Buffer 6f 79>
SYSEX_REQUEST[EXTENDED_ANALOG] pin 24 value 15
handled
remote data in <Buffer f0 6f 18 00 00 f7> 6
handling sysex <Buffer f0 6f 18 00 00 f7> <Buffer 6f 79>
SYSEX_REQUEST[EXTENDED_ANALOG] pin 24 value 0
handled
remote data in <Buffer f0 6f 1a 5a 00 f7> 6
handling sysex <Buffer f0 6f 1a 5a 00 f7> <Buffer 6f 79>
SYSEX_REQUEST[EXTENDED_ANALOG] pin 26 value 90
error handling sysex [Error: Attempted to write to a destroyed peripheral]
handled
virgilvox commented 9 years ago

Are you setting pinMode at all?

monteslu commented 9 years ago

I dont automatically set pin modes, so you might need to manually do it first.

monteslu commented 9 years ago

Was a raspi-io issue that has been fixed.