contact info:
info@blueink.com

Blueink.com
3014 Bluff #101
Boulder CO 80301

'BX-24 Serial string example
' A note about serial connections to the PC- if you are sending string
'variables.. make sure to set your compiler to allow you to send the
'maximum string length possible. (otherwise you strings will be truncated)
'to do this. go to the BX- compiler PROJECT menu- select "Files". In
'the file window, change the box 'Variable String Length" to = 64
'Jen Lewin
'------------------------------------------
dim outputBuffer(1 To 45) as byte
'note: 45 = my total string length (below) plus 8 (for queue pointer)
'remember!! you change this value here, you must change it below!!!
dim inputBuffer(1 To 13) as byte
dim myString As String

sub main()
call flashme(6)

' open the input and output buffers:
call openQueue(outputBuffer, 45)
call openQueue(inputBuffer, 13)


' define which pins we'll use for serial in and out:
call defineCom3(11,12,bx1000_1000)
call openCom(3, 9600, inputBuffer, outputBuffer)

'clear terminal screen- the ASCII for dec 12 is FF(which clears the
'terminal screen.
call putQueueStr(outputBuffer, chr(12))

do


myString = "hello world!" & " the switch state: " & cstr(getPin(13))
call putQueueStr(outputBuffer, myString)

' Append carriage return and line feed
call putQueueStr(outputBuffer, chr(10) & chr(13))

loop

End Sub