I finished the challenge and being new to this blog and new to the Azure Sphere, it was a real challenge to get something interesting up and running. Also, The changes By Microsoft to the SDK and OS, added more challenges to a moving target. But Things were only made much better. It gave me a sense that I was on the cutting edge by using the Beta version.
My background and career for the past 35 years has been as a Software Engineer. Now, I'm retired and concentrating on Learning more about IoT as a hobby. My Electrical experience is very slim, but I'm learning more and more.
I created this blog post on November 12, 2019 in a hope of documenting my steps. This was entered into the competition and confirmed in a discussion by Daniel Zima of the element14 Team on Dec 2, 2019 9:43 AM.
My username is on the list, so I now know that I'm in the competition.
I've been pinging the server and wanted to start documenting my progress from the design phase.on a project for the challenge.
I received a lot of assistance from this blog and felt a real sense of collaboration.. I will continue to use this instead of hackster.io for my continued projects as a maker hobbyist. Well done element14....
I used all the tutorials and Information on this blog to implement the concept and design listed below. It turned out that I didn't need to write a bit of code and used the on-board sensors to gather Telemetry data for my Solution.
This was a steep learning curve for me but, I was able to get my solution done and running on the kit. Thanks guys for the excellent explained blog post.
There are so many interesting projects that were submitted and I plan on reviewing and using some as examples to implement my other ideas that I have for the Azure Sphere.
I started by listing the stages of the project
My wife always complains that I leave the light on in rooms in the house that are unoccupied.
So I thought to implement a solution that would record the time of day that a light was on in a room.
The solution is centered around the Avnet Azure Sphere MT3620 Starter Kit
Hopefully it works and that you don't run up charges on Azure IoT Central, which can add up.
Even though you have 50,000 messages a month and up to 5 devices for FREE. You can chock up pennies pretty quickly if you process all the sensors Telemetry data.
HERE ARE THE DEVELOPMENT STEPS
SETUP the KIT
A great detailed way to do this is here: https://www.hackster.io/monica/the-lazy-person-s-guide-to-azure-sphere-1c513a
Check it out. I was able to get the Kit Up and running about 5 hours after I received my kit in the mail. Being secure does have a sharp learning curve, but once you understand the architecture, its quit amazing.
HOW to read the light sensor?
- Well, I used these projects on element14 from Peter Fenn
- They access the Light Sensor
- one using the A7 and A4 cores the other using a new feature of the OS version 19.9
- I used these code samples to Send the Light Sensor data to Azure IoT central and used the Email Alert rule to Send the email to tell me when the light was on.
- There was no code to write for this project. All the functionality I needed to track the Light Sensor Telemetry data was already written. These are excellent starting points to reading the On-board kit sensors,click boards and an optional OLED Display.
- I did not order the OLED Display, but the demos worked fine without it. My soldering skills are not up to snuff and I didn't want to harm the board with my inexperienced soldering techniques.
Here are the Tutorials that I studied, used and found extremely helpful in understanding the SDK, OS and Azure IoT Hub and IoT Central services used to implement my Solution.
These 3 "Out-of-Box demo" three-part blog series (by Brian Willess) is an excellent starting point for you to use the on-board sensors to gather Telemetry data.
This "advanced tutorial" is partitioned into two sections, enabling it to be worked on in two sessions:
• 1st section focus is on configuring, building and running the M4 and A7 embedded applications (and viewing local output from these applications)
• 2nd section walks the user through the capabilities and expansion options of the Azure IoT Central cloud application that the A7 embedded application is connected to
It consolidates what was covered in Part 1 and Part 3 of the "Out-of-Box demo" three-part blog series (by Brian Willess) but adds shortcuts and a number of new capabilities to the overall application (see detail below).
This tutorial is intended to be used standalone (no dependency on previous material) but it is recommended that at minimum Part 1 of the earlier blog series be reviewed before starting.
I've COMPLETED THIS ONE AND IT IS somewhat WORKING NOW
I'll be able to use what I learned to complete code steps 2 and 3 mentioned above.
But I was unable to CMake the A4 project for some reason.
Another way of getting to the light sensor with new enhancements to the OS and SDK
Can use Enabled New Chip Features
ADC inputs and PWM output peripheral functions are now accessible from the high-level A7 user application
I have used this tutorial to Access the Light Sensor from the A7 level. It is much easier
Send Data to the Cloud
The 2 demos above connect to IOT Central and IOT HUB
Be careful to not leave the program running on the kit, you can easily runny up charges, as I describe HERE.
Send a notification
How to Send Email?
IOT CENTRAL HAS THIS ABILITY without any programming involved
You can easily create a Rule with a snap.
Configure Azure IoT Central Rules (Email Alerts) to send emails if the light sensor goes over a certain threshold.
I was unable to implement my design spec:
- it can be sunlight! You will have to program a time period that the sensor is working
- IDEA: send this up to the device twin. You'll be able to change the time span in IoT Central
TEST Works fine