I am new for Development. For Arduino Basic Usage
Code:
Wire.begin()
Begin using Wire in master mode, where you will initiate and control data transfers. This is the most common use when interfacing with most I2C peripheral chips.
Code:
Wire.begin(address)
Begin using Wire in slave mode, where you will respond at "address" when other I2C masters chips initiate communication. Transmitting
Code:
Wire.beginTransmission(address)
Start a new transmission to a device at "address". Master mode is used.
Code:
Wire.write(data)
Send data. In master mode, beginTransmission must be called first.
Code:
Wire.endTransmission()
In master mode, this ends the transmission and causes all buffered data to be sent.
Receiving
Code:
Wire.requestFrom(address, count)
Read "count" bytes from a device at "address". Master mode is used.
Code:
Wire.available()
Returns the number of bytes available by calling receive.
Code:
Wire.read()
Receive 1 byte.
How can I use similar function for Raspberry Pi ? Is it possible or Not ? I am using wiringPi Library.
Kindly help me to solve the problem. If you can provide example or sample that will be helpful for me.