We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents cf76704 + d6be48b commit e0256beCopy full SHA for e0256be
ports/raspberrypi/common-hal/microcontroller/Processor.c
@@ -39,7 +39,7 @@
39
float common_hal_mcu_processor_get_temperature(void) {
40
adc_init();
41
adc_set_temp_sensor_enabled(true);
42
- adc_select_input(4);
+ adc_select_input(ADC_TEMPERATURE_CHANNEL_NUM);
43
uint16_t value = adc_read();
44
adc_set_temp_sensor_enabled(false);
45
float voltage = value * 3.3 / (1 << 12);
0 commit comments