Simple read in Java
in
Contributed Library Questions
•
11 months ago
Hi,
I'm trying to develop a simple example in Netbeans: just read an eml and show the result. My code:
- import eeml.*;
- import processing.core.PApplet;
- @SuppressWarnings("serial")
- public class ExempleEEML extends PApplet {
- DataIn datain;
- @Override
- public void setup() {
- datain = new DataIn(this, "localhost:5210", 1000);
- }
- @Override
- public void draw() {
- System.out.println(datain.getValue(0));
- }
- public void onReceiveEEML(DataIn d) {
- float myVariable = d.getValue(0);
- System.out.println(myVariable);
- }
- }
Main:
- public class MainClass {
- public static void main(String[] args) {
- ExempleEEML e = new ExempleEEML();
- e.setup();
- }
- }
But I had just this message: "New DataIn created attempting to access localhost:5210 every 1000 milliseconds."
I could't see the values...
Please, could someone help me?
1