Example #1
0
        public async System.Threading.Tasks.Task writePins2()
        {
            // Test how bool array is converted to a byte

            var input = new bool[]
            {
                // LS: 0010 = 2
                false,
                true,
                false,
                false,

                // MS: 0111 = 7
                true,
                true,
                true,
                false
            };

            var uartController  = new GertbotUartController(0x00);
            var objectUnderTest = new GpioController(uartController, new MotorController());

            await objectUnderTest.writePins(input);

            Assert.AreEqual <byte>(0x72, uartController.LatestPinBitsSent);
        }