Shop OBEX P1 Docs P2 Docs Learn Events
Using Piezo element with BS2 — Parallax Forums

Using Piezo element with BS2

TonyATonyA Posts: 226
edited 2005-09-05 19:09 in BASIC Stamp
Hi,

I am interested in using a piezo element to pickup vibrations from a guitar and then use pulsin to trigger midi messages from the BS2 out.

Could I use a piezo element from radio shack. If so would I need to amplify the voltage before it enters the stamp?

I tried previously to use an opamp with a schmitt trigger IC to convert the raw voltage from a guitar output jack into a square wave. Then that square wave read by the stamp using pulsin. I just plugged a guitar into an op amp and schmitt trigger and then ---> the stamp. The line level signal was too weak for some reason and I could barely read the voltages untill I hooked up a guitar preamp. I was trying to read individual frequencies with this. (Note frequencies from an electric guitars output jack. The stamp was able to read frequencies but only after I ridiculously amplified the signal before going into the stamp.)

I used this code from Gillilands book:

x var word

Main:
pulsin 0,1,x
x=x*2
debug?x
goto Main

I've scanned a page with the schem and code from Gillilands book (the MicroController App. Cookbook 2).

Is it easier than doing the above? (Piezo --->stamp (pulsin), or use "IN" and somekind of IF statement to send my midi messages out? Right now.

like:

IF IN0 = 1 THEN
Serout [noparse][[/noparse]status byte, data byte, data byte,]

Would that work?


Thanks,
Tony

Post Edited (TonyA) : 9/5/2005 5:45:04 PM GMT
752 x 944 - 62K

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-09-05 18:53
    Tony,

    ·· Is this related to your post in the Sandbox?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • TonyATonyA Posts: 226
    edited 2005-09-05 19:09
    Hi Chris,

    Yes, I guess it is. I thought I'd post here since I had some specific BS2 programming questions.

    Thanks,
    Tony

    Post Edited (TonyA) : 9/6/2005 12:33:50 AM GMT
Sign In or Register to comment.