Skip to content

Latest commit

 

History

History
28 lines (18 loc) · 511 Bytes

README.md

File metadata and controls

28 lines (18 loc) · 511 Bytes

mruby-esp32-adc

ADC library for mruby-esp32.

Installation

You need esp-idf v5.0 to use this mrbgems.

Add the line below to your build_config.rb:

  conf.gem :github => 'mruby-esp32/mruby-esp32-adc'

Examples

adc = ADC.new(ADC::CHANNEL_0)
value = adc.read_raw()

# If you want to use ADC_UNIT_2
adc = ADC.new(ADC::CHANNEL_0, unit: ADC::UNIT_2)
value = adc.read_raw()

LICENSE

MIT License.