Up Board GPIO and I2C using
Hi Everybody,
I have tried to use up-board GPIO pins and I2C with aaeonEAPI library files in windows C# application.
1- Going to the Up-Board bios setting I have enabled I2C and after doing so the 3 LEDs in the back of the board turned on after restart. Although trying to use EApiI2CWriteReadRaw function of the API, I am always getting a fixed data output when using any of the IDs: EAPI_ID_I2C_EXTERNAL, EAPI_ID_I2C_LVDS_1 and EAPI_ID_I2C_LVDS_2. I want to know which one is the correct ID I should be using. although all these three whether I connect the I2C hat to the up-board or not I get same results form the address I am trying to read from.
this is how I am trying to read
uint ID = EAPI_ID_I2C_EXTERNAL; //I have tried other two IDs
object Data3 = 0x03; //as well as 0x4, 0x05 and 0x06
EApiI2CWriteReadRaw(ID, 0x10, 0, 0, ref Data3, IntPtr.Size, 1)
2- I also tried to set pins high or low either from the bios of the up board in Hat Setting section or using the code and in either of the methods I didn't see any change in the level of the pin (high or low). (for example I tried GPIO 11 pin 29 trying to set it as high output but after restart it stays at low.
Also I always get the EAPI_STATUS_SUCCESS when I try to set pins high or low or read from I2C.
I will appreciate if anyone can help me configure and do this.
Thanks
Answers
-
@NIupboard
Up board EAPI id 0 is HAT pin 3/5, id 3 is HAT pin 27/28.
you can refer our windows demo app to testing your board to make sure it's not hardware problem.