Next, after the preparation is complete. The next step is to familiarize yourself with the hardware and architecture.
Here is a simple IoT architecture design diagram
There's not much to say about Microsoft cloud. Interested friends can go here to learn more https://www.azure.cn/.
In the architecture you can see that the hardware layer is divided into two different roles, the Arduino collects raw data, and the Raspberry Pi acts as a hub to collect and manage multiple Arduino.
There are a variety of arduino such as:
Leonardo, relatively inexpensive features are relatively single.
Wido, WiFi enabled.
There are WiFi and a lot less volume, such as esp8266
And of course there are smaller.
Bluno Nano (UP), support Bluetooth, Nano (under), a single function, is not compared to the above board a lot smaller.
About Arduino interested can go here and see http://www.arduino.cn/
Next introduce the architecture mentioned in the Arduino architecture management hub, Raspberry Pi (arm chip).
In addition to the Raspberry Pi can also use the more advanced Minnow board (Intel out of the x86 chip)
Personal feeling with Raspberry Pi is still too much. Next, write a small program.
Raspberry Pi Code Authoring steps:
- Open vs2015 update1 (must be installed WIN10 SDK)
- New Project
3. The control, code is based on individual needs.
4. Local debugging
5. Deploy the Raspberry Pi, which is more specific and is deployed remotely. Raspberry Pi and development machine on the same network. Open the directory where the Raspberry Pi image is installed, open the Windowsiotcorewatcher program to view the remote Raspberry Pi IP Address
The IP address can be logged into the management portal such as your IP address is 192.168.1.100 so the address of the management portal is http://192.168.1.100:8080 account password is Administrator [email protected] by default.
Back to VS Deployment, write the IP address of the Raspberry Pi on the VS remote computer
Run or debug the project.
Arduino code written according to the different code written by the board are different, if the study recommended is to first look at what kind of board you use, find the corresponding model, and then open the development tools Arduino IDE First look at the sample code.
The Arduino code is very well understood, an installation method, a dead loop method. Installation method is usually set variables, baud rate and so on. The dead loop method is always executing the logic of writing code, such as sending data, receiving data, and so on.
void Setup () { // put your setup code here, to run once: Serial.begin (9600);} void loop () { // put your main code here, to run repeatedly: Serial.println ("Hello");d elay ();}
Before compiling the code, you need to connect the board to the computer via USB, and set the board model (I used a nano small board test).
Compiling code
Deployment Code
Check the output and remember to choose the correct baud rate.
This time will be here, next time update, the next update content has
- Arduino Board Roadmap How to quickly understand and connect
- Use of some common sensors
- How to build a webserver with Arduino
- Let Raspberry Pi get the sensor data captured by Arduino in real time
I hope you will continue to pay attention!
Getting Started with Windows IOT development (Hardware primer)