I am working on a project in which I receive a stream of data from a distance-measuring sensor(VL53L0x sensor). This data is populated onto my Serial monitor and I send this info to my python compiler to perform tasks (eg. taking the average of the 5 consecutive distance points etc. ) using the "pyserial" library. However, based on those python tasks, I wanted to send info back to the servo motor connected to my Arduino simultaneously. eg. If the avg. distance is 20mm, servo motor should be angled at 110deg.

I am unable to find a solution on how I could do this. Could you recommend a way I could receive input and also send output to Arduino pins in real-time?


  • 2
    Why send the data to your PC to do simple processing when the Arduino can do it itself much more simply?
    – Majenko
    Jun 4 at 12:07
  • How many places have you posted this question or something very similar?
    – Gil
    Jun 5 at 0:13


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.