Hi. I'm Raash and I'm currently doing aquarium monitoring system using Raspberry pi 3(master) and arduino uno(slave). I'm using 5 sensors [ turbidity sensor, temperature sensor(DS18B20), ultrasonic sensor(water level sensor), LDR sensor, and water leak sensor(couple of wires)] to control stepper motor, led ligth,rgb light, 2 dc motor and water heater. I even include RTC to raspberry pi. I connected the raspberry pi and arduino using USB(serial communication).
My question is:
1.How do I control arduino from raspberry pi through this serial communication. I know that you have to send a data from arduino to raspberry pi thru serial.write() and raspberry pi will read it but I have plenty of sensors connected to arduino. How the raspberry pi know which this value are from which sensor? I really confuse about that. I saw plenty of guide from internet where they just show 1 value send from arduino and the raspberry pi read that value. But what about plenty of values?