When I was first getting started with these products, I had a hard time finding code examples that were recent and worked. Now that I have a pretty nice example of a Raspberry Pi 2 with Fez Cream and two sensors acting as a Sensor server that can service GET requests for values, I thought I’d share my work with you guys, because I know I wish I could’ve seen it then!
The Pi is running Windows IoT Core and the app is a UWA that simply displays the sensor values AND responds to GET requests for the values. There’s also a Web project that requests the values on an interval and graphs them. There are links to the code repos on GitHub for your reference.
If you have questions or problems, I’ll do what I can to help you out. Enjoy!
@ brandtbridges, that is very impressive. Please drop us a note in a few days to let us know if this app keeps running without having to restart. Networking in the NETMF world sometimes seems not quite there, and I have been wondering if the Win10 RaspPi world is more sound.
I did not recognize how your created the website - can you describe it for someone who does not do websites?
Nice job! The video is black for me. Is that because its dark in the room or does it not do anything? Is the video being streamed from the Pi or from something else?
I don’t think most people understand how nicely PowerBI fits into the IoT world.
Thanks for the positive responses guys, it was a lot of fun to build and there will be much more coming! I’ll be tracking this thread and try to respond to any questions…
@ ianlee74 : The video is a Logitech HD cam looking out of my kitchen window; you should see some woods and a road below. Look at the clock in the upper right of the page, I’m on EST (GMT -5:00), so if it’s nighttime, it’ll be black (although you can occasionally see headlights go by.) Also, the video is not streamed by the Pi, but rather by a free cam server that runs on the computer that hosts my IIS Web server. [url]http://netcamstudio.com/[/url] Ideally, I wanted the Pi to do everything, but with the current build of Windows 10 IoT Core, cam streaming has limited support, but is under development. One consideration here is that video streaming (especially HD video) is VERY demanding on GPU/bandwidth and as such is not best suited to devices like the Pi. That being said, if you can deal with lower resolutions and frame rates, it could do the job reasonably well.
@ Duke Nukem : Nice charting my man!
Want to know more, just let know guys, and happy experimenting!
If you’re interested in another step-by-step lab that also shows Power BI, check out the standard field lab:
I had those labs created for our field to deliver in full-day lab events. They don’t use Gadgeteer, but do use the FEZ HAT. This was important for a BOM cost perspective.
Brandt, if you want to add a Gadgeteer version, based on your stuff, I’m happy to take pull requests. We have an update coming in the first week of January that uses IoT Hub instead of Event Hub, so that would be a great time to add more. The nice thing is it would end up as part of the official set of labs if it’s of the same approach and quality of what’s there now.