I'm thinking about implementing a GPS+I2C inertial measurement system (IMU) in Erlang. I would like to start taking multiple samples from a set of I2C slaves based on the GPS 1PPS mechanism, in order to measure everything at the same time.
Since Erlang uses message queues for receiving messages, what can I do to ensure synchronization between GPS and I2C sensors? Can I handle both in separate processes without losing synchronicity?