You are not logged in.

#1 2011-08-24 23:06:53

maevius
Member
From: Greece
Registered: 2009-09-10
Posts: 135
Website

The official Arduino thread

So, I'm opening this topic to discuss about our favorite hardware platform. There is a wiki page to get you started [1], and of course there is the arduino-sdk in aur [2]. Feel free to talk about both the harware and software part.

[1] https://wiki.archlinux.org/index.php/Arduino
[2] https://aur.archlinux.org/packages.php?ID=8388

Last edited by maevius (2011-08-25 20:22:11)

Offline

#2 2011-08-25 08:36:25

schivmeister
Developer/TU
From: Singapore
Registered: 2007-05-17
Posts: 971
Website

Re: The official Arduino thread

I just realised this is more suitable for the Programming forum. Can someone move it there?


I need real, proper pen and paper for this.

Offline

#3 2011-08-25 08:48:16

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: The official Arduino thread

schivmeister wrote:

I just realised this is more suitable for the Programming forum. Can someone move it there?

Use the report link. smile


ᶘ ᵒᴥᵒᶅ

Offline

#4 2011-08-25 09:08:07

maevius
Member
From: Greece
Registered: 2009-09-10
Posts: 135
Website

Re: The official Arduino thread

litemotiv wrote:
schivmeister wrote:

I just realised this is more suitable for the Programming forum. Can someone move it there?

Use the report link. smile

Done smile

Offline

#5 2011-08-25 09:18:30

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: The official Arduino thread

Done.


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#6 2011-08-25 20:06:11

pyropeter
Member
Registered: 2009-10-19
Posts: 7

Re: The official Arduino thread

When reading the wiki page, I noticed the following:

  • I can not remember loading neither cdc-acm nor ftdi_sio. Is the module loading part of the "Installation" section still required?

  • I would directly link to the "arduino" package in AUR instead of a search with the keyword "arduino", as I recommend installing arduino instead of arduino-syslibs.

  • Is the "Running arduino for the first time" section still needed? I never ran into the problem described there, but I also never used the Two Wire Interface. If the problem still exists, I will try to add the .o-file to the package.

  • Multiple parts of the page recommend to edit the preferences.txt manually. Imho, the settings should be changed using the GUI.

  • I will merge the changes described in "Associate .pde files with the Arduino IDE" into the arduino package.

Offline

#7 2011-08-26 08:54:38

maevius
Member
From: Greece
Registered: 2009-09-10
Posts: 135
Website

Re: The official Arduino thread

Grab a cup of coffee and read on! Here are my findings smile
I tried to install arduino in my desktop x86_64 in order to test your points, and that's what I came up with.

  • Arduino loads fine without cdc-acm and ftdi_sio. I don't know whether they are needed afterwards though.

  • +1 to link to arduino package in AUR. I'm on it.

  • I don't know about the Two Wired interface problem you describe. If that happens only on rare occasions and is not a universal problem, I say we move that to Troubleshooting section.

  • +1 about the removal of manual editing of preferences.txt. First time I installed arduino, I followed the wiki by the book so I don't really know which parts are redundant.

  • Cool.

Also I faced a problem with java. It might be a rare occasion but it would be ok if we added this to troubleshooting.
When I tried to run arduino as root I got this

No protocol specified
Exception in thread "main" java.lang.InternalError: Can't connect to X11 window server using ':0' as the value of the DISPLAY variable.
	at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
	at sun.awt.X11GraphicsEnvironment.access$200(X11GraphicsEnvironment.java:62)
	at sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:178)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:142)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:186)
	at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:82)
	at sun.awt.X11.XToolkit.<clinit>(XToolkit.java:112)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:186)
	at java.awt.Toolkit$2.run(Toolkit.java:849)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:841)
	at processing.core.PApplet.<clinit>(Unknown Source)
	at processing.app.Base.main(Base.java:112)

Anyway, I solved it following this guy's instructions.


Now, regarding the gcc-avr-4.6.1-1 that causes compilation errors, we have two solutions.

I tested gcc-avr-svn but the same error occurs unfortunately... I applied the patch and compilation works without issue with latest gcc-avr/svn.
Could you try the svn solution to check if the problem came back so that we report it?

Last edited by maevius (2011-08-26 09:01:01)

Offline

#8 2011-08-27 14:15:34

pyropeter
Member
Registered: 2009-10-19
Posts: 7

Re: The official Arduino thread

I just tried gcc-avr-svn (revision 178132) and was able to build a sketch successfully.
I also tried the patch and gcc-avr 4.6.1, which worked as well.
Compiling the digital_potentiometer example of the Wire library also succeeded (without running arduino as root), so I will move the twi.o section to Troubleshooting.

Could someone with an arduino please try if the modules (cdc-acm and ftdi_sio) are loaded automatically when the arduino is connected? (The output of lsmod before and after connecting the arduino would all I need to know)

