- Sat May 30, 2020 11:41 am
#42212
I need help to send and receive to/from the HuskyLens using PICAXE BASIC and a PICAXE 20M2 chip or 28X2 chip. The is the programming I've tried, but I see no data back from the HuskyLens.
#picaxe 20m2 ; Define the Processor
hsersetup B9600_4, %00000 ; 9600 baud, non-inverted polarity
;hserout 0,(85,170,17,00,33,49)
hserout 0, (0x55,0xAA,0x11,0x00,0x21,0x31)
;hserin w1 ; HuskyData
debug w1
main: w1 = $FFFF ; set up a non-valid value
hserin w1 ; receive 1 byte into w1
if w1 <> $FFFF then ; if a byte was received
hserout 0,(w1) ; echo it back out
end if
goto main ; loop
#picaxe 20m2 ; Define the Processor
hsersetup B9600_4, %00000 ; 9600 baud, non-inverted polarity
;hserout 0,(85,170,17,00,33,49)
hserout 0, (0x55,0xAA,0x11,0x00,0x21,0x31)
;hserin w1 ; HuskyData
debug w1
main: w1 = $FFFF ; set up a non-valid value
hserin w1 ; receive 1 byte into w1
if w1 <> $FFFF then ; if a byte was received
hserout 0,(w1) ; echo it back out
end if
goto main ; loop