简体   繁体   中英

Communication between Raspberry Pi 2 and a PC via internet

My issue is that I am trying to run a java code on my Raspberry Pi 2 that display text based on command sent from my PC (which is not in local network, or physically connected with the Raspberry Pi 2). My problem is that I did not even know where to start from!

My current attempt:

My initial idea was that I would manage to send the text to a website or via Dropbox and then it would be simple for the Raspberry Pi 2 to read this text using a simple Java code. The issue was that setting up Dropbox seems like an overkill since it is just a simple text that I want to transfer. As for reading texts from website I got stuck on how on earth can I create a dummy website where I can simply update its text content using Java code or any other program without actually opening the website or using my PC as a server.

If I am overthinking and there is a simpler solution it is definitely welcomed and appreciated :)

your solution is fine, i'd suggest to go with something like github or gist (something [only] you can edit).

best solution would be if you had a webservice running on your raspberry pi, so you can send commands to it via webservice calls. (google for spring-boot simple rest service)

eg: see --> here

another option would be to have FTP running on your PI and sending the commands to a text-file on your pi via FTP.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM