All the SA boards are controlled by the Arduinos. All Arduinos listen to the same shared serial RS485 line (along with the Raspberry Pi). When the proper serial command is received, it will interpret the command and respond w/ data.
To be clear, on the Python script (DPU), one might send out a command with the following ( for a simpler example, see server_test code):
data = {'param': 'temp', 'value': [4095] * 16, 'immediate': True}
evolver_ns.emit('command', data, namespace = '/dpu-evolver')
This would be sent via Websockets to the Raspberry Pi where it triggers a command to send all the following commands to the Arduinos. The first position in the ‘value’ array corresponds to vial position 0, 2nd position → vial 1, etc.
All arduinos will see the following command via the shared RS485 but the only Arduino with that particular address programmed into the code will respond to it. There will be a handshake between the Arduino and the Raspberry Pi that everything was properly received.
temp4095,4095,4095,4095,4095,4095,4095,4095,4095,4095,4095,4095,4095,4095,4095,4095,_!
Next, the Arduino interprets the array and stores 4095 as the set value for all 16 vials and then responds with what the current temperature readings are that go back to the Raspberry Pi. Please look at the Arduino code for temperature as an example.
How the particular code deals with the setpoints is up to the specific program itself. For example, in the temperature code, the Arduino will read the thermistor on SA slot 4 across all 16 vials, compare it to the setpoint via a PID control algorithm, and individually tune the heaters on each vial via PWM (pulse width modulation). The specifics of how you actually control the heater and read the thermistor is hardware specific (though very basic schemes can be used for a lot of applications; e.g. PWM and ADC). The arduino allows you to program a custom, modular script to control whatever sensors and actuators you want to control.
For more information, please read pages 2 - 27 of our Supplemental Information of our manuscript. The bioarxiv version can be found here.
Hope this helps clarify some things.
Brandon