Re: [問題] mcu擷取程式問題
※ 引述《s4A111039 (定板小瓜)》之銘言:
: 開發平台(Platform): (Ex: VC++, GCC, Linux, ...)
: 額外使用到的函數庫(Library Used): (Ex: OpenGL, ...)
: c++
: 問題(Question):
: 大家好,我有一段程式需"連續"執行下列連結的動作來量測"最大值",請問要如何改?
: http://hank032831.pixnet.net/album/photo/536584618
: (arduino板子)
: void setup() {
: Serial.begin(9600);
: }
: void loop() {
int MaxSensorValue = 0;
: int sensorValue = analogRead(A0);
if(sensorValue > MaxSsensorValue) {
sensorValue = MaxSsensorValue;
}
: Serial.println((sensorValue)* 31.25 / 1023);
: delay(0.016); //1min
: }
: 非常謝謝!
--
不要問我從哪來,我只是一個浪跡天涯的工程師....
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 180.177.57.230
※ 文章網址: http://www.ptt.cc/bbs/C_and_CPP/M.1407031327.A.DC6.html
討論串 (同標題文章)