Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using Microsoft.SPOT;
- using Microsoft.SPOT.Presentation;
- using Microsoft.SPOT.Presentation.Controls;
- using Microsoft.SPOT.Presentation.Media;
- using GT = Gadgeteer;
- using GTM = Gadgeteer.Modules;
- using Gadgeteer.Modules.Seeed;
- using Gadgeteer.Modules.GHIElectronics;
- namespace Gadgeteer_Compass_01
- {
- public partial class Program
- {
- void ProgramStarted()
- {
- // setup a compass reading robot event watcher
- compass.MeasurementComplete += new GTM.Seeed.Compass.MeasurementCompleteEventHandler(compass_MeasurementComplete);
- compass.StartContinuousMeasurements();
- // tell everyone that we have started
- Debug.Print("Program Started");
- }
- void compass_MeasurementComplete(GTM.Seeed.Compass sender, GTM.Seeed.Compass.SensorData sensorData)
- {
- Debug.Print(sensorData.ToString());
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment