How to add dgram support?

Posted on
  • I play with LED stream and panel controlled by neopixel module.
    I have tried to make home clock. I want to use use ntp-client from GitHub to get accurate initial time. I have found that it use dgram module, which is in Espruino reference but can not be connected.
    I can see 'Uncaught Error: Module "dgram" not found' message.
    The same happens if I try to use the module in my code.
    I think may be the module is not included for ESP8266.

    How to add dgram support to ESP8266?

  • No need to, on ESP8266 board just use this and change sntp_srv to your country.

    sntp_srv="0.europe.pool.ntp.org"; 
    require("Wifi").setSNTP(sntp_srv,1);
    console.log(Date().toString());
    
  • Thank you! It works!

  • Thanks for your feedback. Think about sharing your home clock on Project

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

How to add dgram support?

Posted by Avatar for SergeP @SergeP

Actions