The Story of My ECG
Monster 4 - No, these aren't Digimons
I am not being completely truthful here. I didn't just build the analog circuit and magically it worked. I had to program a little Visual Basic so I could debug what's wrong with all of my previous analog designs. However, let's just pretend that I built the analog portion and now I need to do the Visual Basic (digital) part.
You've got analog - the computer's digital....how?
I needed a way to interface the amplified analog signal, and display it on my computer. However, I didn't want to go out and spend $3 on a nifty Analog-to-Digital converter. Remember....cheap, cheap, cheap! I realized that I could use my computer's sound card as a natural Analog-to-Digital converter. In addition, this thing is 16-bits accurate, high speed, and almost everyone has one. So, that was my plan, and I stuck with it.
It had been years since I programmed in Visual Basic, but I knew that would be the easiest and fastest way for me to program a nice graphical user interface. So I pulled out my dusty textbooks and started programming again. Unfortunately, I had no experience getting data from a computer's sound card. Luckily, someone had already developed a similar program. (Thanks Murphy McCauley!) I used Murphy's code a lot in debugging my code and figuring out how DLL's work. Eventually, I figured out how to get data from the input of the sound card. With the hard part behind me, I put together a simple graphical output. Here's the code:
Private Sub Form_Load()
MsgBox "Hello World!"
End Sub
Simple, huh? No, the real code is in this secret zip file. As well as a precompiled .exe