Вопрос

I want to use NETMF and C# and NetDuino, perhaps, to program an embedded device to periodically write a record of the device's geochron data (datetime, coordinates, elevation, perhaps temperature and light level, etc.) to a SQL DB (formerly called SQL Azure or some such). Given the Micro Framework's limitations, is this possible?

Это было полезно?

Решение

The answer is 'yes', but indirectly.

It will not be possible (AFAIK) to write NETMF code on the Netduino that talks directly to Windows Azure SQL Databases, but it's totally possible to "wrap" Azure SQL up behind a restful web service, hosted in an Azure Cloud Service that talks to the database, and then write to the RESTful service, which then forwards the data to the DB.

Hosting a service in Azure that writes to a database is pretty well documented, and then calling into that service from NETMF on Netduino looks something like what this guy did here:

http://forums.netduino.com/index.php?/topic/971-webservice/

Take a look at the sample code by "Osi", which is taken from the .NET MF Socket Client sample (in fact it's a Temperature Logger, which is not too dissimilar to what you're trying to do...)

Другие советы

Not sure if you got to the bottom of this, but here's a solution using Azure Mobile Services.

https://www.ghielectronics.com/community/codeshare/entry/913

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top