The problem is I have two servos and a lidar sensor both accessing the COMM3 serial port
I can't make sense of your description at all.How can servos be connected to a USB port?If the servos and the Lidar are connected to an Uno then they are not using a COM port - only the Uno is using it.If the Lidar does connect to the PC USB port (without needing an Arduino) then it should be on a different COM port.Make a simple pencil drawing showing how you have things connected and post a photo of the drawing. Please DO NOT use Fritzing....R
Nonsense. Servos can not access a COM port. I'm not aware of any LIDAR sensors that can, either.So, you really need to try again. How many Arduinos are connected to the PC via serial ports?Processing can talk to multiple serial ports at a time. Only one Arduino can be connected to a serial port.
Let me rephrase. I have ardunio code running the initial setup. The lidar sensor reads the distance and sends it to the serial monitor. That then has to be sent over to processing using the serial library. Both the servos and lidar sensor are just connect to digital and analog pins on the ardunio itself.
You need to be much more precise with your descriptions - otherwise you just confuse yourself as well as us.The Lidar sensor does NOT send anything to the serial monitor. It provides data for the Arduino and the Arduino sends it to the serial monitor.As you have discovered the Arduino cannot send data to two programs (the Serial Monitor and Processing) at the same time. You must choose one or the other. You can easily write code in Processing to display the data it receives from the Arduino as well as acting on the data....R
I have something along the lines of
Which means only the lidar or servos can send information from ardunio to processing, not both together.
We do NOT deal with "something along the lines of" here. We deal with exact code.Why are you using Serial.write() to send the data?Utter nonsense. Neither a LIDAR or a servo can send data to the serial port. Only the Arduino can.Post your Arduino code. Post your Processing code. Or take a hike. You choose, but quit spouting nonsense and claiming we don't understand you.
From what I'm seeing so far, the ardunio can only get data from either the lidar or the servos only to send to the serial port to get it sent to processing. I'm trying to see if it's possible to have the data from both the servos and lidar sent over from the ardunio to processing.
Yes, it is. IF you write the proper code on the Arduino AND in Processing.
Do you have any tips or ideas on how to make do this more simply?
Same one I had earlier, that you ignored. POST YOUR CODE!