'Simple BX24 serial example
dim outputBuffer(1 To 13) as byte
dim inputBuffer(1 To 10) as byte
dim output as byte
sub main()
call flashme(6)
' open the input and output buffers:
call openQueue(outputBuffer, 13)
call openQueue(inputBuffer, 10)
' define which pins we'll use for serial in and out:
call defineCom3(11,12,bx1000_1000)
call openCom(3, 9600, inputBuffer, outputBuffer)
do
output = getpin(13) + 48
call putQueue(outputBuffer, output, 1)
loop
End Sub
|