檢視 Arduino應用 的原始碼
←
Arduino應用
跳至導覽
跳至搜尋
由於以下原因,您無權編輯此頁面:
您請求的操作只有這個群組的使用者能使用:
使用者
您可以檢視並複製此頁面的原始碼。
==老化箱校正== <C> #include <SPI.h> #include <SD.h> #include "Max6675.h" File myFile; // Max6675 module: SO on pin #8, SS on pin #9, CSK on pin #10 of Arduino UNO // Other pins are capable to run this library, as long as digitalRead works on SO, // and digitalWrite works on SS and CSK Max6675 ts(5, 6, 7); void setup() { Serial.begin(9600); while (!Serial) { // 等待串列埠連線 } Serial.print("Initializing SD card..."); if (!SD.begin(4)) { Serial.println("Fail!"); return; } Serial.println("Success!"); ts.setOffset(0); } void loop() { float t= ts.getCelsius(); String strT= String("")+t+","+millis(); Serial.println(strT); myFile = SD.open("card.txt", FILE_WRITE); myFile.println(strT); myFile.close(); // 關閉檔案 Serial.println("Completed!"); delay(10000); } </c> *增加看板 <c> #include <SPI.h> #include <RGBmatrixPanel.h> #include "Max6675.h" #define CLK 8 // USE THIS ON ARDUINO UNO, ADAFRUIT METRO M0, etc. //#define CLK A4 // USE THIS ON METRO M4 (not M0) //#define CLK 11 // USE THIS ON ARDUINO MEGA #define OE 9 #define LAT 10 #define A A0 #define B A1 #define C A2 RGBmatrixPanel matrix(A, B, C, CLK, LAT, OE, false); Max6675 ts(A3,A4,A5); void setup() { Serial.begin(9600); matrix.begin(); ts.setOffset(0); matrix.fillScreen(matrix.Color333(0, 0, 0)); matrix.setCursor(1, 0); // start at top left, with one pixel of spacing matrix.setTextSize(1); // size 1 == 8 pixels high matrix.setTextColor(matrix.Color333(7,0,0));// print each letter with a rainbow color } void loop() { float t= ts.getCelsius(); String strT= String("")+t+","+millis(); Serial.println(strT); matrix.fillScreen(matrix.Color333(0, 0, 0)); matrix.setCursor(0, 0); matrix.setTextColor(matrix.Color333(7,0,0)); matrix.print(t); matrix.setCursor(0, 8); matrix.setTextColor(matrix.Color333(0,7,0)); matrix.print(millis()/1000); // 關閉檔案 Serial.println("Completed!"); delay(3000); } </c>
返回到「
Arduino應用
」。
導覽選單
個人工具
建立帳號
登入
命名空間
頁面
討論
臺灣正體
視圖
閱讀
檢視原始碼
檢視歷史
更多
搜尋
導覽
首頁
近期變更
隨機頁面
MediaWiki說明
工具
連結至此的頁面
相關變更
特殊頁面
頁面資訊