eBoard  id: 189
Written for SIA 2017/2018
I2C-Connection
/**
@page i2c Exmaple: I2C-Functionality
@brief a tutorial for the I²C-Extension
@todo examples and sections for all functions
@note To use this:
@code
#define EBOARD_I2C 0x1
@endcode
- It is possible to send Data via I2C with sendI2C() \n
- It is possible to read Data via I2C with readI2C() \n
- It is possible to scan for I2C addresses with pingI2C(); \n
@section Example
An Example of how to scan for I2C addresses:
@code
#include <Wire.h>
#define EBOARD_I2C 0x1
#include <SPI.h>
#include "/home/eagleoutice/Dokumente/proj/_sia/src/eBoard.h"
int main() {
optVAL_t test[3] = {0,0,0};
pingI2C(test,3);
Serial.println(test[0]);
return 0;
}
@endcode
Connected an PCF8591 this produces this output:
@code
72
0 -- Exit Code.
Program has finished. Reset to start again
@endcode
@note The size of the optVAL_t array can be as big as you want to... If its smaller than the amount of addresses found, the addresses will be lost.
*/