Ready to use DHT11/21/22 JavaScript support for Mongoose-IoT

Hi,

I've been working lately on adding DHT 11/21/22 JavaScript support for ESP8266 on Mongoose-IoT Firmware, and I've wrote a detailed tutorial on how to accomplish this task, by using RPi 3 Model B: http://web-engineering.info/node/65
The "ready to flash" firmware is also available for download, and in addition, the tutorial contains instructions about how to build the MFT application on a RPi3 and much more.

Best regards,
Mircea.

Comments

  • SergeySergey Dublin, Ireland

    That's impressive, thank you Mircea!

  • You are welcome!
    I am on the way to write a few other tutorials, related to "JavaScript programs on Mongoose-IoT firmware for ESP8266", showing how to use it with real world projects.

    I will post the links here when ready.

    Best regards,
    Mircea.

  • SergeySergey Dublin, Ireland

    Thank you @dimircea , please let us know when that happens!

  • edited January 16

    Thanks, both for your work on this.

    Dimircea: I tried to follow your tutorial and copied code into v7_xxx files but I noticed those files are not executed. so I copied the code into main.c just to check if it works but I got some errors related to v7_val_xxx not defined. According to a note on the top of the file, it seems like the v77 code is only relevant if you use v7 lib.

    Anyhow, is there any way to get the sensor code working without using v7? Let me know if you need any other details.

  • Hi Capin,

    Unfortunately, the current source code from the mongoose-iot repo is different than the one from the time I've wrote the tutorial, so it will not work anymore... The mongoose-iot team prepare us a surprise with a new and improved version of the JS firmware.
    Also, the firmware that I've updated/modified is based on V7, the purpose was to use JavaScript as programming language, so the V7 engine/lib is a must.

    I hope that this clarifies your question/problem.

    Mircea.

  • SergeySergey Dublin, Ireland

    Thanks Mircea.
    Yes, the new mJS engine is on it's way - and JS support is gradually improving.
    See https://github.com/cesanta/mjs
    And https://github.com/cesanta/mongoose-os/blob/master/fw/examples/mjs_hello/

  • Ah, that's a bummer!
    Thanks, Mircea!

    Sergey: Thanks for the links and I'll try to get the sensors working using those but what are the chances of next version to make further breaking changes? As you can see from Mircea's blog, he did a lot of work on getting the sensor working and publishing a very detailed blog. It would benefit the community if the changes are backward compatible for at least a couple of versions.

Sign In or Register to comment.