1import * as adc from 'adc'
2
3var vol = adc.open({
4    id: 'battery',
5    success: function () {
6        console.log('adc: open adc success')
7    },
8    fail: function () {
9        console.log('adc: open adc failed')
10    }
11});
12
13var value = vol.readValue()
14
15console.log('adc value is ' + value)
16
17
18
19
20