Amraresh
Posts: 6
Joined: Tue Mar 06, 2018 10:48 am

How to interface raspberry pi with java

Thu Mar 08, 2018 1:11 pm

Hai,
I am a beginner. I wanna do a project on IoT using raspberry pi. As per my project requirement, I wanna establish bidirectional data transfer between raspberry pi and java. I am going to use Python in raspberry pi. Please let me know how to achieve the same. Please check the attachment for clarity.
FF.jpg
FF.jpg (61.15 KiB) Viewed 345 times

Heater
Posts: 16091
Joined: Tue Jul 17, 2012 3:02 pm

Re: How to interface raspberry pi with java

Thu Mar 08, 2018 1:43 pm

I presume your Java is to be running on a server in the "cloud" or somewhere.

Why not just use HTTP requests from the Pi to that server for communications? A so called RESTfull API.

It's easy to make HTTP GET and POST requests to a webserver in Python. And you will already have a web server in place that can handle them.

Have a google around for RESTful API and you will find lots of discusion about it, examples, etc.
Memory in C++ is a leaky abstraction .

Return to “General discussion”