RealTimeClockDisplaySensor.ino



  • Have try this sketch. But i can't compile it.
    Have even try the online way


  • Hero Member

    A bit too less information to help...
    Can you post the errors you get and where you did get the source from?



  • You don't get any Errorcode when you use codebender


  • Admin

    I saw the 500-error when trying to run-and-clone mysensors libraries this morning. It was reported to the codebender team and I'm waiting for reply.


  • Admin

    Got a message from Mr Vasilis over at CodeBender. This should be fixed now.



  • I still get compiling Error when i try this with codebender


  • Admin

    Works fine for me.

    Do you select "Clone sketch and libraries"?

    http://www.mysensors.org/build/display



  • Hi, not compiling for mi either:

    Arduino: 1.5.8 (Windows 8), Board:"Arduino Nano, ATmega328"

    Using library SPI in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI
    Using library MySensors in folder: C:\Program Files (x86)\Arduino\libraries\MySensors (legacy)
    Using library Time in folder: C:\Program Files (x86)\Arduino\libraries\Time (legacy)
    Using library DS3232RTC in folder: C:\Program Files (x86)\Arduino\libraries\DS3232RTC (legacy)
    Using library Wire in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire
    Using library LiquidCrystal in folder: C:\Program Files (x86)\Arduino\libraries\LiquidCrystal (legacy)

    C:\Program Files (x86)\Arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=158 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR -I
    C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino -I
    C:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\eightanaloginputs -I
    C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI -I
    C:\Program Files (x86)\Arduino\libraries\MySensors -I
    C:\Program Files (x86)\Arduino\libraries\Time -I
    C:\Program Files (x86)\Arduino\libraries\DS3232RTC -I
    C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire -I
    C:\Program Files (x86)\Arduino\libraries\LiquidCrystal

    C:\Users\Oscar\AppData\Local\Temp\build6354959487290696935.tmp\MySensors_RealTimeClockDisplaySensor.cpp -o C:\Users\Oscar\AppData\Local\Temp\build6354959487290696935.tmp\MySensors_RealTimeClockDisplaySensor.cpp.o

    In file included from C:\Program Files (x86)\Arduino\libraries\LiquidCrystal/LiquidCrystal_I2C.h:35:0, from MySensors_RealTimeClockDisplaySensor.ino:21:
    C:\Program Files (x86)\Arduino\libraries\LiquidCrystal/LCD.h:421:44: error: 'prog_uchar' does not name a type
    void createChar(uint8_t location, const prog_uchar charmap[]);
    ^
    C:\Program Files (x86)\Arduino\libraries\LiquidCrystal/LCD.h:421:63: error: ISO C++ forbids declaration of 'charmap' with no type [-fpermissive]
    void createChar(uint8_t location, const prog_uchar charmap[]);
    ^
    Error de compilación



  • @osalval
    Hi, after reinstall IDE 1.0.6, it compile OK, but now liquid display don't show nothing.

    Monitor shows:

    sensor started, id 20
    send: 20-20-0-0 s=255,c=0,t=17,pt=0,l=5,st=ok:1.4.1
    send: 20-20-0-0 s=255,c=3,t=6,pt=1,l=1,st=ok:0
    read: 0-0-20 s=255,c=3,t=6,pt=0,l=1:M
    send: 20-20-0-0 s=255,c=3,t=11,pt=0,l=9,st=ok:RTC Clock
    send: 20-20-0-0 s=255,c=3,t=12,pt=0,l=3,st=ok:1.0
    send: 20-20-0-0 s=255,c=3,t=1,pt=0,l=3,st=ok:1.0
    requesting time
    send: 20-20-0-0 s=255,c=3,t=1,pt=0,l=3,st=ok:1.0
    requesting time
    send: 20-20-0-0 s=255,c=3,t=1,pt=0,l=3,st=ok:1.0
    requesting time
    send: 20-20-0-0 s=255,c=3,t=1,pt=0,l=3,st=ok:1.0
    requesting time
    send: 20-20-0-0 s=255,c=3,t=1,pt=0,l=3,st=ok:1.0
    requesting time



  • @osalval

    Solved, it was the contrast adjustable resistor of IIC interface, its very critical, now its working fine.

    Thanks

    No so fine it doesn't fetch the time from controller



  • @osalval
    By the way I find, THE ONLY one library: LiquidCrystal, that Works with Arduino V1.5.8:

    https://bitbucket.org/fmalpartida/new-liquidcrystal/downloads
    LiquidCrystal_V1.2.1.zip
    https://bitbucket.org/fmalpartida/new-liquidcrystal/downloads/LiquidCrystal_V1.2.1.zip

    I still can not fetching time from controller. What i shoul do with openHAB and MQTTGateway?



  • "I still can not fetching time from controller"

    I replaced ;
    if ((!timeReceived && now-lastRequest > 101000)
    || (timeReceived && now-lastRequest > 60
    1000*60)) {

    with;
    if ((!timeReceived && now-lastRequest > 10*1000)
    || (timeReceived && now-lastRequest > 3600000ul)) {

    It started fetching time from the controller after that. I'm just using the TimeAwareSensor.ino sketch and an ethernet gateway.
    Maybe this will help...........



  • Thank you @Jackpot

    Don´t Works for mi. As somebody told, I think is the MQTT Gateway that no respond to requestTime.
    I`m not software men but I think the sketch is correct and MQTT Gateway should answer wirt the value in "receiveTime"


Log in to reply
 

Suggested Topics

58
Online

11.4k
Users

11.1k
Topics

112.7k
Posts