Show Posts
Pages: [1] 2 3 ... 16
1  Products / Arduino Yún / Re: delete file from SD and call HTTP on: September 08, 2014, 07:09:10 am
sonnyyu why did you declared "Process mioProcessoLinux" in every loop and not only as global variable used by setup and loop?
thanks
2  Products / Arduino Yún / Re: delete file from SD and call HTTP on: September 08, 2014, 03:41:44 am
thanks sonnyyu and wildpalms. Using sonnyyu solution I have understood that the problem was in calling client.available and client read instead of mioProcessoLinux.available() mioProcessoLinux.read(). Strange...
3  Products / Arduino Yún / Re: delete file from SD and call HTTP on: September 04, 2014, 07:29:23 am
You are right. In my real sketch it was ok, in this example I forgot "/mnt/sd/".  Thanks!
Anyway the problem is not this one so any other suggestion would be really appreciated.
Thanks in advance
4  Products / Arduino Yún / delete file from SD and call HTTP on: September 03, 2014, 11:10:23 am
Hello. I have a problem with my arduino yun. I can use the wifi , read and write from the sd without problems but if I cancel a file from the SD after I cant communicate with the internet.

Here is a sketch for test

Code:
#include <SPI.h>
#include <Wire.h>
#include <Bridge.h>
#include <HttpClient.h>
#include <FileIO.h>


HttpClient client;
Process mioProcessoLinux;

void setup() {
    Bridge.begin();
  Serial.begin(19200);
  while(!Serial);
    Serial.println("seriale avviata");
  
  if (!FileSystem.begin() ) {    
    Serial.println("Cant use SD!");
  }
  else
    Serial.println("Ok it works");
    
  File mioFile = FileSystem.open("/mnt/sd/valori.txt", FILE_APPEND);
       if (mioFile) {

          mioFile.println("I hope it would work");
          mioFile.close();
          }
}



void loop() {
  // put your main code here, to run repeatedly:
      mioProcessoLinux.begin("curl");
      mioProcessoLinux.addParameter("-i");    //stampo l'header
    
      mioProcessoLinux.addParameter("http://arduino.cc/asciilogo.txt");
      mioProcessoLinux.run();
      while (client.available()) {
        char c = client.read();
        Serial.print(c);
      }
      Serial.flush();
        
      Serial.print("linux ");
      Serial.println(mioProcessoLinux.exitValue());

      FileSystem.remove("/mnt/sd/valori.txt");      //After this HTTP does not work!!!

      mioProcessoLinux.begin("curl");
      mioProcessoLinux.addParameter("-i");    //stampo l'header
    
      mioProcessoLinux.addParameter("http://arduino.cc/asciilogo.txt");
      mioProcessoLinux.run();
      while (client.available()) {
        char c = client.read();
        Serial.print(c);
      }
      Serial.flush();
        
      Serial.print("linux ");
      Serial.println(mioProcessoLinux.exitValue());

      delay(1000);
}

Do anyone have the same problem?
Any idea about how to solve this strange behaviour?

Thanks in advance for any help!
5  Products / Arduino Yún / SD file.available() not working on: July 28, 2014, 09:18:31 am
Hi, does anyone can use the SD bridge function file.available()?
If I try to run the  datalogger example (http://arduino.cc/en/Tutorial/YunDatalogger) adding a check for the SD to be written or not:

Code:

....
  // The FileSystem card is mounted at the following "/mnt/FileSystema1"
  File dataFile = FileSystem.open("/mnt/sd/datalog.txt", FILE_APPEND);

  if(dataFile.available()>0)
    Serial.println("file already written");

  // if the file is available, write to it:
  if (dataFile) {
    dataFile.println(dataString);
    dataFile.close();
...

The program always stop on file available. looking at FileIO.cpp does not help so much.
Any suggestion?
Thanks in advance
6  Development / Suggestions for the Arduino Project / bug in YUN documentation Bridge library on: July 23, 2014, 08:41:33 am
From http://arduino.cc/en/Reference/YunBridgeLibrary go to any member of the "YunClient Class" you will see that it derives from "Bridge : HttpClient Class ". This is wrong and of course should be "Bridge : YunClient Class ".
7  Products / Arduino Yún / Re: yun selected ip interface on: July 23, 2014, 02:19:14 am
thanks
8  Products / Arduino Yún / Re: Yun "create interface" on: July 22, 2014, 09:11:09 am
do you mean that I can only use the yun as a server if it is wifi and not if it is connected using ethernet? looking at the "create interface" page the available interfaces are:
   [Ethernet Adapter: "eth0"] Ethernet Adapter: "eth0"
  [Ethernet Adapter: "eth1"] Ethernet Adapter: "eth1" (wan)
  [Wireless Network: Master "Arduino Yun-90A2DAF02784"] Wireless Network: Master "Arduino Yun-90A2DAF02784" (lan)
  [Custom Interface] Custom Interface

so I think eth0 concern the wired one but I don't know what is that for...
9  Products / Arduino Yún / Re: yun selected ip interface on: July 22, 2014, 08:47:48 am
If I have to contact the yun ok but if it's the yun that send packet to the internet which interface would it use?
10  Products / Arduino Yún / yun selected ip interface on: July 22, 2014, 08:09:33 am
Hi, if I have both interaces (wifi and ethernet) configured to be client or server what is used to route my packet? The client constructor does not specify if I want to create a client that use the wifi or the ethernt.


Thanks in advance
11  Products / Arduino Yún / Yun "create interface" on: July 22, 2014, 06:53:41 am
Hi does anyone know where can I found information about the create interface screen on the yun web setup? What kind of interface can I add? And what is "eth0"?
Thanks in advance
12  Using Arduino / Project Guidance / Re: Arduino + Xbee-Pro 868 temperature system on: July 21, 2014, 03:16:14 am
I am using two xbee pro 868 with arduino without problems. Using these shield:
http://arduino.cc/en/Main/ArduinoWirelessShield
http://shieldlist.org/libelium/xbee

I have never encountered electrical problems. I use API and AT mode and I can confirm you that the same library written for Xbee series 2 ZigBee works perfectly with the pro 868 xBee.
13  Using Arduino / Project Guidance / Re: arduino wifi shield and ip lease on: February 17, 2014, 03:44:38 am
Looking at the wifi shield behaviour I think the IP lease is managed directly by the firmware and that it is not necessary to care about as we need to do in the ethernet library.
14  Community / Bar Sport / Re: Anyone using Arduino official wifi shield? A lot of questions and no answers. on: December 18, 2013, 03:04:56 am
may be one solution is to periodically call the wifi.begin but I don't thing this is the best way to solve the lease problem
15  Using Arduino / Project Guidance / arduino wifi shield and ip lease on: December 17, 2013, 04:34:43 am
hello. Looking at the arduino official wifi shield library I can't see anything like an equivalent of the ethernet.mantain() function for reneving the ip addres once the lease has expired. This is not dicrectly handled by the shield, if I change ip from my router and I do not execute once again the wifi.begin() it stays with the old ip number. I do not want to call the wifi.begin() every time I need to send packets on the net because this solution is too much stupid. Do you have any suggestion to solve this problem in a more optimized way?
thanks in advance for any suggestion.
Pages: [1] 2 3 ... 16