By Chang Soo Lee
This code reads a force sensing resistor as a digital input. The FSR is connected as one side of a Voltage Divider (the side connected to voltage). When the resistance is low enough, the input pin reads high.
Back to FSR Report.
'This code is for digital inout 'Using FSR and LED 'by Chang Soo Lee 'ITP, NYU TRISB = %11111111 TRISD = %00000000 main: if portb.3 = 1 then portd = %00000001 else PORTD = %00000000 endif goto main