The latest development version of this page may be more current than this released 2.2-beta version.

ADC DEMO

Overview

After starting this application, perform the following actions:

  1. Initialize the ADC

  2. Start a thread to read the internal temperature, chip voltage, and data from channel 0 of the chip within

Environmental Requirements

Please note that there is a corresponding relationship between ADC channels and IO. When configuring, please refer to the definition in wm_adc_channel_t

Building and Flashing

Example Location: examples/peripheral/adc

For operations such as compiling and burning, please refer to: Quick Start Guide

Running Result

The following logs is displayed after successful operation

D/dt              [0.038] add device adc
D/dt              [0.042] add device gpio
I/adc_example     [0.052] chip temp 52803 
I/adc_example     [0.080] chip voltage 3229 
I/adc_example     [0.088] result oneshot -18 
I/adc_example     [68.954] result 0 -18 
I/adc_example     [68.958] result 1 -18 
I/adc_example     [68.962] result 2 -18 
I/adc_example     [68.966] result 3 -18 
I/adc_example     [68.968] result 4 -18 
I/adc_example     [68.972] result 5 -18 
I/adc_example     [68.976] result 6 -18 
I/adc_example     [68.980] result 7 -18 
I/adc_example     [68.984] result 8 -18 
I/adc_example     [68.988] result 9 -18 
I/adc_example     [68.990] result 10 -18 
I/adc_example     [68.994] result 11 -18 
I/adc_example     [68.998] result 12 -18 
I/adc_example     [69.002] result 13 -18 
I/adc_example     [69.006] result 14 -18 
I/adc_example     [69.010] result 15 -18 
I/adc_example     [69.014] result 16 -18 
I/adc_example     [69.018] result 17 -18 
I/adc_example     [69.022] result 18 -18 
I/adc_example     [69.024] result 19 -18