locked
Web server displaying data from a I2C sensor: Node.js or C#? RRS feed

  • Question

  • I need a web server running on Raspberry 2 that will show data comming from a sensor over I2C.

    Currently I see two possible technology stacks to choose from.

    Option A: Server in node.js. There are examples of how to run a node web server on Windows IoT Core, but I expect troubles in programming I2C communication. Some sensors require delays between commands and that is not easy to achieve in JavaScript that has asynchronous nature. The best project I found so far (weather station) uses very simple read-only sensor that does require writing to I2C bus. Most I2C examples for IoT Core that I found are in C#. Most consumer sensors have Arduino libraries written in C and it is not so easy to port it in JavaScript. 

    Option B: Server in C#. I expect it will be much easier to get data from the sensor, but I did not find examples of how to start web server in C#. Is there a way to use standard Microsoft web technologies like OWIN or ASP.NET MVC on Windows IoT Core?

    May be it is possible to write a node module in C#? That would allow to use best features from both technologies.

    Saturday, October 17, 2015 8:51 PM

Answers