Page 1 of 1

PICAXE BASIC + PICAXE 20M2 chip + HuskyLens

Unread postPosted:Sat May 30, 2020 11:41 am
by wperko
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

Re: PICAXE BASIC + PICAXE 20M2 chip + HuskyLens

Unread postPosted:Tue Jun 02, 2020 2:43 am
by nana.wang
Hi, please try the code from the wiki and check the result.

Re: PICAXE BASIC + PICAXE 20M2 chip + HuskyLens

Unread postPosted:Tue Jun 02, 2020 11:27 am
by wperko
nana.wang wrote:
Tue Jun 02, 2020 2:43 am
Hi, please try the code from the wiki and check the result.
Hi, I DO NOT have an Arduio or Raspberry PI. I do not use c language. I am using PICAXE BASIC editor to write a program for the HuskeyLens, but I am having trouble figuring out the initial communications with the HuskyLens to a PICAXE 20M2 chip.

PICAXE Editor: http://www.picaxe.com/Software

PICAXE BASIC Commands: http://www.picaxe.com/BASIC-Commands

PICAXE 20M2 chip: http://www.r2pv1.com/PICAXE20M2/images/20m2.jpg