Shop OBEX P1 Docs P2 Docs Learn Events
MIDI out can''t coexist with other form of outputs — Parallax Forums

MIDI out can''t coexist with other form of outputs

ArchiverArchiver Posts: 46,084
edited 2002-04-06 21:55 in General Discussion
Ok I have a school project which is using 8 pins to trigger 8 24 volt
relays (with the use of transistors) and it also sends out 10
different midi velocities formsomething else. The problem that I'm
having is that neither of these can coexist for some reason. When
only the midi is running everything works fine and when only the 8
outputs are running every relay switches fine. As soon as everything
is plugged in, the midi stops working after 5-10 seconds. I just
wanted to know f someone can look at the code and tell me if there's
anything wrong or not. Thanks!

Here's the sample:

note: I'm simply reading to values that are coming in on pins 1 and 2
and based on the values toggling certain pins and sending certain
midi velocities.

MAINLOOP:
..
...
....

control = sensorX - sensor Y (the sensors work fine)

IF control < 2000 THEN goto setup1
IF control.....

setup1:

HIGH 1
HIGH 2
HIGH 3
HIGH 4
LOW 5
LOW 6
LOW 7
LOW 8
serout 15,$8000+12,0,[noparse][[/noparse]144,0,127]
serout 15,$8000+12,0,[noparse][[/noparse]144,1,127]
serout 15,$8000+12,0,[noparse][[/noparse]144,2,127]
serout 15,$8000+12,0,[noparse][[/noparse]144,3,127]
serout 15,$8000+12,0,[noparse][[/noparse]144,4,127]
serout 15,$8000+12,0,[noparse][[/noparse]144,5,0]
serout 15,$8000+12,0,[noparse][[/noparse]144,6,0]
serout 15,$8000+12,0,[noparse][[/noparse]144,7,0]
serout 15,$8000+12,0,[noparse][[/noparse]144,8,0]
serout 15,$8000+12,0,[noparse][[/noparse]144,9,0]

Goto MAINLOOP

setup2:

..
...
....
Sign In or Register to comment.