コード例 #1
0
        public static void Main()
        {
            Debug.Print("ADXL362 - Test");
            var sensor = new ADXL362(SPI_Devices.SPI1, Pins.GPIO_PIN_D7, 100);

            while (true)
            {
                sensor.Update();
                Debug.Print("X: " + sensor.X + ", Y: " + sensor.Y + ", Z: " + sensor.Z);
                Thread.Sleep(1000);
            }
        }
コード例 #2
0
        public static void Main()
        {
            Debug.Print("ADXL362 - Polling Sample");
            var sensor = new ADXL362(SPI_Devices.SPI1, Pins.GPIO_PIN_D7, 100);

            sensor.DisplayRegisters();
            while (true)
            {
                sensor.Update();
                Debug.Print("X: " + sensor.X + ", Y: " + sensor.Y + ", Z: " + sensor.Z);
                Thread.Sleep(1000);
            }
        }