Shop OBEX P1 Docs P2 Docs Learn Events
programming help for piezoelectric film sensor — Parallax Forums

programming help for piezoelectric film sensor

ArchiverArchiver Posts: 46,084
edited 2002-10-11 23:44 in General Discussion
I am working on a project with a BS2, a piezo film sensor, and a
soundmod app. The idea is that when the sensor is pressed, it sends
a signal to the soundmod app which then in turn plays a recording.
(I've also got a 5.1v zener diode and a 10k resistor to eliminate any
charge buildup). I've got the soundapp working but i cannot figure
out the code to allow the stamp to read the piezo sensor. If, for
example the sensor is attached to Pin3, I know the stamp must
constantly be scanning pin 3 for any voltage changes that might
occur. I'm pretty sure something like:
IOPin3 var bit
Loop:
IOPin3=In3
(then i put the code in where it detects pressure -- this is where
I'm really lost)
goto Loop

Does anyone has any advice on how to program this?
Thanks.
Sign In or Register to comment.