Programming for UDOO

Discussion in 'General Programming Discussion' started by rpgnick, Jun 23, 2013.

  1. anlumo

    anlumo UDOOer

    Joined:
    Jun 14, 2013
    Messages:
    38
    Likes Received:
    2
    If the Android device allows tethering via USB or WiFi, it should work fine.

    The UDOO is able to run an HTTP server, serving some kind of dynamic pages that allow to execute arbitrary code just like any other Linux computer, if that's what you're asking. These web server scripts can also communicate with the Arduino part through the UART connection (if the permissions are set up in that way).
     
  2. anlumo

    anlumo UDOOer

    Joined:
    Jun 14, 2013
    Messages:
    38
    Likes Received:
    2
    Well, you could devise some kind of virtual memory system, where the Arduino can swap pages from the main memory with its local RAM. Of course, this requires rather advanced programming knowledge.
     
  3. pjc123

    pjc123 New Member

    Joined:
    Sep 5, 2013
    Messages:
    23
    Likes Received:
    0
    Any Libraries Available

    I currently have a couple of Raspberry Pi's and what attracted me to that was the large community support and the available libraries in multiple programming languages. In particular, there are several "C" libraries that have been provided by members of the community that make it extremely easy to interface with the various ports like the GPIO, SPI, I2C, etc. without the necessity of messing around with any low level commands. I am very interested in the UDOO because I am ready to step up to something more powerful. However, unless there are libraries available, it really would be of no use to me.
     
  4. pdigiulio

    pdigiulio New Member

    Joined:
    Sep 9, 2013
    Messages:
    1
    Likes Received:
    0
    Hello everyone!
    I would like to debug the Linux booting and manage the terminal. What USB port should I use?. What is the configuration (Baud Rate, Parity, etc)? Thanks!

    Best,

    Pablo
     
  5. johngamarra

    johngamarra New Member

    Joined:
    Sep 12, 2013
    Messages:
    1
    Likes Received:
    0
    Hi, as a rpi user, I advice to the udoo team, that they should realease API for controlling the different low level hardware included, this is one of the problems with rpi as the only supported language is python , so other developers like me (I'm a Java Developer) depends on user made libraries and wrappers from native C/C++ code, so we can't fully make use of the potential of the board (bugs, incomplete wrappers, libraries, etc.), unless we learn low level C/C++ programming, so please provide the correct libraries for different languages, this will greatly boost udoo community IMHO.
     
  6. mkopack

    mkopack Member

    Joined:
    Jun 14, 2013
    Messages:
    451
    Likes Received:
    21
    john, honestly, having come from both the RPi and the PandaBoard arenas, I'd be more worried about being sure the OS is well supported, and able to be stripped down and such and not eat 2/3 the resources after boot (the Pandaboard was HORRIBLE with this...) One thing the RPi has going for it is such a vibrant enthusiastic community that builds support - something Pandaboard totally lacked.

    I really hope things start picking up in here a lot once people start getting boards or we're going to risk having a very niche product with limited community support...Otherwise you won't even be able to lean on the community developed API's for the things you mentioned...

    And I'm with you on the Java stuff - that's what I do as well (although I can get around in Python if I have to). I hope we can get better Java support on the Udoo than we have on the RPi!
     
  7. sled

    sled New Member

    Joined:
    Sep 25, 2013
    Messages:
    5
    Likes Received:
    0
    Hi,

    could you tell me how data can be transferred (UART, SPI, ...) between the SAM3x and the iMX6? :)

    Thanks!

    Simon
     
  8. Mozer

    Mozer New Member

    Joined:
    Jun 19, 2013
    Messages:
    42
    Likes Received:
    0
  9. Z171

    Z171 New Member

    Joined:
    Oct 2, 2013
    Messages:
    6
    Likes Received:
    0
    hi, i'm new.
    i tried to open a new topic for this problem, but i can't find how, so, sorry for this if is wrong, i ask here:
    i have to build a build a homemade "home automation project" for a school test.
    i need to have a connection between my mobile phone (or a PC) and UDOO, by wireless (i have a wifi modem/router), i have to save and open an HTML page (some html pages with css and javascript) that connects the phone with some arduino pins, i try to say better: i start UDOO, i connect it to wifi, UDOO shows me a page, than when i push a button, it gives current to a led (for now).
    is this possible? i found some examples with arduino, but i can't load css and javascript, and the HTML page must be directly load into the skecth, and the memory that i can use isn't enough.
    i will (it's not necessary, but is better) see the real-time debug, (when i press a button or when a door is opened, i will see a terminal window showing me the results), it's possible to run (like in the promo video) the sketch directly form Ubuntu? can i write the code for the pins management directly from ubuntu?
    thanks for help and sorry about my bad English.
    i hope you can give me a response as soon as possible.
    thanks again for help
    hi
    Matteo
     
  10. Z171

    Z171 New Member

    Joined:
    Oct 2, 2013
    Messages:
    6
    Likes Received:
    0
  11. Mozer

    Mozer New Member

    Joined:
    Jun 19, 2013
    Messages:
    42
    Likes Received:
    0
    Hi Matteo,

    So to you're first post : in short, yes, it should be all possible I think. If you look at the block diagram you see that the pins can be configured by either the Freescale or the Atmel (Arduino) processor (if the diagram is still up-to-date).. You can if you want let the Atmel handle all the pins I/O and let the Freescale handle the rest.

    I can't say for sure or you can program the Atmel through the Freescale,, but I imagine you can.. Have to wait for my own UDOO before I can test that out myself XD will be interested in this feature myself :) Maybe somebody from UDOO can shed some light on this?
     
  12. Z171

    Z171 New Member

    Joined:
    Oct 2, 2013
    Messages:
    6
    Likes Received:
    0
    hi Mozer, thanks for the answer, i'll wait your response, is there any documentation official or not about programming udoo? thanks for help!
    Matteo
     
  13. mclang

    mclang New Member

    Joined:
    Oct 11, 2013
    Messages:
    4
    Likes Received:
    0
    This has been informative.

    I have one question though:
    How could I use CAN (CANopen, i1939) with UDOO? Is there an usable library or how should proceed e.g using CANopen XY tilt inclinometer?
     
  14. Martin_SPS

    Martin_SPS New Member

    Joined:
    Oct 17, 2013
    Messages:
    2
    Likes Received:
    0
    Dear Udoo Team,
    I would like to ask you about some code example section or help for begginers like I.
    I have not experience with programming Linux, Android , Arduino.
    You did a realy nice presentation video where you show us how we can use Udoo board and how powerfull it is.
    I would like to learn about this nice programming but let me say It will be help full if you can provide some examples to all off us.(I really like car project in your presentation video or also Android led flashing ON&OFF).
    This is nice for beginners like I.
    Can you provide some more detail about it ? How it works,list off components you are using /
    Car project on Android ? Did you use motor shield R3 board also for servo ?
    I know I have lot of basic questions, but I think I m not alone :)
    Can you provide - share some examples from you in download section?

    Thank you very much for your answer.
    B.R

    Martin
     
  15. Nat

    Nat New Member

    Joined:
    Oct 18, 2013
    Messages:
    14
    Likes Received:
    0
    Hi, Regarding CAN bus...
    Perhaps some general information below could be useful...
    You need iproute and can-utils tools to be compiled. Then, check these three files: in <path to Kernel sources folder>/arch/arm/mach-mx6/board-mx6qd_seco_UDOO.h file decomment MX6Q_PAD_GPIO_7__CAN1_TXCAN, and MX6Q_PAD_GPIO_8__CAN1_RXCAN, lines
    and comment
    #define MX6Q_PAD_GPIO_7__GPIO_MODE IMX_GPIO_NR(1, 7)
    #define MX6Q_PAD_GPIO_8__GPIO_MODE IMX_GPIO_NR(1, 8)
    MX6Q_PAD_GPIO_7__GPIO_1_7,
    MX6Q_PAD_GPIO_8__GPIO_1_8,
    MX6Q_PAD_GPIO_7__GPIO_MODE,
    MX6Q_PAD_GPIO_8__GPIO_MODE,
    always here in another one - board-mx6_seco_UDOO.c
    decomment line imx6q_add_flexcan0(&mx6q_sabrelite_flexcan0_pdata);
    then in <path to Kernel sources folder>/arch/arm/plat-mxc/include/mach/iomux-mx6q.h file add this line
    #define MX6Q_CAN_PAD_CTRL (PAD_CTL_PKE | PAD_CTL_PUE | \
    PAD_CTL_PUS_100K_UP | PAD_CTL_SPEED_MED | \
    PAD_CTL_DSE_40ohm | PAD_CTL_SRE_SLOW | PAD_CTL_HYS)
    this PAD control has a default setting, see "i.MX 6Dual/6Quad Applications Processor Reference Manual" for more information.
    and so correct the lines
    #define MX6Q_PAD_GPIO_7__CAN1_TXCAN \
    (_MX6Q_PAD_GPIO_7__CAN1_TXCAN | MUX_PAD_CTRL(MX6Q_CAN_PAD_CTRL))

    #define MX6Q_PAD_GPIO_8__CAN1_RXCAN \
    (_MX6Q_PAD_GPIO_8__CAN1_RXCAN | MUX_PAD_CTRL(MX6Q_CAN_PAD_CTRL))

    NO_PAD_CTRL is changed with MX6Q_CAN_PAD_CTRL.
    Ok, for next step you have to recompile the kernel.
    As i have checked the udoo-schematics and found out that CANRX_IMX is inverted with CANTX_IMX and vice versa, so, on testing your CAN bus interface keep in mind that on the connector the RX and TX pins are also inverted. So pay attention when you connect your external CAN bus transceiver.
    As for the CANopen, you need to recompile some open source libraries for Linux.
     
  16. firehopper

    firehopper Member

    Joined:
    Jun 10, 2013
    Messages:
    154
    Likes Received:
    1

    according to a kickstarter update, you can program the due side from the imx side now!
     
  17. jimmnh

    jimmnh New Member

    Joined:
    Aug 16, 2013
    Messages:
    82
    Likes Received:
    0
    @firehopper .. true. Latest Linux Linero image 1.2 has Arduino IDE you can use on IMX side to comm with ATMEL side.

    @Martin_SPS .. probably using the Linero 1.2 image to boot to UDOO and communicate with Arduino side is probably your very best way to get started with basics like learning how to turn on/off an LED.

    START:

    (1) Load the Linero 1.2 image ( http://www.udoo.org/getting-started/cre ... rom-image/ ) onto a microSD and boot UDOO
    (2) Follow the first tutorial instructions at http://arduino.cc/en/Tutorial/Blink
    (3) It should look something like http://www.udoo.org/wp-content/uploads/ ... no_IDE.png on your UDOO HDMI output screen and the LED should blink.

    :D
     
  18. Martin_SPS

    Martin_SPS New Member

    Joined:
    Oct 17, 2013
    Messages:
    2
    Likes Received:
    0
    Thanks for fast reaction ;) I will buy and then I will do ;)) Udoo ;)))))
     
  19. jimmnh

    jimmnh New Member

    Joined:
    Aug 16, 2013
    Messages:
    82
    Likes Received:
    0
    @Martin_SPS .. If you liked my really basic getting started steps above perhaps the UDOO gods will add to Getting Started or Tutorials. Alas, I am just a user too. Have fun. It's an exciting time.
     
  20. mclang

    mclang New Member

    Joined:
    Oct 11, 2013
    Messages:
    4
    Likes Received:
    0
    @Nat: Thanks for the info - now I know where to start when doing this CAN stuff.
     

Share This Page