New Thread Re CMPS14 Compass
Compass was working very well into terminal
This compass is highly accurate
Now getting Timedout in terminal
Tried several 08M2 and 2 Compass Modules
Checked Terminal and Downloads OK
Compass was working very well into terminal
This compass is highly accurate
Now getting Timedout in terminal
Tried several 08M2 and 2 Compass Modules
Checked Terminal and Downloads OK
Code:
;Latest Iteration of CMPS14 compass test
;with Great Help from "Hippy'
#Picaxe 08M2
#Terminal 4800
#No_Data
;Dated 25-12-2019
;--------------Compass PORT
Symbol TX_PIN = C.1 ;CMPS14 TX PIN 9600"Green"
Symbol RX_PIN = C.2 ;CMPS14 RX PIN 9600"Yellow"
;----------------
Symbol direction = w1 ; b3:b2
Symbol dir.lsb = b2
Symbol dir.msb = b3
;--------------------------------------------
;Power On Reset:
Pause 2000
SerTxd( "Started", CR, LF )
;---------------------Cut----------------------------
MainLoop:
;----------------------------------------------
Do
High TX_PIN
SetFreq M32
Pause 100
SerOut TX_PIN, T9600_32, ( $13 ); Get Bearing CMPS Code 0x13
SerIn [16000,TimedOut], RX_PIN,T9600_32, dir.msb, dir.lsb
SetFreq MDEFAULT
Pause 100
SerTxd("Degrees = ",#direction,CR,LF);Output to Terminal
Pause 5000;5 Second Pause
Loop
Timedout:
SetFreq MDEFAULT
Pause 100
SerTxd( "Timed out", CR, LF )
Goto MainLoop
Last edited by a moderator: