8 Replies Latest reply on Nov 21, 2016 12:50 PM by Intel Corporation

    Intel Edison Arduino Barrel DC power jack - sketch after 2 minutes

    javilez

      Hi. I am developing an application that controls irrigation electrovalves. The problem is that the application stops after a few minutes running, sometimes lasts longer and another less.

      I’m running the latest image 201606061707 and I am using the Arduino IDE 1.6.0. I have reviewed the code and I do not see the problem.

       

      I have decided to make an example that turns on and off a led and test whether or not to end the application. If I powered intel edison by computer via a USB cable the sketch lasts longer than if I powered

      intel edison by DC power jach (witch a power supply of 12vdc), and I do not understand why.

       

      I found online that when using unsigned long variables I had to establish value using L.

       

      Someone has had this problem that stops the sketch if powered the intel edison with barrel dc power jack?. I do not know if it's an error in the following sample code:

       

      int led = 13;
      unsigned long seconds = 1000L;
      unsigned long minutes = seconds * 60;
      unsigned long hours = minutes * 60;
      
      // the setup routine runs once when you press reset:
      void setup() 
      {               
        // initialize the digital pin as an output.
        pinMode(led, OUTPUT);
      
        Serial.begin(9600);
      }
      
      
      // the loop routine runs over and over again forever:
      void loop() 
      {
        Serial.print("Wind");
        digitalWrite(led, HIGH);
        delay(5 * seconds);      
      
        Serial.print("Pause");
        digitalWrite(led, LOW);   
        delay(5 * seconds);
      }
      

       

      Thanks.