共6条
1/1 1 跳转至页
ADC-模拟量传感器的使用

#include "mbed.h" AnalogIn analog_value(A5); int main() { float meas; printf("\nAnalogIn example\n"); while(1) { meas = analog_value.read(); // Converts and read the analog input value (value from 0.0 to 1.0) meas = meas * 3300/10; // Change the value to be in the 0 to 3300 range printf("Tep = %.2f C\n", meas); wait(0.2); // 200 ms } }
共6条
1/1 1 跳转至页
回复
打赏帖 | |
---|---|
分享一种检测按键状态的方法被打赏20分 | |
周末总结一下,STM32C0系列的开发经验被打赏50分 | |
【Cortex-M】Systick Timer使用被打赏10分 | |
分享汽车防盗系统的组成与分类(一)被打赏5分 | |
VOFA+波形显示+JYD-31蓝牙发送和解析不定长数据被打赏10分 | |
【换取手持数字示波器】-STM32F4PWM控制LED灯管亮度被打赏22分 | |
【换取手持数字示波器】STM32F4驱动RPR-0521RS照度、接近一体型传感器被打赏23分 | |
宏定义和const关键字定义被打赏5分 | |
【分享开发笔记,赚取电动螺丝刀】几个单片机I2S外设的BLCK时钟对比被打赏20分 | |
【功率监测与控制系统DIY活动成果贴】DIY功率计与LabVIEW数据采集被打赏100分 |