读取ADC的值
int adc_in(int $adc_id [, int $sc = 1])
相应ADC的输入值(0~4095)
<?php
$in_value = 0;
include "/lib/sd_340.php";
adc_setup(0, 0); // Setting ADC0 to channel 0
adc_setup(1, 1); // Setting ADC1 to channel 1
$value_0 = adc_in(0, 1); // Reading from ADC0
$value_1 = adc_in(1, 50); // Reading from ADC1 (average vale after reading 50 times)
?>