msp430g2553 內建溫度計 使用代碼
0.png (8.04 KB, 下載次數: 101)
下載附件
2018-6-10 16:45 上傳
Arduino源碼:
- #include "internaltempsensor.h"
- void setup()
- {
- Serial.begin(9600);
- Serial.println("BOOTED");
- }
- void printDec(int32_t ui)
- {
- if(ui < 0)
- Serial.print("-");
-
- Serial.print(ui/10, DEC);
- Serial.print(".");
- Serial.print(ui%10, DEC);
- }
- void loop()
- {
- int32_t currentValue = MSPTemp.update();
- Serial.print("Internal temperature (integer) : ");
- printDec(currentValue);
- Serial.println();
-
- Serial.print("Internal temperature (float) : ");
- Serial.print(MSPTemp.temperatureFloat());
- Serial.println();
-
- delay(2000);
- }
復制代碼
全部資料51hei下載地址:
msp430intertempsensor-master.zip
(4.15 KB, 下載次數: 11)
2018-6-10 10:21 上傳
點擊文件名下載附件
下載積分: 黑幣 -5
|