Hello,
I'm new and trying to understand my Nettduino.
I try to talk to the MCP23017. I get no result.
I want to understand how this I2C works.
This ist my Code.
namespace I2C_Test_MCP23017{ public class Program { public static void Main() { ushort MCP23017_addrese = 0x40; int busrate = 400; byte[] WriteBufferFalse = {0x00} ; byte[] WriteBufferTrue = { 0xFF}; byte[] addr = { 0x00}; I2CDevice.Configuration test_Config = new I2CDevice.Configuration(MCP23017_addrese, busrate); I2CDevice Test = new I2CDevice(test_Config); //Port false I2CDevice.I2CTransaction[] writePortfalse = new I2CDevice.I2CTransaction[] { I2CDevice.CreateWriteTransaction(addr), I2CDevice.CreateWriteTransaction(WriteBufferFalse) }; I2CDevice.I2CTransaction[] writePortTrue = new I2CDevice.I2CTransaction[] { I2CDevice.CreateWriteTransaction(addr), I2CDevice.CreateWriteTransaction(WriteBufferTrue) }; while (true) { Test.Execute(writePortfalse, 1000); Thread.Sleep(500); Test.Execute(writePortTrue, 1000); Thread.Sleep(500); } } }}