Khadas Docs

Amazing Khadas, always amazes you!

User Tools

Site Tools


Sidebar

products:sbc:edge2:applications:gpio:adc

This is an old revision of the document!


Edge2 ADC

Introduction

This documentation will introduce the usage of ADC on the Edge2 IO board.

For Edge2, in order to use the ADC function, you need to attach the Edge2 IO board.

Hardware Information

The ADC on the Edge2 IO board is a 12-bit successive approximation register (SAR) A/D Converter.

PIN Device Node
9

ADC conversion

Use the following command to view the device node and read the ADC conversion value.

$ cd && ls /sys/bus/iio/devices/iio:device0
buffer           in_voltage2_raw  in_voltage6_raw   of_node        trigger
dev              in_voltage3_raw  in_voltage7_raw   power          uevent
in_voltage0_raw  in_voltage4_raw  in_voltage_scale  scan_elements
in_voltage1_raw  in_voltage5_raw  name              subsystem
$ cat /sys/bus/iio/devices/iio:device0/in_voltage4_raw                                             
1
Last modified: 2022/12/06 04:04 by nick