sleep udoo with arduino 101

Discussion in 'UDOO X86' started by Darknain, Apr 27, 2018.

  1. Darknain

    Darknain New Member

    Joined:
    Mar 7, 2018
    Messages:
    24
    Likes Received:
    2
    Hello,

    I have seen the post : https://www.udoo.org/forum/threads/wake-and-sleep-via-arduino-101.9237/

    I am using linux, do I just need to do this in the arduino sketch to wake up or sleep the udoo ? :

    for(int i=0; i<5; i++) {
    digitalWrite(reset_pin, LOW);
    delay(pulse_time); /* Reset pin goes LOW for 8ms */
    digitalWrite(reset_pin, HIGH);
    delay(pulse_time); /* Reset pin goes HIGH for 8ms */
    }

    and set the reset_pin to 9 ?

    Is there a way to know in the arduino sketch if the udoo is asleep or awake before using this command ?

    thanks
     
  2. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,314
    Likes Received:
    580
  3. Darknain

    Darknain New Member

    Joined:
    Mar 7, 2018
    Messages:
    24
    Likes Received:
    2
    Thanks for the answer, that's very useful.
    If a programm is running (like a web page) on the Udoo and the arduino forces to sleep then wake it up. Will the Udoo be still running the programm ?
     
  4. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,314
    Likes Received:
    580
    Last edited: May 2, 2018
  5. Darknain

    Darknain New Member

    Joined:
    Mar 7, 2018
    Messages:
    24
    Likes Received:
    2
    Thanks ! what about knowing if the udoo is asleep or awake ? Is it possible to know that in the arduino sketch ?
     
  6. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,314
    Likes Received:
    580
    I do not know. Perhaps there is some Braswell pin that changes. You could also check if the serial device between Arduino and Braswell is up. But then you have to check the serial device on the Braswell side too.
     
  7. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,314
    Likes Received:
    580

Share This Page