Settime Real Time Clock Module DS1307 - ArduinoAll
Maybe your like
- หน้าแรก
- >
- เว็บบอร์ด
- >
- Settime Real Time Clock Module…

AllNewStep รับประกันคุณภาพทุกชิ้น วันจันทร์-ศุกร์แจ้งชำระสินค้าก่อน 14.00 จัดส่งทันทีวันนี้ค่ะ
กรุงเทพ /ภาคกลาง ได้พรุ่งนี้
*** สินค้าทุกชิ้น ถ้าสามารถทำรายการสั่งซื้อได้ แสดงว่ามีครบทุกรายการค่ะ ***
พิมพ์ค้นหาบทความ หัวข้อกระทู้ และสินค้าในเว็บ AllNewStep ได้ที่นี่ ตอบกระทู้ ตั้งกระทู้ใหม่ QUOTE Settime Real Time Clock Module DS1307ผมได้อัปโหลดโค๊ดดังนี้#include #include #include const char *monthName[12] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun","Jul", "Aug", "Sep", "Oct", "Nov", "Dec"};tmElements_t tm;void setup() {bool parse=false;bool config=false;// get the date and time the compiler was runif (getDate(__DATE__) && getTime(__TIME__)) {parse = true;// and configure the RTC with this infoif (RTC.write(tm)) {config = true;}}Serial.begin(9600);while (!Serial) ; // wait for Arduino Serial Monitordelay(200);if (parse && config) {Serial.print("DS1307 configured Time=");Serial.print(__TIME__);Serial.print(", Date=");Serial.println(__DATE__);} else if (parse) {Serial.println("DS1307 Communication Error :-{");Serial.println("Please check your circuitry");} else {Serial.print("Could not parse info from the compiler, Time=\"");Serial.print(__TIME__);Serial.print("\", Date=\"");Serial.print(__DATE__);Serial.println("\"");}}void loop() {}bool getTime(const char *str){int Hour, Min, Sec;if (sscanf(str, "%d:%d:%d", &Hour, &Min, &Sec) != 3) return false;tm.Hour = Hour;tm.Minute = Min;tm.Second = Sec;return true;}bool getDate(const char *str){char Month[12];int Day, Year;uint8_t monthIndex;if (sscanf(str, "%s %d %d", Month, &Day, &Year) != 3) return false;for (monthIndex = 0; monthIndex < 12; monthIndex++) {if (strcmp(Month, monthName[monthIndex]) == 0) break;}if (monthIndex >= 12) return false;tm.Day = Day;tm.Month = monthIndex + 1;tm.Year = CalendarYrToTm(Year);return true;}เพื่อตั้งเวลาสำหรับบันทึกข้อมูลลง SD Card แต่ไม่สำเร็จและมีข้อความแสดงขึ้นดังนี้Arduino: 1.8.12 (Windows 10), Board: "Arduino Uno"In file included from C:\Users\Y520\AppData\Local\Temp\arduino_modified_sketch_299543\SetTime.ino:1:0:C:\Users\Y520\Documents\Arduino\libraries\DS1307RTC/DS1307RTC.h:19:22: error: 'tmElements_t' has not been declaredstatic bool read(tmElements_t &tm);^~~~~~~~~~~~C:\Users\Y520\Documents\Arduino\libraries\DS1307RTC/DS1307RTC.h:20:23: error: 'tmElements_t' has not been declaredstatic bool write(tmElements_t &tm);^~~~~~~~~~~~C:\Users\Y520\AppData\Local\Temp\arduino_modified_sketch_299543\SetTime.ino: In function 'void setup()':SetTime:20:21: error: no matching function for call to 'DS1307RTC::write(tmElements_t&)'if (RTC.write(tm)) {^In file included from C:\Users\Y520\AppData\Local\Temp\arduino_modified_sketch_299543\SetTime.ino:1:0:C:\Users\Y520\Documents\Arduino\libraries\DS1307RTC/DS1307RTC.h:20:17: note: candidate: static bool DS1307RTC::write(int&)static bool write(tmElements_t &tm);^~~~~C:\Users\Y520\Documents\Arduino\libraries\DS1307RTC/DS1307RTC.h:20:17: note: no known conversion for argument 1 from 'tmElements_t' to 'int&'exit status 1no matching function for call to 'DS1307RTC::write(tmElements_t&)'This report would have more information with"Show verbose output during compilation"option enabled in File -> Preferences.ผมต้องแก้ไขตรงไหนครับ
QUOTE ความคิดเห็นที่ #1
เจ้าของร้าน 4 ปีที่ผ่านมา ในนี้แจ้งว่าไม่มีไฟล์ไลบารี ลองเช็คไลบารีหรือใช้ไลบารีตัวใหม่ครับ
QUOTE ความคิดเห็นที่ #2
เจ้าของร้าน 4 ปีที่ผ่านมา C:\Users\Y520\Documents\Arduino\libraries\DS1307RTC\DS1307RTC.h:19:22: error: 'tmElements_t' has not been declared
static bool read(tmElements_t &tm);
ในนี้แจ้งว่าไลบารีไม่ถูกต้องครับ
QUOTE ความคิดเห็นที่ #4
เจ้าของร้าน 4 ปีที่ผ่านมา ตัวอย่างดังนี้ครับ https://www.allnewstep.com/p/3661
แสดงความคิดเห็นที่ 1-5 จากทั้งหมด 5 ความคิดเห็น ขาย ARDUINOคุณภาพ อันดับ 1ได้รับรางวัลร้านยอดเยี่ยมตั้งแต่ปี 2558
ประจำวันที่ 16 กันยายน 2558 


