1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Wir sind dabei - mit Pyra Prototyp!

    Für weitere Informationen hier klicken!
    Dismiss Notice

Arduino

Discussion in 'General Discussions' started by WorldTripping, Sep 5, 2011.

  1. WorldTripping

    WorldTripping Member

    Joined:
    Nov 25, 2009
    Messages:
    138
    Location:
    Brighton, UK.
    Hi,


    Does anyone know if the Arduino IDE has been ported to the Pandora yet?


    If not, will it be any time soon?


    Cheers.
     
  2. cwall

    cwall Still Fresh

    Joined:
    Aug 27, 2010
    Messages:
    16
    Location:
    Durham, Ontario, CA
    I have been using the Arduino IDE on a Genesi ARM computer from the Ubuntu depository. So the ARM port has been done, some one would have to package it, so it ran on Pandora.


    Cheers


    Carl
     
  3. Blargont

    Blargont Still Fresh

    Joined:
    Jun 13, 2011
    Messages:
    42
    Awesome I use the arduino frequently and it would be good iff I could use my pandora for coding
     
  4. WorldTripping

    WorldTripping Member

    Joined:
    Nov 25, 2009
    Messages:
    138
    Location:
    Brighton, UK.
    That is brilliant news.


    I have just bought my first Arduino Uno and would love to be able to use the IDE on a Pandora rather than a laptop.


    (When I get my Pandora that is.)


    Would it be easy to package as the port has already been done ?


    (Actually is there a 'Port Request' thread anywhere?)


    I'll have to have a look into that.


    Cheers.
     
  5. panik

    panik Member

    Joined:
    Sep 21, 2008
    Messages:
    187
    Location:
    Netherlands
    I had the Arduino IDE running on the Pandora in Debian on an SD card, but it will surely work in a Debian extend ("sudo apt-get install arduino").


    Semi-related, urjaman made a pnd with an AVR toolchain (AVR-Tools) for when you don't need/want to use the Arduino IDE and bootloader.
     
    Last edited by a moderator: Jan 2, 2016
  6. tony.pigram

    tony.pigram Still Fresh

    Joined:
    Jun 28, 2012
    Messages:
    49
    Location:
    Bath, UK
    did anyone ever get the Arduino IDE packaged for Pandora? If so, can you let me know where I can get hold of it - I'd love to be able to program my Arduino from my Pandora. B)
     
  7. Linux-SWAT

    Linux-SWAT Advanced Member

    Joined:
    Feb 13, 2010
    Messages:
    7,182
    I didn't try it yet under Slackware, but i think it should work.
     
  8. liveunderwater

    liveunderwater Member

    Joined:
    Feb 26, 2010
    Messages:
    123
    I also have Arduino and Pandora. Would love to start using them together. Couldn't find any tutorials last time I looked and right now I´m ready for bed.
     
  9. tony.pigram

    tony.pigram Still Fresh

    Joined:
    Jun 28, 2012
    Messages:
    49
    Location:
    Bath, UK
    Okay, so whilst the Formula 1 Grand Prix was on the TV, I decided to multi-task and get Arduino & Pandora working together...


    My initial findings were that it would not be efficient to try and get the Arduino IDE to run on the Pandora. I googled quite a bit and found that many people have used different front-ends to compile, build and deploy to the Arduino. I decided to strip back to basics for the Pandora and have documented the steps below.


    Requirements:


    Open Pandora 256Mb 800Mhz Super Zaxxon Final release


    avrtools installed (as linked to in earlier post)


    Arduino Atmel328p device


    USB 1.1 Hub (could not get Open Pandora to detect Arduino directly plugged in, assumed this was due to it using USB 2.0?)


    Arduino 1.0.1 IDE (only if want to compile own library file - see next link [and for getting the .h files])


    copy /hardware/arduino/cores/arduino/*.* to Open Pandora /mnt/utmp/avrtools/include


    copy /hardware/arduino/variants/standard/pins_arduino.h to Open Pandora /mnt/utmp/avrtools/include


    libarduino.a (obtained from http://lastyearswish...aa5d80d3d1c6920 )


    copy libarduino.a to Open Pandora /mnt/utmp/avrtools/lib


    creation of makefile and copy to Open Pandora /mnt/utmp/avrtools (make sure that the commands have TAB and not spaces, otherwise you get errors)


    creation of flash_led.c in /home/tony


    Steps:


    Plug Arduino into USB 1.1 Hub


    Plug USB hub into Open Pandora


    Open Pandora, Enable USB Host


    navigate to /dev/


    check for existence of ttyUSB0


    This will indicate that the Arduino is accessible (occasionally I had to restart Open Pandora for it to pickup the USB 1.1 Hub)


    From menu select, development | avrtools


    This starts in Terminal mode


    I found that I had to be root user to be able to have permissions to dowload to the Arduino


    sudo -s


    <password>


    make all FILE=flash_led


    (this will compile the .c file, output it to .elf, then convert .hex and download to the Arduino using avrdude. The makefile is reading and outputting to /home/tony - you'll have to change this to suit your setup)


    flash_led.c



    Code:
    
    #include "/mnt/utmp/avrtools/include/arduino.h"
    
    
    int led = 13;
    
    
    void setup() {
    
    pinMode(led, OUTPUT);
    
    }
    
    
    void loop() {
    
    digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)
    
    delay(1000); // wait for a second
    
    digitalWrite(led, LOW); // turn the LED off by making the voltage LOW
    
    delay(1000); // wait for a second
    
    }
    
    


    makefile



    Code:
    
    default:
    
    avr-gcc -B /mnt/utmp/avrtools/lib -Os -mmcu=atmega328p -o /home/tony/${FILE}.elf /home/tony/${FILE}.c -larduino
    
    avr-objcopy -O ihex -R .eeprom /home/tony/${FILE}.elf /home/tony/${FILE}.hex
    
    upload:
    
    avrdude -c arduino -p m328p -b 57600 -P /dev/ttyUSB0 -U flash:w:/home/tony/${FILE}.hex
    
    
    all: default upload
    
    

    http://www.youtube.com/watch?v=fsHAW_CN5M0. I'm very happy that I am now able to use 'mousepad' on my Pandora to write my Arduino code and then run 'make' as detailed above and have the code running on the Arduino!


    EDIT:

    https://www.youtube.com/embed/x2rZAopQwDo?feature=oembed showing the flashing of a real light :rolleyes:
     
    Last edited by a moderator: Jul 8, 2012
  10. Linux-SWAT

    Linux-SWAT Advanced Member

    Joined:
    Feb 13, 2010
    Messages:
    7,182
    Cool work indeed, this will also please Arduino people.


    If you're into Arduino forums, please inform them too ;^).
     
  11. Farox

    Farox Certified Guru

    Joined:
    Jan 8, 2009
    Messages:
    1,737
    Location:
    Italy
    Good another great use of Pandora...


    Anyway whenewer there are a F1 show on TV i couldn't take off my eyes from it.... :) i love F1 ;)
     
  12. hdonk

    hdonk Active Member

    Joined:
    Sep 12, 2008
    Messages:
    559
    I've got the Arduino IDE running on my Pandora... Just have to sort the USB serial port access out.


    (It supports c++ too B) )


    Is there any demand for a fully self contained PND (Including JRE) for this?


    Edit:


    Except the linker segfaults. Buffer.
     
    Last edited by a moderator: Jul 11, 2012
  13. Linux-SWAT

    Linux-SWAT Advanced Member

    Joined:
    Feb 13, 2010
    Messages:
    7,182
    Nice !


    Even if there's no express demand here, i think pushing a .pnd is a good idea.
     
  14. DrLGR

    DrLGR Still Fresh

    Joined:
    Apr 29, 2008
    Messages:
    38
    I would be quite pleased if there was a pnd for this. When I find some time I was going to try to follow the directions for the previous posts, but would be happy to just be able to drop a PND instead.


    Thanks
     
  15. tony.pigram

    tony.pigram Still Fresh

    Joined:
    Jun 28, 2012
    Messages:
    49
    Location:
    Bath, UK
    Hey, I'd opt for a .pnd if there is one available :)
     
  16. reSPAWNed

    reSPAWNed Still Fresh

    Joined:
    Jun 16, 2009
    Messages:
    20
    I got the Arduino Uno recently and when I get my 1 Giggy Panda (hopefully soon), it would be super sweet to be able to program it from that.


    Definitely a PND version would be preferable...


    If it is not around when I get my Pandora, then I just might have to look into making PND apps (if it is not too difficult) ;)
     
  17. Binky

    Binky Death's Steed Staff Member

    Joined:
    May 28, 2003
    Messages:
    6,407
    Yes. Most definitely.


    My poking electronic things (including arduini) table is too far away from my computer, being able to do it with my pandora would be awesome!
     
  18. hdonk

    hdonk Active Member

    Joined:
    Sep 12, 2008
    Messages:
    559
    Well I've got the linker working. Just have to solve the serial port access.
     
  19. TrashyMG

    TrashyMG Moderator Staff Member

    Joined:
    Jan 18, 2010
    Messages:
    8,805
    Sounds like what I was having issues with my USB development board.. I needed to run the software with sudo/root access, for some reason the USB devices in pretty much every distribution of linux don't give regular users proper permissions to directly access the USB devices.
     
    Last edited by a moderator: Jul 12, 2012
  20. sebt3

    sebt3 homebrew player (P. & C.)

    Joined:
    Sep 9, 2008
    Messages:
    4,477
    Location:
    France
    Have a look at the end of /etc/udev/rules.d/local.rules ;)
     

Share This Page