I am working on a project that requires me to execute a C++ program on my laptop, and, the result of the program will determine the actions of the Raspberry Pi, which is triggered using some Python code. But, I need a way to connect the Pi to my laptop, and sending a byte of data across to the pi (hopefully in real-time) but how would I do this?
I have a C++ program, which, I execute through the use of a web page (that is stored on localhost). I execute a command, the program then returns a byte of information usually either "1" or "0" which I am hoping to send to the pi. The pi will execute python code, when the result from the C++ program is given, the code will then perform different actions. I do not want to use sockets, web or not. The main problem is the fact I am doing this away from my home, so, IP addresses and firewalls are very limited. I was thinking that if I had a file on the pi, and when the C++ program executes, it updates the file on the pi with either a "0" or "1" and in the python code (on the pi) just have a
while (true)statement which keeps reading the value from the file. I don't mind about polling it too much, because, it's only a very short demonstration.
I hope someone can offer atleast some help with this, as it's confusing me a lot.