QuickStart Candle
Circuitsoft
Posts: 1,166
I suppose it's probably moisture sensing. Anyway, run this on a quickstart. The last LED lights up. If you blow on the button next to it, it will dim, and it may take some time for it to recover.
CON _XINFREQ = 5_000_000 'Propeller Processor Crystal value (5MHz) _CLKMODE = XTAL1 + PLL16X 'Set PLL value to X16 to get an 80MHz (5MHz x 16 = 80MHz) clock SensePin = 0 'ADC INPUT pin DrivePin = 16 'ADC OUTPUT pin VAR PUB CapsenseDemo | time outa[SensePin] := 1 dira[SensePin] := 1 dira[DrivePin] := 1 cognew(@DriveLED, 0) repeat dira[SensePin] := 1 dira[SensePin] := 0 waitcnt(cnt+(clkfreq/500)) DAT DriveLED org mov dira,tmp Loop mov tmp,ina shl tmp,#16 mov outa,tmp jmp #Loop tmp long |<16
Comments
Or perhaps it could be sensing BAC Sorry, Circuitsoft, I couldn't resist
So has anyone actually found this amusing, or is it just me?