SolidWorksMagi
Senior Member
Hi,
I have a program that passes data to the PICAXE 28X2 module to react to colors seen in the PIXY CMUcam5. That program works. Now I'm trying to retrieve data from the PICAXE 28X2 module to the PC terminal to see if I can sort out how the PIXY CMUcam5 might drive a robot base to stay following a line. Problem is the program halts at the point after "sertxd("The 3rd Send Data",13,10)" ... I never see any of the PIXY CMUcam5 data ... you can see my results in the attached image below. I hope somebody can tell me how to fix the program.
; 28X2+PIXY+TerminalWindowTests.bas
#picaxe 28X2 ; Define the Processor Type
#terminal 9600
pause 10000
sertxd("The 1st Send Data",13,10)
Symbol RX_PIN = C.3
Symbol RX_BAUD = T9600
symbol WLEDs = B.4
symbol LWheel = B.1
symbol RWheel = B.0
symbol i = b0
symbol range = b15
sertxd("The 2nd Send Data",13,10)
pause 2000
do
gosub Look
pause 2000
sertxd("The 6th Send Data",13,10)
pause 2000
loop
Look:
gosub white
;gosub ChkDist ; Check the Parallx PING to be sure there is nothing in front
sertxd("The 3rd Send Data",13,10) ; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Hangs Up after this step.
; Fetch PIXY CMUcam5 data
SerIn RX_PIN, RX_BAUD, ($AA), b1, b3,b2, b5,b4, b7,b6, b9,b8, b11,b10, b13,b12
pause 5000
sertxd("The 4th Send Data",13,10)
SerTxd (#b1, #b3,#b2, #b5,#b4, #b7,#b6, #b9,#b8, #b11,#b10, #b13,#b12,13,10,13,10)
sertxd("The 5th Send Data",13,10)
return
white:
high WLEDs
return
I have a program that passes data to the PICAXE 28X2 module to react to colors seen in the PIXY CMUcam5. That program works. Now I'm trying to retrieve data from the PICAXE 28X2 module to the PC terminal to see if I can sort out how the PIXY CMUcam5 might drive a robot base to stay following a line. Problem is the program halts at the point after "sertxd("The 3rd Send Data",13,10)" ... I never see any of the PIXY CMUcam5 data ... you can see my results in the attached image below. I hope somebody can tell me how to fix the program.
; 28X2+PIXY+TerminalWindowTests.bas
#picaxe 28X2 ; Define the Processor Type
#terminal 9600
pause 10000
sertxd("The 1st Send Data",13,10)
Symbol RX_PIN = C.3
Symbol RX_BAUD = T9600
symbol WLEDs = B.4
symbol LWheel = B.1
symbol RWheel = B.0
symbol i = b0
symbol range = b15
sertxd("The 2nd Send Data",13,10)
pause 2000
do
gosub Look
pause 2000
sertxd("The 6th Send Data",13,10)
pause 2000
loop
Look:
gosub white
;gosub ChkDist ; Check the Parallx PING to be sure there is nothing in front
sertxd("The 3rd Send Data",13,10) ; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Hangs Up after this step.
; Fetch PIXY CMUcam5 data
SerIn RX_PIN, RX_BAUD, ($AA), b1, b3,b2, b5,b4, b7,b6, b9,b8, b11,b10, b13,b12
pause 5000
sertxd("The 4th Send Data",13,10)
SerTxd (#b1, #b3,#b2, #b5,#b4, #b7,#b6, #b9,#b8, #b11,#b10, #b13,#b12,13,10,13,10)
sertxd("The 5th Send Data",13,10)
return
white:
high WLEDs
return