Reading Multiple Ports for sensors with Netbeans configured with Java

Hi, our group is trying to create a program that can read multiple sensors plugged into different analog ports on the arduino. The program is to be written in java with the use of Netbeans 8.1. after the info is gathered we’d like to send it through an ethernet cable to a computer. Is there any way we can do this? or are there any tips you could help us with? I am more than happy to provide more information as needed. Currently we are looking to follow the wiring setup of the picture attached below.

Force-sensing-resistor-FSR-circuit.png

this is the cite with the wiring. The picture wasn’t showing for me when I checked its functionality

You can go from the Arduino to your PC using serial communications over the USB port. You can then write a program in Java to receive it and do what you like with it. This is OK if you are happy for your Arduino to be tethered to your PC via the USB cable.

If you want your Arduino to be independent of the PC then you will need an ethernet or wireless shield or breakout. In this scenario you would use HTTP over TCP/IP to send the data to a web application you have written in Java and deployed to a container like Tomcat.

IanCMcKee: Hi, our group is trying to create a program that can read multiple sensors plugged into different analog ports on the arduino. The program is to be written in java with the use of Netbeans 8.1.

That is a strange way to describe the project.

The Netbeans or Java program won't be reading any sensors. That will be a task for the C++ program on the Arduino. The Arduino program can send the data to a PC in various ways as already mentioned.

You could write the Arduino program in such a way that a message from the PC would tell it which sensor to read, but it would probably be a great deal simpler just to have it read all of the sensors every time and send all of the data to the PC even if the values have not changed.

...R