ADC
— 模拟信号转数字信号¶
使用示例::(python)¶
1 2 3 4 5 6 7 8 9 10 11 | # coding=utf-8
# This is a sample Python script.
from driver import ADC
print("-------------------start adc test--------------------")
adc = ADC()
adc.open("ADC0")
value = adc.read()
print(value)
adc.close()
print("-------------------end adc test--------------------")
|
配置信息::(json)¶
1 2 3 4 5 6 7 8 9 10 11 12 13 | # coding=utf-8
# This is a sample cjson file.
{
"version": "1.0.0",
"io": {
"ADC0": {
"type": "ADC",
"port": 0,
"sampling": 12000000
}
},
"debugLevel": "DEBUG"
}
|