Greetings!
I'm in a project group (mechatronics engineer, last year) where we have made a sensor module for hydraulic systems. Temp, flow, pressure, etc. showing on a LCD screen. We have two hours of programming a week, so we learn mostly all by googling, programming and youtubing.
Our next step is to send these values from the Arduino Nano to a Particle Electron microcontroller that connects to a Blynk mobile app. I am currently working on sending these values through TX/RX. The best way I have figured out is sending all values from the 5 sensor at the same time and read each part. Either send 00 or send the values.
sensor1 = readString.substring(0, 2);
sensor2 = readString.substring(2, 4);
Do you recommend this as maybe the best way?
We have voids() for each sensor as we use a buffer (dtostrf) for the LCD. We messed a lot with it, but it is working now.
I have changed "void temp()" to "int temp()" to actually get the values out, and in the loop I got "int tempvalue = temp();" and use return; function. From there I am currently at:
if (tempvalue > 0) {
Serial.print(tempvalue);
} else {
Serial.print(00);
}
I switched here from .print to .write (?). My plan is to either send "00" or send "XX" values from all the sensors. Through serial: "AABBCCDDEE".
I am testing and trying out, but the project needs to be done next week. We have been working on it for a year. I am programming it alone without any previous programming experience, so I am calling to the gods here to put me in the right direction. Do you have any tips? Is this the right approach?
If anyone wants the Arduino code and Particle code, I am more than happy to PayPal for your service.