using System; using Microsoft.SPOT; using System.Threading; using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.SPOT.Hardware; using CPF; namespace CPFUnitTests.UT_BuoyancyEngine { [TestClass] public class BEUnitTests { [TestMethod] public void TestPositionSensor() { MotherBoard motherboard = MotherBoard.Instance; motherboard.Enable12V(); motherboard.Enable5V(); for (int i = 0; i < 20; i++) { motherboard.ToggleDebugLED(); Thread.Sleep(200); } motherboard.EnableChannelPower(14); BuoyancyEngine buoyancyEngine; buoyancyEngine = BuoyancyEngine.Instance; for(int i = 0; i < 5; i++) { Debug.Print(buoyancyEngine.getBellowsPosition().ToString()); Thread.Sleep(1000); } } } }