I'm working on a large project involving the remote control of a large military vehicle, that uses multiple Arduinos, ESP8266 modules, and I2C to connect them all together.
I'm using a library that I really like called "Arduino-I2C-Port-Expander" that was developed by someone else (not on our team) which you can see at [url removed, login to view] , and I need a the right coder to modify the library so that it can send commands to I2C slave Arduinos to set and get the values of a variable that the slave holds.
Right now the library allows the master Arduino to read a pin on the slave by executing a command like this:
[url removed, login to view](5, HIGH);
which will allow the master to set slave01's pin 5 to HIGH. It is really cool and easy to use.
The library also allows digital reads, analog reads, and PWM in the same way. It does touchscreen XY reads too, but I don't need that.
What I want is for the library to be able to read or write a VARIABLE that is already defined on the slave. So if the slave has a variable defined called "sensorValue" and it is equal to 8, I want the master to be able to execute a command like this to read the variable from the slave, and in this case put the value into the master's variable called "copyOfSensorValue":
// Master code
int copyOfSlave01SensorValue = 0;
copyOfSlave01SensorValue = [url removed, login to view];
The slave sees this I2C command, and sends back the current value of its local sensorValue variable as an INT. Now the variable "copyOfSlave01SensorValue" on the master is set to "8".
I need the same functionality for the master to be able to SET the value of pre-defined variables on the slave. That command would look like this:
// Master code
int valueToSendToSlave = 42;
[url removed, login to view] = valueToSendToSlave;
Now the slave's predefined variable "meaningOfLife" has been set to "42".
I just need to be able to read and write INT variables from slaves for now. I might pay you more later to also add floats, char arrays and Strings.
Is this a project that you could do for us? If so, please advise on your best fixed price (our target is $100 USD). I will make a fast decision on the winning bidder, and would like to have the work completed within 5 days.