In this tutorial I'm going to be showing you how you can send voltage values to your pc using a Pic chip, Wiimote, and Autoit3 scripting language. The process works by wiring a pic chip to the button pads of a wiimote. Then using the pic chips Analog to Digital Converter, we
obtain a 10bit binary value. We will then send that value to Autoit in the form of button presses
using the wiimote as a data interface. On the PC side we will use a library I wrote
to receive the data from the wiimote. The library is basically just a port to Wiiuse by Michael Laforest
set up in a way to make scripting with the wiimote very easy.
Most pic chips are equiped with multiple Analog to Digital channels. This lets us monitor multiple voltages values if we want to. The total amount of channels sampled will depend on different factors like how many channels the chip has. Channels are sampled one at a time so the more voltages you monitor, the less samples per second you get. How the Analog to Digital Converter works
The pic chip A/D Converter works by comparing the voltage you're measuring to a known voltage. In our case the known voltage
is the voltage supply 5v. The 10bit value measured is a ratio of the pic chips known voltage 10bit value. So for example a sample thats 10bit value is 387, the voltage value would be V = (5v/1024) * 387 which equals 1.89v