When it comes to analog input, it doesn't get any easier than a basic potentiometer. Nicknamed "pots," these components are variable resistors. With a twist of their knob you alter the amount of voltage that flows out through their center pin. If you've ever adjusted a volume dial chances are, you were using a potentiometer.
Potentiometers can be used for setting a level, determining an angle or just as a simple user interface adjustment. Because you can set them immediately to a value that they'll hold indefinitely, pots are terrific for prototyping and testing. Use them as a stand-in for any kind of analog input. Let's get started and add them to your development toolkit!
To hook up a potentiometer you'll need:
You'll configure the radio using your free Device Cloud account. (Note that radios can also be configured using XCTU.)
NOTE: If your radio was recently configured by the XBee Wi-Fi Cloud Kit then the sampling rate and pin settings are already set. You can safely skip these steps.
You will build this sensor circuit using the XBee Development Board.
You will use the XBee Wi-Fi Cloud Kit's web application to configure a widget for viewing the potentiometer readings.
Your potentiometer settings are now instantly transmitted to the web. You can turn the knob directly to affect the gauge, and the new setting will be maintained until the knob gets moved again. This is terrific for testing out new circuits, but potentiometers can also be used to control an online setting, monitor anything that rotates, or as an input to a game that joins the physical and virtual worlds together. Once you're satisfied that your prototype creation is working well, try replacing the pot with a light or temperature sensor to create an input that reacts to real-world environments.