You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-- Attach a hall effect switch is attached to GPIO26s=sensor.attach("HALL_SWITCH", pio.GPIO26)
s:callback(
function(data)
if (data.on==1) thenprint("on")
elseif (data.on==0) thenprint("off")
endend
)