![]() ![]() To be able to imagine how your project looks like, please describe how the Arduinos are interconnected and how the sensors are connected to the Arduinos. If you have faulty hardware on the bus and you want the Wire library to reinitialize the hardware if the faulty sensors are blocking the bus again, use the patch provided in this thread. So if your sensors are touching the clock signal the Arduino is doing what it should do, wait until the sensor allows the bus to be used again. The only way I can imagine that the bus will let the Arduino hang is by the clock stretching feature. ![]() The reason I want to avoid the wire library is that I have a board with 2 blown thermistors and the wire library seems to hang on the acknowlegment from those two thermistors. I have changed all the wire calls to wire1 but are not sure about the Serial.Your library is called I2C Master because it only implements the master part of an I2C bus, so you can use it only on the master but not on the slaves. While (Wire1.available()) data = Wire1.read() Wire1.requestFrom(deviceaddress, num_chars) ![]() define large string of data to be writtenĬhar str_data = while ((data) & (counter > 8)) // MSB The problem is that when I Serial.print I only receive 'DATA READ' /*eeprom_LongStrings I tracked down another program that writes/ saves a string. If (Wire1.available()) rdata = Wire1.read() Wire1.write((int)(eeaddress & 0xFF)) // LSBīyte readEEPROM(int deviceaddress, unsigned int eeaddress ) Void writeEEPROM(int deviceaddress, unsigned int eeaddress, byte data ) Serial.print(readEEPROM(disk1, address), DEC) WriteEEPROM(disk1, address, 123) //save the number '123' #define disk1 0x50 //Address of 24LC256 eeprom chip I am currently saving 1 number to the ext eeprom, but when I change the number from 123 to 456 I get a wrong Serial.print number back. I have read the above and Im not sure if this is correct. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |