Spin Code for Flexiforce Sensor
NWCCTV
Posts: 3,629
Does anyone know if there is Spin or SimpleIDE C code for the Parallax Flexiforce Sensor?
NWCCTV
Posts: 3,629
Comments
OBJ pst : "FullDuplexSerial" rc : "RCTime" CON _clkmode = xtal1 + pll16x _xinfreq = 5_000_000 PUB Go | Sense pst.start(31, 30, 0, 115200) repeat rc.rctime(0, 1, @Sense) ' Flexiforce to pin 0, read rc pst.Str(String("Value: ")) pst.dec(Sense / 100) ' Display rc time decay in Sense var pst.tx(13) waitcnt(clkfreq / 2 + cnt) ' 1/2 second delayDo you have a Propeller board with an ADC input? If so, you can use the Flexiforce as you would any variable resistor for ADC. For PropC, you could use any of the examples Andy has done that use the ADC inputs of the PAB or PropBOE. Go through the Learn examples -- the latest are on learn.parallax.com.