I'm working on an AllSKy camera enclosure with an Arduino I/O board.
It will have 3 environmental sensors (two BME280, MLX90614, and TSL2591). It will control a case fan and dew heater using PWM to a MOSFET automatically based on internal case BME280 readings.
It will publish this data over the serial port for a simple GUI I'm building in Processing.
While it is running the above code, is it also possible for the Arduino to also monitor serial port for user input to rotate a tiny stepper motor to focus the AllSky camera lens?
I have the code written to monitor BME280, MLX90614, and TSL2591 and report back environmental conditions and calculate SQM for astronomy and compare MLX90614 (sky temp) vs BME280 (ambient temp) and determine the delta and report back if cloudy or clear conditions.
I'm hung up at the point where I would ask the program if a user wants to turn stepper clockwise (focus in) or counterclockwise (focus out), while also reporting the above sensor data.