Python printed messages

Hi, i want to know if there's a way to show all the printed messages in my python script on my Mit app screen?.
I mean, what about if my python script prints any message at any process(ex: Print('The picture was saved correctly'), and more printed messages like that. I wonder if i could show in real time those messages on my mobile ?. I am using a Rpi4 and i'm running my script with a server.

Please elaborate, what exactly you are trying to do... See also

Taifun

i mean, what about if my python script prints any message at any process(ex: Print('The picture was saved correctly'), and more printed messages like that. I wonder if i could show in real time those messages on my mobile ?

I see you tagged your question with 'raspberry', so I guess your Python is running outside of AI2 in your raspberry device?

In that case, I would go looking for a way to feed your print stream into a BlueTooth device for transmission to an AI2 app.

1 Like

Of course!, i am using Rpi 4 for my script. In my proyect i've comunicated it with the apk with this https://www.youtube.com/watch?v=x10ndPdM6Vc&t=275s to start the script, but it's without bluetooth comunication. But i haven't been able to resent information to the apk.
I'll try to change communication and do it with Bluetooth. Do you consideer it'd be a better way?

I see a web server in the YouTube video you posted.

If you can run a web server on your raspberry, then the AI2 Web component should be able to GET and POST to it, assuming you can tell the AI2 app the URL of your raspberry.

I use php to send bash commands to an RPI and receive output back (with a web server on the RPI)
Also, with an extension, it is possible to send bash commands over ssh, and get back the output.

1 Like

I finally found a way to print on my apk the process hapenning in my system ( on my rpi4). I used Firebase and with that i was able to send and recieve messages between both systems. It was easy at the end.
WhatsApp Image 2022-04-18 at 4.43.28 PM

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.