I am looking to just make sure I correctly understand the fundamentals for how robotic systems typically receive and process inputs from sensors.
It is my understanding that a sensor peripheral, such as a camera or a temperature gauge, will be built to either send its data over port (perhaps a serial port such as USB) or over individual wires that must be soldered/connected to the I/O pins of the controller running the robot's firmware/software. So perhaps the camera is a USB camera that expects to send RGB video frames over the attached USB cable to whatever is listening at that USB port. Or perhaps the temperature gauge is sending real-time temp readings over a few wires to whatever those wires are connected to.
It is my understanding that the robot's firmware must use device drivers to read/write values over its I/O pins for talking with these sensors. So both the camera and temperature gauge must have device drivers so that the firmware must talk to it. In the case of a USB camera, the USB drivers almost assuredly already exist for the OS, unless its a real-time OS that for whatever reason doesn't have USB drivers written for it. And in the case of the temperature gauge, either the manufacturer would write and provide device drivers for the gauge's use on numerous/common OSes, or I would have to write my own device driver for the gauge myself. In that case I could write a device driver to expect listen and read for signals coming from, say, pins 9-14, and to send any values written to those pins (by the temp gauge) on to a memory buffer that my firmware could read them out of.
So I ask: how'd I do? Is my understanding of this process correct? Or is it grossly midled or off-base somehow? Thanks in advance for any steering or course correction!
temperature gauge must have device driver
... not necessarily true ... the robot controller GPIO pins may be what has a device driver ... the OS reads the value of the GPIO pins ... if the control board does not have OS then there may not be any drivers at all $\endgroup$