Hi all,

I have following code


adc_t g4= GPIO4;
void main(){
adc_init(g4);

while(1){
printf("Value=%d",adc_sample(g4,ADC_RES_12BIT);

}
}
My question is what is the step that i missed. It always prompt 4095 to
screen. In my hardware design i made a voltage divider circuit with a 4.7k
and a LDR. I measured ldr and it was 2.7 volts when sample results was
4095. Could someone satisfy an example or try to run my code in another
device?

Is there an example for ADC in Riotos
_______________________________________________
users mailing list
[email protected]
https://lists.riot-os.org/mailman/listinfo/users

Reply via email to