static void Main(string[] args) { Console.WriteLine("\nRemote I/O PCA9534 GPIO Port Toggle Test\n"); IO.Remote.Device remdev = new IO.Remote.Device(); IO.Interfaces.I2C.Bus bus = new IO.Remote.I2C(remdev, 0); IO.Devices.PCA9534.Device dev = new IO.Devices.PCA9534.Device(bus, 0x27, IO.Devices.PCA9534.Device.AllOutputs); for (;;) { dev.Write(0x55); dev.Write(0xAA); } }
static void Main(string[] args) { Console.WriteLine("\nRemote I/O PCA9534 GPIO Pin Toggle Test\n"); IO.Remote.Device remdev = new IO.Remote.Device(); IO.Interfaces.I2C.Bus bus = new IO.Remote.I2C(remdev, 0); IO.Devices.PCA9534.Device dev = new IO.Devices.PCA9534.Device(bus, 0x27); IO.Interfaces.GPIO.Pin GPIO0 = new IO.Devices.PCA9534.GPIO.Pin(dev, 0, IO.Interfaces.GPIO.Direction.Output, false); for (;;) { GPIO0.state = !GPIO0.state; } }
static void Main(string[] args) { Console.WriteLine("\nUSB HID Remote I/O PCA9534 GPIO Port Toggle Test\n"); IO.Interfaces.Message64.Messenger msg = new IO.Objects.libsimpleio.HID.Messenger(); IO.Remote.Device remdev = new IO.Remote.Device(msg); IO.Interfaces.I2C.Bus bus = new IO.Remote.I2C(remdev, 0); IO.Devices.PCA9534.Device dev = new IO.Devices.PCA9534.Device(bus, 0x27, IO.Devices.PCA9534.Device.AllOutputs); for (;;) { dev.Write(0x55); dev.Write(0xAA); } }
static void Main(string[] args) { Console.WriteLine("\nUSB HID Remote I/O PCA9534 GPIO Pin Toggle Test\n"); IO.Interfaces.Message64.Messenger msg = new IO.Objects.libsimpleio.HID.Messenger(); IO.Remote.Device remdev = new IO.Remote.Device(msg); IO.Interfaces.I2C.Bus bus = new IO.Remote.I2C(remdev, 0); IO.Devices.PCA9534.Device dev = new IO.Devices.PCA9534.Device(bus, 0x27); IO.Interfaces.GPIO.Pin GPIO0 = new IO.Devices.PCA9534.GPIO.Pin(dev, 0, IO.Interfaces.GPIO.Direction.Output, false); for (;;) { GPIO0.state = !GPIO0.state; } }
static void Main(string[] args) { Console.WriteLine("\nPCA9534 GPIO Port Toggle Test\n"); if (args.Length != 2) { Console.WriteLine("Usage: test_pca9534_device <bus> <addr>\n"); Environment.Exit(1); } IO.Interfaces.I2C.Bus bus = new IO.Objects.libsimpleio.I2C.Bus(args[0]); IO.Devices.PCA9534.Device dev = new IO.Devices.PCA9534.Device(bus, int.Parse(args[1]), IO.Devices.PCA9534.Device.AllOutputs); for (;;) { dev.Write(0x55); dev.Write(0xAA); } }
static void Main(string[] args) { Console.WriteLine("\nPCA9534 GPIO Pin Toggle Test\n"); if (args.Length != 2) { Console.WriteLine("Usage: test_pca9534_gpio <bus> <addr>\n"); Environment.Exit(1); } IO.Interfaces.I2C.Bus bus = new IO.Objects.libsimpleio.I2C.Bus(args[0]); IO.Devices.PCA9534.Device dev = new IO.Devices.PCA9534.Device(bus, int.Parse(args[1])); IO.Interfaces.GPIO.Pin GPIO0 = new IO.Devices.PCA9534.GPIO.Pin(dev, 0, IO.Interfaces.GPIO.Direction.Output, false); for (;;) { GPIO0.state = !GPIO0.state; } }