No ACL setup yet! Denying access to everyone.
en:edu:zmitac:macro:iot:labesp32
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| en:edu:zmitac:macro:iot:labesp32 [2020/03/12 08:59] – [Hardware] pczekalski | en:edu:zmitac:macro:iot:labesp32 [2020/03/12 11:08] (current) – [Laboratory scenarios] pczekalski | ||
|---|---|---|---|
| Line 261: | Line 261: | ||
| </ | </ | ||
| - | You may observe that for single button press an interrupt is triggered not once but many times. That is natural because of the physical switch connection oscillations. To avoid it, introduce the minimum time that is necessary between subsequent interrupt triggers. a function '' | + | You may observe that for single button press an interrupt is triggered not once but many times. That is natural because of the physical switch connection oscillations. To avoid it, introduce the minimum time that is necessary between subsequent interrupt triggers. a function '' |
| + | <note tip>Use '' | ||
| ** Task 7 ** - reading analog data\\ | ** Task 7 ** - reading analog data\\ | ||
| - | In this task, you will read analogue data via integrated ADCs of the ESP32. | + | In this task, you will read analogue data via integrated ADCs.\\ |
| + | Hardware part includes use of the " | ||
| + | __Please note correct pinout. Connect **GND** to board' | ||
| + | |||
| + | ESP32 has 15 channels exposed (18 total) of the up to 12-bit resolution ADCs. Reading of the raw data (12-bit resolution is the default, 8 samples per measure as default) is easy using '' | ||
| + | Technically, | ||
| + | Just execute '' | ||
| + | A number of useful functions is here (not limited to): | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | |||
| + | <note important> | ||
| + | |||
| + | During your exercise, you may start from informing ESP to start sampling on particular GPIOs, usually in the '' | ||
| + | <code c> | ||
| + | ... | ||
| + | #define VRxPIN 25 | ||
| + | #define VRyPIN 26 | ||
| + | ... | ||
| + | void setup() | ||
| + | { | ||
| + | ... | ||
| + | adcAttachPin(VRxPIN); | ||
| + | adcAttachPin(VRyPIN); | ||
| + | // here you can also change clock divider, number of cycles per sample and so on. | ||
| + | ... | ||
| + | } | ||
| + | </ | ||
| ==== Resources ==== | ==== Resources ==== | ||
| - [[https:// | - [[https:// | ||
en/edu/zmitac/macro/iot/labesp32.1583999946.txt.gz · Last modified: by pczekalski