I will try to release arduino-0022-6 this evening. It will include the progmem-patch (because it is easier to include the patch then to have every user install gcc-avr-svn) and will allow to pass arguments to the arduino executable.

Offline

#9 2011-08-27 14:32:15

SidK
Member
Registered: 2011-03-03
Posts: 116

Re: The official Arduino thread

I have an Arduino. My modules line in rc.conf is empty and just rebooted.
I did not start the IDE, just did an lsmod, then plugged the board in (USB) and did an lsmod again. cdc-acm and ftdi_sio appear in neither listing.

Edit: just to make it clearer, the changes in those listings are:

diff before after 
1a2
> cdc_acm                13412  0 
30c31
< usbcore               119644  4 usbhid,uhci_hcd,ehci_hcd
---
> usbcore               119644  5 cdc_acm,usbhid,uhci_hcd,ehci_hcd

Much later edit: I'm blind, cdc-acm is listed. the IDE successfully uploads with an empty modules line and no manual module loading.

Last edited by SidK (2011-08-28 00:35:53)

Offline

#10 2011-08-27 22:12:12

pyropeter
Member
Registered: 2009-10-19
Posts: 7

Re: The official Arduino thread

@SidK: Great, then I will remove the instructions to load the modules manually from the wiki page.

I also just released arduino-0022-6:

uploaded 0022-6:
* includes patch for compatibility with the current (broken) gcc-avr 4.6.1
* allows to pass the sketch to open as a command line argument to /usr/bin/arduino
* reminds you to add yourself to the uucp group

Offline

#11 2011-09-08 18:25:55

Cilph
Member
Registered: 2011-05-01
Posts: 29

Re: The official Arduino thread

It might be a good idea to use the AVR plugin for Eclipse as the Arduino IDE is just horrible. I tinker with AVRs as a hobby and I just use the plain chips on a breadboard without the Arduino libraries. Main reason is that because they make stuff so ridiculously easy to use, it even takes 20 cycles to write a single output to a port.

If you want you can still import the Arduino libraries and use them anyway.

Last edited by Cilph (2011-09-08 18:26:59)

Offline

#12 2011-10-29 01:09:15

2891066
Member
Registered: 2011-08-17
Posts: 11

Re: The official Arduino thread

I'm using the AUR arduino package and still getting errors when I try to compile.  From what I've been able to tell this package *should* fix the gcc-avr bug, but I get the exact same error.

Furthermore, I thought 4.6.1-1, the latest version of gcc-avr, was supposed to be fixed to begin with?  Is this true?

I'm trying to compile the reprap Sprinter firmware found here (https://github.com/kliment/Sprinter) for an arduino mega 2560.  I am reasonably sure the code is not bugged - I was able to compile it on windows fine, and hundreds of people worldwide use this same code.

I have tried downloading the IDE from the arduino site, I've tried the AUR IDE package, and I've tried compiling the gcc-avr-svn package from the AUR.  I get the same error every time.  WTF am I doing wrong?

The error I get is the following:
SdFile.cpp: In static member function 'static uint8_t SdFile::make83Name(const char*, uint8_t*)':
SdFile.cpp:259:17: error: variable '__c' must be const in order to be put into read-only section by means of '__attribute__((progmem))'

Offline

#13 2011-12-26 18:31:47

maevius
Member
From: Greece
Registered: 2009-09-10
Posts: 135
Website

Re: The official Arduino thread

With the latest arduino 1.0, the menu list isn't shown. Does anyone else have this?
http://dl.dropbox.com/u/6228981/arduino.png

Edit: That seems to be a problem of X, I have the same issue on v.022.

Now in v.1 I can't write in the ide. The keyboard doesn't work. I'll try in desktop too. These issues are seen on my netbook.

Last edited by maevius (2011-12-26 19:33:41)

Offline

#14 2012-01-03 05:07:05

dmillard
Member
From: /dev/pts/0
Registered: 2010-04-02
Posts: 22

Re: The official Arduino thread

maevius wrote:

Now in v.1 I can't write in the ide. The keyboard doesn't work. I'll try in desktop too. These issues are seen on my netbook.

I have this problem as well, on two different laptops.  For a while I used the scons build system from cli, but today (with an arduino update) it started complaining about 'build/core/pins_arduino.h' being missing.  I hear this is due to housekeeping by the devs, and have yet to find a readily available fix for either of these problems.


"Cleverness is not wisdom." ~Euripides

Offline

#15 2012-06-12 12:09:55

mandos
Member
From: Greece
Registered: 2006-01-23
Posts: 101
Website

Re: The official Arduino thread

I've been using the arduino software in my system for a long time. Lately I did a re-installation of arch. I believe that I managed to communicate with it on my new system.

