문제

I am trying to compile and upload one of the example WiFly projects to my Arduino. One of the example's functions is has return-type 'time_t', but the compiler doesn't recognize that. I have tried including both <ctime> and <time.h>.

This is my first time really using C++, So how do I import 'time_t' on my Arduino?

도움이 되었습니까?

해결책

Apparently you'll need to do two things to use time_t on your Arduino.

  1. Download the Time Library
  2. Include <Time.h> (note the capital T)

다른 팁

If you download the Time library it gets a .zip file that has 3 folders. TimeAlarms, Time and DS1307RTC. Try moving these 3 folders out of the Time folder, and directly into the libraries folder.

See the comment on November 14, 2012 at 5:09 http://adventuresinarduinoland.blogspot.com/2012/09/yet-another-real-time-clock.html

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top