ค้นหา Arduino
ค้นหา ค้นหาโดยละเอียด| ดูทั้งหมด |
อุปกรณ์ Arduino
สินค้าทั้งหมด [5206] สินค้าแนะนำ [819] ขาย Arduino Board (Arduino Compatible) [69]ขาย Arduino อุปกรณ์/กล่องเคส Arduino [9]ขาย Arduino ชุดคิท Arduino ชุด Starter Kit / Learning Kit [31]ชุดทดลองสำหรับ Arduino ชุด Starter Kit++ [7]คอร์สเรียน Arduino / หนังสือ Arduino [4]สินค้าแบรน Seeed Studio [57]Seeed Sensor Module [43]Seeed Board บอร์ดไมโครคอนโทรเลอร์ [0]Seeed Starter Kit อุปกรณ์เริ่มต้นเรียนรู้ [6]สายไฟจัมเปอร์ [8]สอน Arduino [44]โปรเจก Arduino พื้นฐาน [44]ชุดคิทวงจรอิเล็กทรอนิกส์ Electronic Kit [57]ขาย Arduino บอร์ด Shields [38]ขาย Micro:bit [36]ขาย Raspberry Pi [103]STM32 Microcontroller [28]STM32 Arduino Compatible [12]STM32 / STM8 [15]PIC Microcontroller [8]PIC Board [1]IC PIC [7]IC [167]IC Arduino [25]IC เรกูเลต [38]IC เซนเซอร์ [5]IC IO/Driver [44]IC ใช้งานพื้นฐาน [34]IC เสียง [5]IC Digital [16]LCD/LED [340]LED [156]โมดูลจอ LCD [58]โมดูลจอแสดงผล OLED [19]LED Module [102]LED 7 Segment [60]โมดูล 7 Semgnet แสดงตัวเลขอเนกประสงค์ [27]7 segment 1 หลัก [15]7 segment 2 หลัก [4]7 segment 3 หลัก [4]7 segment 4 หลัก [10]Servo / Motor / Car [275]Servo [52]Motor [55]โมดูลขับมอเตอร์ / อุปกรณ์ IO [62]Smart Car [68]โครงสร้างหุ่นยนต์ / พลาสติก Smart Car [38]Power / Regulator [250]USB Power [11]เรกูเลเตอร์ Step Up [37]เรกูเลเตอร์ Step Down [89]เรกูเลเตอร์ Step Up&Down [15]แหล่งจ่ายไฟอะแดปเตอร์ / Adapter [98]Internet of Things IoT [219]Smart Home / Wi-Fi / Sonoff [23]ESP8266 WiFi [86]ESP32 WiFi Bluetooth [74]ESP8285 WiFi [7]LoRa / LoRa Antenna [16]WiFi Module [2]M5Stack ESP32 [10]NB-IoT [1]ขาย Arduino Sensor [1143]เซนเซอร์ความเร่ง / ไจโร / IMU [35]เซนเซอร์วัดระยะทาง [34]เซนเซอร์แสงและการมองเห็น [92]เซนเซอร์ตรวจจับความเคลื่อนไหว [36]เซนเซอร์วัดสภาพแวดล้อม [272]เซนเซอร์แก๊ส [33]โมดูลวัดแรงดันและกระแสไฟฟ้า [131]โมดูลสวิตช์ [108]โมดูลบันทึกข้อมูล [16]โมดูลนาฬิกา Real Time Clock [10]โมดูลสื่อสารไร้สาย [76]โมดูลอินเตอร์เน็ต [11]โมดูล RFID / NFC / Smart Card [36]โมดูล USB Converter [35]โมดูล JoyStick [6]โมดูลเสียง [45]โมดูลเครื่องเสียง [44]โมดูล GSM/GPS [17]โมดูล 3D Printer / CNC [9]โมดูลกำเนิดสัญญาณ Signal Gennerator [7]โมดูลแปลงสัญญาณ I/O [85]ขาย Arduino โมดูลบอร์ดรีเลย์ [106]Relay 5V [53]Relay 9V [4]Relay 12V [31]Relay 24V [14]Relay 3V [4]Socket / PCB [526]แผ่นปริ๊น PCB [112]USB Socket [22]CHIP Socket [15]IC Socket [22]Universal ZIF Sockte [16]Pin Header [177]ก้างปลา [34]Jack /Terminal / Adapter [126]Electronic component [656]ตัวเก็บประจุ [45]ตัวต้านทาน [173]| ตัวต้านทานค่าคงที่ [66]ตัวต้านทานปรับค่าได้ [96]ตัวต้านทานแบบ network [8] |
| ซีเนอร์ไดโอดแบบ SMD [0] |
| Nut Screw M2 [33]Nut Screw M3 [62]Nut Screw M2.5 [60]น็อตสกรูขนาดอื่น [0]Nut Screw M4 [7] |
ติดต่อ AllNewStep

