Adding more decimals to GPS data in Microsoft Arduino Virtual Shield

The default number of decimal places for the example named Basic-GPS for the Microsoft Arduino Virtual Shield is 2 decimal places. This means that the accuracy of the GPS position is not accurate by 500m to 700m from the right location.

The gps.Latitude and gps.Longitude value can be made more accurate by appending the number of desired decimal places as shown in the figure below. What changed from the original code is

String lat = String(“Lat: “) + String(gps.Latitude);
String lon = String(“Lon: “) + String(gps.Longitude);

to,

String lat = String(“Lat: “) + String(gps.Latitude,6);
String lon = String(“Lon: “) + String(gps.Longitude,6);

capture

The rest of the code are similar to the example, except I use serial.begin(9600) to match with my HC-06 bluetooth baud rate.

Program ELIT INES-P Negeri Terengganu 2016 @ Pusat Islam Sultan Mahmud (PISM), Universiti Malaysia Terengganu. Delivered my usual topic, Unmanned Aerial Vehicle (#UAV). Thank you Dr Suriani for the assistance. Great students, all the best for your SPM 2016 💪🏻💪🏻

Program ELIT INES-P Negeri Terengganu 2016 @ Pusat Islam Sultan Mahmud (PISM), Universiti Malaysia Terengganu. Delivered my usual topic, Unmanned Aerial Vehicle (#UAV). Thank you Dr Suriani for the assistance. Great students, all the best for your SPM 2016 💪🏻💪🏻

Measure distance using ping sensor and display it using Lumia 430 (Windows Virtual Shield)

On the next journey of tinkering with Windows Virtual Shield, I combined the use of ping sensor to measure distance and attempted to display the distance using Lumia 430 (Windows Virtual Shield).

Example codes that got ‘Frankensteined’ in this work are from the Ping Example and Windows Virtual Shield Example. Have a look below and see if you can replicate the same thing.

Capture1Capture2

“Hello World”, said my Arduino Uno. My Arduino board finally has a proper face, by assimilating itself to the Windows phone via bluetooth. Not only it can display it feelings via the screen, it can also use the phone’s sensors to know its current GPS coordinate, compass heading, send email, and many more. #robotics #Windows #InternetOfThings

“Hello World”, said my Arduino Uno. My Arduino board finally has a proper face, by assimilating itself to the Windows phone via bluetooth. Not only it can display it feelings via the screen, it can also use the phone’s sensors to know its current GPS coordinate, compass heading, send email, and many more. #robotics #Windows #InternetOfThings

Hello World Windows Virtual Shield lessons learned.

I have been attempting to run Hello World code using my Windows 10 Phone (Lumia 430, price RM 179) since 4 days ago to no avail. After a while, I have managed to run a successful example from this video:

Some of the lessons learned:

Problem: The Windows Virtual Shield app downloaded via Windows Store freeze once the phone and bluetooth connected.
Solution: See link Download Visual Studio 2015, download the source code of Windows Virtual Shield and deploy the codes to the phone via Visual Studio 2015.

Problem: Screen remain blank after device connected within Windows Virtual Shield.
Solution: Use the Arduino code below. I’m suspecting that the function ‘refresh’ will help to re-render the screen hence show the Hello World text on the phone.

Problem: No data received / shown
Solution: Make sure the baud rate matched with the bluetooth specification. I’m using JY-MCU BT_BOARD V1.03. Its baud rate is 9600.

7 Things I’ve Learned The Hard Way

These all the things I’ve learned all my life up until now.

  1. People don’t really care about your failures, they care more about theirs.
  2. Never develop bad habits, because once it’s settled, changing them would be hard.
  3. Focus on doing things right instead doing it hard, otherwise you would waste a lot of your energy and time (work smart first, then hit it hard).
  4. Hard work is an absurd concept, it cannot be measured, while PRODUCTIVITY can be measured.
  5. Don’t rely on experience alone if you want to learn something (especially in career), learn actively (read books)
  6. A good physique is really a good investment
  7. People care about how you looks, so start to take care about your appearance

Credits: Link