Then I updated to arduino 1.0.1. Since then I cannot select a serial port as a user.
I can as root.

I am in the uucp group however, and I can send data to the port from the command line (echo) as a user.
I've been trying to solve this for two days now. I'm officially stuck on this!

Offline

#16 2012-06-13 06:53:19

maevius
Member
From: Greece
Registered: 2009-09-10
Posts: 135
Website

Re: The official Arduino thread

There is an arduino-git package in aur [1], did you try that?

[1] https://aur.archlinux.org/packages.php?ID=57079

Offline

#17 2012-06-13 09:06:00

mandos
Member
From: Greece
Registered: 2006-01-23
Posts: 101
Website

Re: The official Arduino thread

I tried this solution by tirezo:

I had the same exact problem, I was able to fix it by changing the permissions of the lock folder. Try:
sudo chmod 777 /run/lock
and see if it fixes your problem

and it worked. He wrote it last night here https://aur.archlinux.org/packages.php?ID=8388

haven't tried the git version of the package yet

Offline

#18 2012-06-15 17:36:34

lesto
Member
Registered: 2010-07-13
Posts: 115

Re: The official Arduino thread

I have to use chmod every reboot!! every times it return to default value!

Offline

#19 2012-06-17 02:12:56

dunz0r
Member
From: Sweden
Registered: 2009-03-30
Posts: 258
Website

Re: The official Arduino thread

lesto wrote:

I have to use chmod every reboot!! every times it return to default value!

Make sure you are a member of the uucp-group and that uucp is the group who owns the Arduino-device.


RTFM or GTFO
hax0r.se

Offline

#20 2012-06-19 23:27:37

lesto
Member
Registered: 2010-07-13
Posts: 115

Re: The official Arduino thread

dunz0r, can you expands you explanation? how i set the owner of arduino devices, with UDEV rule?

Offline

#21 2012-09-11 14:28:35

Technicolor
Member
From: Earth
Registered: 2012-09-05
Posts: 32

Re: The official Arduino thread

Problem -
When I upload to my Arduino on my x86_64, it gives me this error - avrdude: stk500_recv(): programmer is not responding
Any suggestions?
I've googled this quite a few times, but they were not relevant to my issue.

Offline

#22 2012-09-13 04:12:11

WizenedEE
Member
Registered: 2012-03-14
Posts: 8

Re: The official Arduino thread

Technicolor wrote:

Problem -
When I upload to my Arduino on my x86_64, it gives me this error - avrdude: stk500_recv(): programmer is not responding
Any suggestions?
I've googled this quite a few times, but they were not relevant to my issue.

That error doesn't really mean anything --- it just says that the uploader program (avrdude) couldn't find a programmer.

Did you change the port in the tools->Port list? What board do you have?

The board should show up as /dev/ttyACM0 if you have an uno/recent mega, or /dev/ttyUSB0 if you have an older version. Make sure you have read/write permission to it.

Offline

#23 2012-09-13 13:12:26

Technicolor
Member
From: Earth
Registered: 2012-09-05
Posts: 32

Re: The official Arduino thread

WizenedEE wrote:
Technicolor wrote:

Problem -
When I upload to my Arduino on my x86_64, it gives me this error - avrdude: stk500_recv(): programmer is not responding
Any suggestions?
I've googled this quite a few times, but they were not relevant to my issue.

That error doesn't really mean anything --- it just says that the uploader program (avrdude) couldn't find a programmer.

Did you change the port in the tools->Port list? What board do you have?

The board should show up as /dev/ttyACM0 if you have an uno/recent mega, or /dev/ttyUSB0 if you have an older version. Make sure you have read/write permission to it.

Hm.

I set it to /dev/ttyACM0 and the board is the Arduino UNO R3.

And I don't know, when I did in the wiki the stty thing, when I ran cat  (all of them as sudo), it did not work. I added myself to uucp and I readded root to uucp. Nothing worked.

Also, it did show up as /dev/ttyACM0 (as stated before), and I really don't know how I can make it have read/write permisson.

EDIT: I am now trying to uninstall arduino, and install arduino-git. Let's see how this will work.
EDIT: Again, nothing. It's giving me the exact same issue.

Last edited by Technicolor (2012-09-17 20:07:43)

Offline

#24 2012-09-17 20:16:24

Technicolor
Member
From: Earth
Registered: 2012-09-05
Posts: 32

Re: The official Arduino thread

bump for help, read previous post

Offline

#25 2012-10-02 13:01:09

Technicolor
Member
From: Earth
Registered: 2012-09-05
Posts: 32

Re: The official Arduino thread

Fixed.
Evidently the arduino package from the AUR with the "patched librxtx package" does not work without rxtx (not lib) from the AUR.

Last edited by Technicolor (2012-10-02 13:22:05)

Offline

Board footer

Powered by FluxBB