Introduction
In this article, I'll show you how to control the
Arduino board with Windows 10 PC or Mobile using Windows Virtual Shield for Arduino. This app was developed by the Microsoft Corporation and you can get it from the Windows Store.
Requirements
Hardware
- Arduino Uno
- Bluetooth Module HC-05
- Windows 10
- Windows Virtual Shield for Arduino - Get the app
Software
- Arduino IDE 1.6 or better
- ArduinoJson library
- Arduino JSON library - GitHub
- VS2015
The following sensors are used to control directly from Arduino Wiring,
Sensors
- Accelerometer
- Compass
- Geolocator (GPS)
- Gyrometer
- Light Sensor
- Orientation
Capabilities
- Camera
- Device info (name, date/time/timezone, os)
- Email (initiation)
- Microphone
- Notifications (Tile/Toast)
- Screen (Text, Images, Audio/Video, Rectangles, Buttons, Touchscreen)
- Sms (initiation)
- Speech to Text and Speech Recognition
- can receive table data from previous web search
- Vibration
- Web (Get and Post with result parsing)
- XPath
- JSON
- Simple text
- Regular expressions
- Table iteration (keys/values saved)
Connection
- Setup the Arduino IDE 1.6 or better.
- Get the Arduino JSON library (Click here) download the zip. and Add it to the Arduino | Sketch, then Include library, Add.Zip library.
- In the Arduino IDE Sketch, Include library, then Manage Library, A library manager will open in that search box you can type windows virtual shield for Arduino and click install button the library will be added to the Arduino IDE.
Bluetooth
- RX pin to TX
- TX pin to RX
- Vcc to 5v
- Gnd to Gnd
Code: Hello Virtual Shield
- #include <ArduinoJson.h>
- #include <VirtualShield.h>
- #include <Text.h>
-
- VirtualShield shield;
- Text screen = Text(shield);
-
- void setup()
- {
- shield.begin(9600);
-
- screen.clear();
- screen.print("Hello \n my Virtual Shields for Arduino");
- }
Explanation
Add the libraries first i,e
- #include <ArduinoJson.h>
- #include <VirtualShield.h>
- #include <Text.h>
- VirtualShield is like a function used to find the shield using BT communication.
- The Text screen are used to connect the screen to display the text.
- The setup() is one type of the built in function.
- shield.begin() in your setup() is called as the baud rate and it is mainly used for the communication purpose.
- screen.clear() clears the screen.
Output
Read more articles on Arduino: