I need help with accepting position co-ordinates x,y,z in real time. It will be great if someone could provide any suggestions.
Hello abcd_123
Welcome to the best Arduinoforum ever.
Take a search engine of your choice and ask the WWW for 'co-ordinates x,y,z in real time +Arduino' to get some basic ideas.
Please describe "real time".
It would be great if you could give a more extensive description of what you want to achieve, which board you are using and where your xyz coordinates are coming from (e.g. Serial, computer at the other side of the world connected via the WWW, ...). And maybe post your sketch so we can see what you're currently doing / trying? When posting your code (complete), please use code tags as described in https://forum.arduino.cc/t/how-to-get-the-best-out-of-this-forum/679966#posting-code-and-common-code-problems.
Thank you so much for your response. I am using an Arduino 2560. Currently, working on a fire detection system. Where the fire will be detected by a thermal camera. And the coordinates will be sent to Arduino through a python code. I am supposed to write the code for arduino which will accept these co-ordinates and rotate the stepper servo motor accordingly.
If you communicate over serial, you can have a look at Robin's updated Serial Input Basics tutorial. He also wrote a matching python side: Demo of PC-Arduino comms using Python - #11
And a more recent tutorial: Two ways communication between Python3 and Arduino - #27 by herbschwarz
Note that whatever you write needs to match the sender or the sender must match what the Arduino expects.
- If the sender is already there, you will need to analyse what it sends and your code needs to understand that.
- If the sender does not exist yet and needs to be written, you need to discuss with those that are writing the sender that your Arduino is expecting a certain format (e.g.
<x,y,z>).