analog-in_digital-out_potentiometer_and_leds
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionLast revisionBoth sides next revision | ||
analog-in_digital-out_potentiometer_and_leds [2016/11/01 15:42] – created dwallace | analog-in_digital-out_potentiometer_and_leds [2016/11/09 13:36] – dwallace | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Analog-In/ | ====== Analog-In/ | ||
- | ==Intro== | + | ===== Intro ===== |
- | HiTechnic' | + | |
- | < | + | |
- | The files to accompany the HiTechnic Prototype Board (old version, not " | + | |
- | [[File: | + | |
- | < | + | |
- | The PDF handbook included in the file above can also be downloaded here:< | + | |
- | [[File: | + | |
- | ==Wiring== | + | HiTechnic' |
- | {|style=" | + | |
- | |- | + | |
- | !style=" | + | |
- | !style=" | + | |
- | |- | + | |
- | | 220 Ohm Resistor | + | |
- | | 6 | + | |
- | |- | + | |
- | | 10k Potentiometer | + | |
- | | 1 | + | |
- | |- | + | |
- | | LED | + | |
- | | 6 | + | |
- | |} | + | |
- | < | + | |
- | The six LEDs are connected to six pins that will act as a digital out. The potentiometer' | + | |
- | For example, when the pin A0 reads a voltage corresponding | + | |
- | <source lang="c" | + | The files to accompany the HiTechnic Prototype Board (old version, not "SuperPro") can be found on [[http:// |
+ | {{file: | ||
+ | |||
+ | The PDF handbook included in the file above can also be downloaded here: | ||
+ | {{file: | ||
+ | |||
+ | ===== Wiring ===== | ||
+ | |||
+ | |||
+ | * 220 Ohm Resistor (6) | ||
+ | |||
+ | * 10k Potentiometer (1) | ||
+ | |||
+ | * LED (6) | ||
+ | |||
+ | The six LEDs are connected to six pins that will act as a digital out. The potentiometer' | ||
+ | For example, when the pin A0 reads a voltage corresponding to 200 (~20%), the first LED will light up. At 400, 2 LEDS will light. At 1000 or greater, all LEDs will be lit. This digital-out pin control can be realized in the code excerpt below: | ||
+ | |||
+ | <code c> | ||
... | ... | ||
| | ||
Line 37: | Line 31: | ||
| | ||
... | ... | ||
- | </source> | + | </code> |
+ | |||
+ | {{file: | ||
+ | Circuit Diagram from HiTechnic' | ||
+ | |||
+ | {{file: | ||
+ | Photo of completed circuit\\ | ||
+ | |||
+ | ===== Video ===== | ||
+ | |||
+ | {{youtube> | ||
- | < | + | **Note:** If the video doesn' |
- | {| style=" | + | ===== NXC Code ===== |
- | | | + | |
- | {| | + | |
- | | style=" | + | |
- | | style=" | + | |
- | | style=" | + | |
- | |- | + | |
- | | style=" | + | |
- | | | + | |
- | | style=" | + | |
- | |} | + | |
- | |} | + | |
- | ==Video== | + | |
- | < | + | |
- | <iframe width=" | + | |
- | </ | + | |
- | < | + | |
- | ''' | + | |
- | ==NXC Code== | + | <code c PotLED.c> |
- | <source lang="c" line start=" | + | |
/* | /* | ||
Filename: PotLED.nxc | Filename: PotLED.nxc | ||
Line 152: | Line 138: | ||
} | } | ||
} | } | ||
- | </source> | + | </code> |
+ | |||
+ | ===== Download ===== | ||
- | ===Download=== | + | {{file:PotLED.zip}} |
- | [[File:PotLED.zip]] | + |
analog-in_digital-out_potentiometer_and_leds.txt · Last modified: 2016/11/09 13:37 by dwallace