I am trying to receive a integer numeric data using the serin command on the Atom Pro on the bot board, but the data is not read in from the Basic Micro Aom IDE. . Only the serout command works well. The test program is as follows:
old var byte
new var byte
main
serout S_OUT, I8N1_2400, “Enter which LED to light(0-7): “, 10, 13]
serin S_IN, I8N1_2400, 5000, expd, [dec new]
new=new+1
serout S_OUT, I8N1_2400, “Return value is: “, new, 10, 13 ]
My Brat program uses some serial input between the Atom Pro and a VB program on the PC. I have some lines in my code that looks like:
[code] ;
; now lets try to get some serial input from our Host PC
;
serin s_in, i2400, 250, GCHTimeout, [sdec GHCCnt]
; Ok we got a count. If it is -1 then it is a do immediate!
if GHCCnt = -1 then
; now lets try to get some serial input from our Host PC
serin s_in, i2400, 5000, GCHTimeout, [sdec GHCVals(0), sdec GHCVals(1),sdec GHCVals(2),sdec GHCVals(3),sdec GHCVals(4),sdec GHCVals(5),sdec GHCTime]
…
[/code]
When you enter the number on your PC, did you hit the CR? Or at least some other character that is not a number. The second Serin in my above code the numbers are seperated by commas.