Flexiforce sensor- output to terminal issue
beckerwv
Posts: 7
Hi All,
I am a bit new here and am hoping I can get some help reading the Flexiforce sensor. I am trying to output to the Propeller serial terminal and getting either garbage or '0' every time.
I am using the Propeller Board of Education (BOE) and have it set up like this:
flexiforce.sample2.spin
The code in Flexiforce_Simple2 displays this output:
Flexiforce_test.spin
The code in Flexiforce_test displays this output:
I am expecting some sort of number to be displayed. The harder I press the sensor the faster the lines of data are displayed.
I guess I am just missing something simple.
Thanks for any help you can give!
I am a bit new here and am hoping I can get some help reading the Flexiforce sensor. I am trying to output to the Propeller serial terminal and getting either garbage or '0' every time.
I am using the Propeller Board of Education (BOE) and have it set up like this:
flexiforce.sample2.spin
The code in Flexiforce_Simple2 displays this output:
¬±µµ
¬±µµ
¬µµµ
¨µµµ
¬µµ±
¬±µµ
¨±µµ
¬±µµ
¨±µµ
¬±µµ
¬
µµµ ¬±µ± ¬±µµ ¬±µ± ¬±µµ ¬±µ± ¬±µ± ¬µµµ ¬±µ± ¨±µµ ¨±µ
µ ¬±µµ ¨±µµ ¬µµµ ¬±µµ ¬±µµ ¬µµµ ¬±µµ ¨±µµ ¬µµµ ¬±µ±
¬±µµ ¬±µµ ¨±µ± ¬±µµ
µµµ ¬±µ± ¬±µµ ¬±µ± ¬±µµ ¬±µ± ¬±µ± ¬µµµ ¬±µ± ¨±µµ ¨±µ
µ ¬±µµ ¨±µµ ¬µµµ ¬±µµ ¬±µµ ¬µµµ ¬±µµ ¨±µµ ¬µµµ ¬±µ±
¬±µµ ¬±µµ ¨±µ± ¬±µµ
Flexiforce_test.spin
The code in Flexiforce_test displays this output:
TESTING
TIME = 0
TIME = 0
TIME = 0
TIME = 0
TIME = 0
TIME = 0
TIME = 0
TIME = 0
I am expecting some sort of number to be displayed. The harder I press the sensor the faster the lines of data are displayed.
I guess I am just missing something simple.
Thanks for any help you can give!
spin
738B
Comments
CON
XINFREQ = 5_000_000
CLKMODE = XTAL1 + PLL16X
These tell the program what the crystal speed is and how fast you want the system clock to be (80_000_000 is standard ... 5MHz x 16). The default is to use the built in RCFAST clock which is not accurate enough to transmit data to a PC.
In both programs, you're not calling RCTIME properly. do: RCT.RCTIME( pin, 1, @RCTIMEValueAddress)
That worked!! Thank you so much!!!