MEMBER ZONE
คุณเป็นตัวแทนจำหน่าย - ระดับ{{userdata.dropship_level_name}}
- ไปหน้าหลักตัวแทน
- ทั้งหมด {{(order_nums && order_nums.all)?'('+order_nums.all+')':''}}
- รอการชำระเงิน {{(order_nums && order_nums.wait_payment)?'('+order_nums.wait_payment+')':''}}
- รอตรวจสอบยอดเงิน {{(order_nums && order_nums.wait_payment_verify)?'('+order_nums.wait_payment_verify+')':''}}
- รอจัดส่งสินค้า {{(order_nums && order_nums.wait_send)?'('+order_nums.wait_send+')':''}}
- รอยืนยันได้รับสินค้า {{(order_nums && (order_nums.wait_receive || order_nums.wait_confirm))?'('+(order_nums.wait_receive+order_nums.wait_confirm)+')':''}}
- รอตรวจสอบข้อร้องเรียน {{(order_nums && order_nums.dispute)?'('+order_nums.dispute+')':''}}
- เรียบร้อยแล้ว {{(order_nums && order_nums.completed)?'('+order_nums.completed+')':''}}
- ทั้งหมด {{(order_nums && order_nums.all)?'('+order_nums.all+')':''}}
- รอการชำระเงิน {{(order_nums && order_nums.wait_payment)?'('+order_nums.wait_payment+')':''}}
- รอตรวจสอบยอดเงิน{{(order_nums && order_nums.wait_payment_verify)?'('+order_nums.wait_payment_verify+')':''}}
- รอจัดส่งสินค้า {{(order_nums && order_nums.wait_send)?'('+order_nums.wait_send+')':''}}
- ส่งสินค้าเรียบร้อยแล้ว {{(order_nums && order_nums.sent)?'('+order_nums.sent+')':''}}
ArduinoAll ขาย Arduino ซื้อ Arduino ทุกอย่าง เปลี่ยนชื่อเป็น AllNewStep {{is_joined?'เป็นสมาชิกแล้ว':'Join เป็นสมาชิกร้าน'}} 4689 สมัครสมาชิกร้านนี้ เพื่อรับสิทธิพิเศษ บัตรประชาชน บุ๊คแบ๊งค์ คุ้มครองโดยLnwPay ขาย arduino | ซื้อ arduino | จ่ายเงิน arduino | เรียน arduino | เว็บบอร์ด arduino | เกี่ยวกับ arduino | ติดต่อเรา | สินค้า arduino | Site Map
ขออภัย ขณะนี้ยังไม่มีสินค้าในตะกร้า ราคาสินค้าทั้งหมด ฿ {{price_format(total_price)}} - ฿ {{price_format(discount.price)}} ราคาสินค้าทั้งหมด {{total_quantity}} ชิ้น ฿ {{price_format(after_product_price)}} ราคาไม่รวมค่าจัดส่ง รวมภาษีมูลค่าเพิ่มแล้ว ดูสินค้าในตะกร้า เริ่มการสั่งซื้อ ➜ เลือกซื้อสินค้าเพิ่ม พูดคุย-สอบถาม - อีเมล [email protected]
- โทร 0617294322
Tag » Arduino Tmelements_t Tm Error
-
DS1307RTC TmElements_t Tm Errors - Arduino Forum
-
TmElements_t Has Not Been Declared · Issue #122 · Esp8266/Arduino
-
TmElements_t Has Not Been Declared · Issue #10 - GitHub
-
'tmElements_t' Does Not Name A Type - Arduino Stack Exchange
-
Arduino: Osepp DS1307 RTC Program Error (tmElements_t Tm
-
TimeLib & DS1307RTC - Savvy Solutions
-
DS1307RTC Library, For Accessing Real Time Clock (RTC) Chips
-
Arduino DS3232RTC Library V1.0 — Sming Documentation
-
How To Do Daily Tasks With Arduino - Random Nerd Tutorials
-
Using A Real Time Clock With Arduino | DroneBot Workshop
-
Reading Data From Device In Every 30 Minutes - Helped
-
Module Mạch Thời Gian Thực RTC DS1307 | Shopee Việt Nam
-
Wierd Errors With Arduino 1.6.9 And ESP2866 Platform