I have for some time been trying to get an 18M2 to respond to the A1120EUA-T Hall effect switch with no success.
I have tried using count and pulsin to measure the frequency on the device but couldn't get this to work.
My latest attempt below reads the port directly but doesn't work either.
Any help would be greatly appreciated
Thanks in anticipation.
I have tried using count and pulsin to measure the frequency on the device but couldn't get this to work.
My latest attempt below reads the port directly but doesn't work either.
Any help would be greatly appreciated
Code:
main:
let dirsB = 255
SYMBOL Delay = b1
SYMBOL Rotation = b2
Delay =20
start:
'c.0,100,Rotation
if pin c.0 = 1 then
let outpinsB = %00000001
pause Delay
let outpinsB = %00000010
pause Delay
let outpinsB = %00000100
pause Delay
let outpinsB = %00001000
pause Delay
let outpinsB = %00010000
pause Delay
let outpinsB = %00100000
pause Delay
let outpinsB = %01000000
pause Delay
let outpinsB = %10000000
pause Delay
end if
goto start
Last edited by a moderator: