Loading...
  Show Posts
Pages: 1 ... 4 5 [6]
76  Using Arduino / Programming Questions / Re: problem reading a string from ethernet shield on: April 19, 2011, 05:25:24 am
I receive this exception

java.net.SocketException: socket is fclose

But I close the socket after reading Arduino reply.
Can you help me?
77  International / Italiano / Re: funzione split() in arduino on: April 18, 2011, 04:11:47 pm
grazie, la proverò presto
78  Using Arduino / Programming Questions / Re: problem reading a string from ethernet shield on: April 18, 2011, 04:05:56 pm
Thanks,I'll try to print exception message.
But if I connect to Arduino by web browser I receive the correct string. All works!!
79  International / Italiano / funzione split() in arduino on: April 18, 2011, 10:23:58 am
salve a tutti!! esiste una funzione split per le stringhe integrata nelle librerie di arduino??
grazie
80  Topics / Home Automation and Networked Objects / Freedomotic open source automation and arduino on: April 18, 2011, 10:14:55 am
Hi, we are developing an open source software for home automation.

This is a brief description

Freedomotic is a building automation framework which cuts time and effort to develop your own building automation software. Freedomotic provides usefull features just like a CMS does for website development.

Open source: GPLv2 license
Distributed & Scalable: can be deployed on a network of cheap peer-to-peer hardware node. It is scalable and provides automatic load balancing across nodes on the network.
Cross-language: it uses a MOM (ActiveMQ) to exchange information between components (JSON and XML text messages)
Cross-platform: Freedomotic is written in Java so it can run on Windows, Linux, Mac, Solaris. Java JRE 6 is required.
Event Based: Every action in the real environment and every interaction with the system (eg: a click on the GUI) is mapped to an event. Events can be intercepted at runtime with Triggers making the behavior of the system fully configurable and not predeterminated.
Modular & Extensible: Freedomotic is modular and can enrich its features using plugins. API are distributed along with the software to easely create new add-ons. It provides OSGi Framework features in a simpler way, leveraging well known OO programmig inheritance.
Semantic-rich: Freedomotic provides a semantic-rich knowledge of the environment to implement intelligence and reasoning systems. No coding is required, the environment can be described using our graphical editor.
Hardware Agnostic: Freedomotic has an hardware abstraction layer to abstract from hardware infrastructure (sensors and actuators) using events, triggers and command.


We want integrate Arduino devices and Freedomotic by creating a simple protocol. So we want invite all Arduino users to contribute to this project.

81  Using Arduino / Programming Questions / problem reading a string from ethernet shield on: April 18, 2011, 09:25:13 am
Hi I have a problem with a tcp socket.
I can send a string command to arduino ethernet shield. All is OK.
But I can't read Arduino reply (it should be "200 OK").
Always there is an exception

This is the java code used to talk to Arduino

Code:
try {
            outStream.writeBytes(message);
            outStream.flush();
            outStream.close();
      } catch (Exception ex) {
            System.err.println("Unable to write " + message + " " + socket.toString()
                    + ". Maybe the device is not connected.");
        }
      try {
            inStream = new BufferedReader(new InputStreamReader(socket.getInputStream()));
            System.out.print("Received string: '");

            while (!inStream.ready()) {}
            System.out.println(inStream.readLine()); // Read one line and output it

            System.out.print("'\n");
            inStream.close();
          } catch(Exception e) {
                     System.out.print("It didn't work!\n");
               }
      socket.close();

     }

The problem is with inStream section

Thanks
Pages: 1 ... 4 5 [6]