« Perspectives | Main | Korean Electro- Acoustic »
September 29, 2005
Analog In
Variables
Variables are places in computer memory for storing changing information.
Analog In
When we want to measure variably changing conditions like this, we need analog inputs.
Digital = on or off, 1 or 0 (things such as a switch)
Analog = the range between on and off (we can get all the different ranges between 1 and 0, such as the wall clock)
All analog inputs are on the upper left pins of the PIC.
Since we are using analog ins (variable resistors such as the pot, flex sensors, force senors etc, we need to know what the ranges are)
To see that, I connected a serial cable to the board and the computer and had the computer print out the values.
Download file
The beginning part of the code is to set the chip so that it does the analog ins.
Serial cable connected the board and you see the 10K potentiometer on the upper left on the analog pins.

You can have the pic printout whatever you tell it to. Pretty cool.

Also, depending on the variable resistor (see here for different resistors that could be used) that you are using, you may need a pull down resistor. I used the 10K for certain variable resistors.
I got tired of having to cram everything onto one board, so I connected another to make more space for my LEDs and other outputs.

There go my lights!

Using Force Sensors.

I got the range from my pot and linked them up accordingly with the LEDs.Download file
Posted by min at September 29, 2005 03:43 PM