Arduino Communication

Discussion in 'UDOO 101' started by joemcder, Oct 23, 2013.

  1. joemcder

    joemcder New Member

    Joined:
    Oct 21, 2013
    Messages:
    17
    Likes Received:
    0
    After creating the port link:
    sudo ln –sf /dev/ttymxc3 /dev/ttyS0

    The Arduino Due IDE worked smoothly. Naturally I immediately ran the blink sample which works as expected but leaves several questions.

    1. Uploading a program resets the Arduino SAM3X, but how I do that in software.? For example, from a C++ or Python program on the Udoo. (I found the Arduino hardware reset which works just fine.)

    2. When Ubuntu is shutdown the SAM3X is still running the blink program since the board is still powered. How would I shutdown the Arduino at the same time?

    3. No blinky lights!! The blink program requires me to add my own LED. What dummkopf forgot the blinky lights!
    I want an immediate refund :)

    4. The Arduino IDE defines two 'boards':
    a)Arduino Due (Programming Port) and b)Arduino Due (Native USB Port)
    Both worked OK, but I am not sure of the meaning or pratical uses.
     
  2. firehopper

    firehopper Member

    Joined:
    Jun 10, 2013
    Messages:
    154
    Likes Received:
    1
    to reset somehow you need to set the dtr pin either high or low.. thats usually how a arduino is reset by a computer.. I could be wrong mind you. :)
     
  3. mkopack

    mkopack Member

    Joined:
    Jun 14, 2013
    Messages:
    451
    Likes Received:
    21
    Joe,

    You obviously are familiar with arduino, and this should already know that if the arduino has power, it's running! There is no "shutdown" on arduino. Just remove the power.
     
  4. gionji

    gionji Member

    Joined:
    Jun 28, 2013
    Messages:
    38
    Likes Received:
    0
    Hi joemcder,
    i hope i'll give you correct answers :)

    1. i.MX6 can reset SAM3X moving a gpio connected to (SAM3X MASTER_RST signal).
    i.MX6 pad name: GPIO_0
    i.MX6 alternate funcion: gpio01_IO00
    exported gpio name: gpio0

    The SAM3X is reset when this signal is LOW. So yu can access gpios for example:

    Set gpio 0 in output mode
    Code:
    echo OUT > /sys/class/gpio/gpio0/direction
    Reset the SAM3x
    Code:
    echo 0 > /sys/class/gpio/gpio0/value
    Wait for some millis and restore HIGH value on gpio 0
    Code:
    echo 1 > /sys/class/gpio/gpio0/value
    Restore input mode
    Code:
    echo IN > /sys/class/gpio/gpio0/direction
    You can do the same calling "system" commands.

    2. With lastest version of kernel, when Ubuntu is halted the SAM3X is reset, so it doesn't blink. With previous version of the kernel, SAM3X doesn't stop execution.

    3. We are so sorry :) But seriously we are planning to add PIN 13 LED in next UDOO hardware revision, cos it's useful in debug mode.

    4. At the moment are exactly the same, cos we are forcing the SAM3x port on ttymxc3 on both options.

    Gionji ;)
     
  5. mangsab

    mangsab New Member

    Joined:
    Oct 17, 2013
    Messages:
    16
    Likes Received:
    0
    Is it possible to using I2C communication between MX6 and Arduino? I saw on diagram pin is connected. But when put some I2C code to DUE and MX6 can't detect with i2cdetect command.

    Also I like to see LED on PIN13. And look forward to have SPI port on next UDOO version. Many shield today using this port.

    :)
     
  6. mangsab

    mangsab New Member

    Joined:
    Oct 17, 2013
    Messages:
    16
    Likes Received:
    0
    I've test sample I2C code on Arduino. Udoo uboot detect I2C address correctly. I still find the way to make it appear on ununtu.
     
  7. joemcder

    joemcder New Member

    Joined:
    Oct 21, 2013
    Messages:
    17
    Likes Received:
    0
    Thanks to everyone for all the fast responses. A lively forum will probably determine the success of Udoo.

    Two follow ups:

    I detect a marketing ploy. You add blinky lights in the next revision to induce us to buy another board. A diabolical scheme from the dark side :)

    What is the longer term intention. Eventually I & others will want higher speed than 115200 baud which is so retro.
     
  8. neetgeek

    neetgeek New Member

    Joined:
    Oct 27, 2013
    Messages:
    2
    Likes Received:
    0
     

Share This Page