MySQL Forums :: Connector/Arduino :: Incompatible with Wire.h and I2C

Advanced Search

Re: Incompatible with Wire.h and I2C
Posted by: Charles Bell ()
Date: December 02, 2013 08:09AM

They are compatible in the sense that they do not conflict for pins and such but combined use too much memory for variables. This shouldn't be a problem on larger Arduino boards, but for Uno, Leonardo, and the like it is.

If you use only static strings you can use PROGMEM to store your strings which will permit enough free memory to use both Wire and the MySQL connector. However, PROGMEM won't help much if you need dynamic strings (or buffers to build strings). The connector and Wire libraries are just too large to be used together on a Uno or lower board.

The options at this point are to use a larger board like a Mega or use a second Arduino to capture your sensors and forward the data to the first Arduino to store it in the database. There are several ways of linking two Arduino - see the serial examples, not the I2C examples. ;)

Options: ReplyQuote

Subject Views Written By Posted
Incompatible with Wire.h and I2C 2393 Erick Katzenstein 11/18/2013 06:33PM
Re: Incompatible with Wire.h and I2C 1365 Charles Bell 12/02/2013 08:09AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.