Arduino Setup

I am not sure if this will end up split in multiple posts or not, but I have two broad topics being the hardware setup (which is basically, I mounted it, and I connected it to the computer with the USB cable provided) and the software setup (which has a bunch of things which I think are rather important to write about).  So let’s start with the software setup, as even though you need to do the hardware setup first, it’s simple, and I didn’t really “learn” anything important there.

Arduino Software Setup (this was done on Gentoo)

OK, so, I expected to run into some problems with this, but I just was looking at the “project book” that I got with The Arduino Starter Kit and the Linux instructions are “please go to the website”.  A bit of problem with even that instruction (and all of the instructions of that sort in the book) first being that doesn’t exist as a domain that serves actual content.  And second, some of the specific instructions just are not able to be followed at all.

Arduino provides an IDE (Integrated Development Environment) which needs to be installed (or something similar, which will provide needed tools for that, but we’re going with that, as so far the only alternative I have found is Eclipse, and I have had many problems with Eclipse) in order to work with the Arduino at all.

So, the instructions on the website, didn’t provide anything that looked like a good way on Gentoo (well, nothing specific to Gentoo, and everything else was specific to another distribution) so I looked to see what I could find in my portage directory (/usr/portage by default) and did find it, so dove in with that…

But, but, but…  It isn’t working out of the box…

The instructions I found said some stuff with /dev/ttyACM* which isn’t showing up…  OK so I need to figure that out, so I look at my kernel…  yep, I need to do some stuff with that…

I update the kernel, and I install it in /boot but I don’t “tell grub about it” which is a total rookie mistake (I know to do that, but I just forgot) and reboot, and “darn that kernel isn’t working”…  So i start looking for Gentoo instructions which I have found are often “old” and sometimes very outdated (ie. they not only don’t work as stated, but they flat out don’t work) but in this case, I can say yes, these are really pretty much correct.

I thought (having not realised at this point, that I wasn’t running the new one) that I needed to enable more stuff in the kernel, and enabled the other drivers that are listed on that page (I don’t think I needed them, but they don’t seem to be doing any harm) and then booted into the new kernel.

I can now see the device /dev/ttyACM0 but I still am not getting communication to the device.  And I start digging further as I have missed a step (I hope that is all at this point) and it was setting up user permissions.  I need to add the user I want to use to the group for the device, and that got the device showing up as available.

In the mean time, I start to work through the other options, and the first part says something about packages in “cross-avr” which I don’t have at this point, which actually ends up confusing me somewhat (because it doesn’t say “these may not be available at this time” oh look it actually says “these packages are not available until after you install crossdev” so I want to know why you are asking for something that will fail until such point as I’ve done that).

I have already done some stuff which is further down, so my process might be “somewhat broken” and I know I did stuff that I shouldn’t have needed to two twice, twice, or maybe more than that.

I tried to follow the instructions, but there are some problems that I ran into that they don’t get into, namely that you probably don’t want to install crossdev stuff into an overlay that already exists, and it was doing that for me (I haven’t seen if it ended up adding stuff to that overlay or not) and I had to figure this out through looking at the help for “crossdev”.

I had to run the command that is listed as crossdev -s4 --stable --portage --verbose --target avr multiple times to get it to work correctly, but once it did, it simply did (though I have to say, it takes a *long* time for it to happen, and there is no running output to show that something is happening).

Here is a case where Gentoo seems to fail on the “don’t provide enough information” side of things.  Or maybe more “don’t provide enough information in a way that it actually allows a person to look at what is being said, and readily find a solution to it from that source”.

I needed to tell crossdev exactly where I wanted it to “put stuff”.  I see no clear place where that information exists on the Gentoo website.  I don’t really know if where it was picking “automagically” was “wrong” other than it was putting stuff in an overlay which had no reference to…

Once that got installed, I then tried the “check this out” thing which failed earlier in the process looking at the crossdev-adm stuff.  I’m not sure I needed to do that or not really…

In the end, I found that I needed to create a symlink that it says “you also need a workaround” which somehow I put a “may” in…  Now it seems that everything is working (after once again trying to install the arduino ide, which I don’t know I need to do).

I then looked at the information they have with eclipse.  I couldn’t really get it working “well enough” to want to switch unless I could do my existing stuff better with it, but actually getting any of that setup was a pain (it took “forever” for it to finally tell me what I needed to do, in fact I left it overnight and it was saying “hey why not do it this way”).  So I am sticking (at least for now) with the arduino ide.

Hardware Setup

This was pretty much trivial.  The issues I ran into were of the “dropping little bits, but finding them quickly” sort.  Instructions that were in the “Project Book” which I found quite understandable, and it looks like (so far) I have done nothing problematic.  So now to play more with this…

This entry was posted in Arduino, Electronics and tagged , , , , . Bookmark the permalink. Both comments and trackbacks are currently closed.

2 Trackbacks

  • By Open Psychology Project on 2017 November 11 at 14:37

    […] I did before the more “complex” stuff I wrote a bit about, which you can read over at Datse Multimedia, which it seems is not really what I had intended to do with it.  But it got that out of my head […]

  • By Welcome back from “sick leave” on 2017 November 12 at 14:21

    […] I did before the more “complex” stuff I wrote a bit about, which you can read over at Datse Multimedia, which it seems is not really what I had intended to do with it.  But it got that out of my head […]