It is identical except registerAddress is a uint16_t Parameters: address - uint8_t NOTE: For devices with 16-bit register addresses use I2c.write16(address, registerAddress). ![]() Typically used to set the "pointer" to a register address Initiate an I2C write operation with no data sent. Returns: none I2c.write(address, registerAddress) Description: The timeout feature was implemented so if there is a problem with the bus during the scan, it will display on Serial Monitor that there was a problem. Returns: none I2c.scan() Description: Scans the bus for I2C devices and reports back each 7 bit address to the Serial Monitor. The amount of time to wait before timing out. ![]() If a lock up occurs the returned parameters from Read and/or Writes will contain a 1. On a side note, be careful with setting too low a value because some devices support clock stretching which can increase the time before an acknowledgement is sent which could be misconstrued as a lockup. Setting the value to zero will disable the function. This allows the user to define a time out in which the I2C will release itself and reinitialize and continue on with the next function. I2C bus lockups have a tendency to freeze a program which typically requires a power cycle to restart your program. Returns: none I2c.timeOut(timeOut) Description: Allows the user to program a time out limit to prevent and recover from I2C bus lockups. True: Enable internal pullup resistors (default) Returns: none I2c.pullup(activate) Description: Enables/disables internal pullup resistors Parameters: activate - Boolean ![]() For more details see the documentation below, section titled: Low-level Methods Documentation I2c.begin() Description: Enables the I2C hardware Parameters: none Returns: none I2c.end() Description: Disables the I2C hardware Parameters: none Returns: none I2c.setSpeed(fast) Description: Enables high speed mode (400kHz) Parameters: fast - Boolean
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |