Switch between Windows OS and Linux

Hello! I finally purchased my Arduino Uno and a Raspberry Pi over the weekend. Super excited to get started!!

I'm a Microsoft web app coder by profession but I'm interested in dabbling with Linux through the use of my RPi. I admit my hardware and OS skills are seriously lacking (improving those skills is one of the reasons I'm jumping into RPi and Arduino). :-[

Eventually I want to connect the Pi and the Arduino together and see what I can do with it. :slight_smile: But, since most of my computers are running Windows, I was wondering if there would be issues with my Arduino if I switch back and forth between the two OSs for development. If the compiled version of the sketch is what is loaded to the Arduino, then would it matter what OS I was using for my IDE?

Sorry if this is a silly question or if it has already been answered.

Thanks!

Why develop for Arduino on Raspi? :o

The host OS makes no difference in the coding for the Arduino.

Whandall:
Why develop for Arduino on Raspi? :o

Comprehend reading much?

OP (nutty2code) said they want to get more familiar with other operating systems (specifically Linux) - so developing for the Arduino on a RasPi is actually a good choice; the only way to learn an OS (all the ins-and-outs) is to use it, and I would suppose Arduino development using the IDE (and/or other tools) is probably as good as any. It certainly has more than enough horsepower to do it.

@nutty2code:

As long as everything is setup correctly on both systems, there shouldn't be any problem switching between the Windows on your PC and Linux on the RasPi - under the hood, both are using avr-gcc for the compilation portion, and the IDE is Java based - in other words, it's all the same code being executed to create the hex binary for the Arduino.

One caveat to watch out for - if you were running Linux on x86 hardware (vs ARM on the RasPi) - I would suggest you to get and install the same version of the Arduino software from arduino.cc (after installing and verifying the "distro version" under Linux, with your Arduino board) - basically, you download the package, create a directory somewhere under your home directory - then extract the archive to that directory, and run it "directly" - doing it this way, vs installing as an actual package, is beneficial in that you can have multiple versions of the Arduino IDE environment on the same system, in case there is a change (rare) that breaks your code from one version to the next - or for any other reason.

However - since you are running Linux on a RasPi - which is an ARM cpu SOC - that might complicate things slightly; I would look and see if you can get the current archive as a .tar.gz (or .zip) file pre-made for the RasPi - I don't know if arduino.cc provides this (??? - haven't looked) - or if you would need to go third-party; I suspect the latter.

Just make sure that at least the major and minor version numbers are the same, if you can - and if you can keep both versions exactly the same, so the much better. This is only a suggestion, though - nothing hard-and-fast like this is absolutely needed, but by keeping things between the systems as identical as possible, you may be able to debug differences (if any) quicker.

Finally - as someone who first started using Linux, after becoming disillusioned by Windows, back in 1995 (yep - near the dark ages there!) - the only way to really understand it is to use it - constantly. Fortunately for you, you'll have it easy compared to what I had to do:

One of my first real installs of Linux - Turbo Linux 2.0 - which was/is a Japanese distro - I decided in my wisdom to install on a 486 Laptop with 8 meg of RAM. In order to get everything working (at the time), I had to re-compile the kernel several times (mainly for PCMCIA slot support, plus support for the sound driver, the on-board modem, and the ethernet card). Ultimately, though, with a lot of trial and error (plus copious man page consultation), I got everything working.

Honestly, you can't really understand Linux until you start delving deeper into the command line, init.d run-levels (well - nowadays everything is going toward systemd - which has both good and bad points), etc. One day, you'll probably boot your system (whether on the RasPi or something else), and instead of dropping into your desktop environment, you'll be at the command line root shell, and wondering WTF?! - and trying to figure out how to get things back to the way they were. This happens, it can be a hair-tearing trial - but if you persevere and work through it - you'll come away with a lot of knowledge, and the pride of having been able to fix it - and an understanding of why it failed (hopefully).

You will, though, have at your hands tons of forums and help on the internet; dive through that help and various topics before you need them - read up and experiment; again, there's no better way to learn Linux (or any other operating system) than by using and abusing it. You might come away loving it - or you might come away hating it. Or - maybe something in between. I, personally, fell in love with Linux and haven't looked back. It is my day-to-day OS at home (and it would be at work too, if they'd let me). My reasons for liking it (warts and all) have more to do with the open-source (and GPL!) freedoms that come with it, plus it felt closer to the systems I cut my teeth on as a kid (mainly the TRS-80 Color Computer line, and the Commodore Amiga line). I can't really describe what I mean - you would have to have been a part of that era in computing (and if you were - I apologize for assuming you aren't, if you are - then you might have a grand time with it!).

Anyhow - I hope this helps - and good luck with your experimentation and branching out.

:smiley:

@cr0sh:

So you think learning two things at a time is the best way to learn? I don't.

Whandall:
@cr0sh:

So you think learning two things at a time is the best way to learn? I don't.

With modern distros, there isn't that much to learn. My mother could use it.

Thanks for the replies!

I probably didn't give an accurate picture of my skill set in regards to OS. I've had a couple of courses in Linux - one undergrad and one in grad school , but they were had-tos not want-tos so I didn't veer off the path much to experiment. I think Linux would be a good OS for playing around since it is so much more configurable than Windows and if I totally botch things up at the price of the Pi I could toss it and start over (not that I would). I just wanted to be sure that if I started out in windows, there wouldn't be any problems switching depending upon my location, etc. - not thrilled with the thought of toting around the 19 inch TV that I'm using for the Pi monitor. :wink:

This Python - Arduino demo may be helpful. I think it will work on Windows if you put in the correct serial port references. There would be no change to the Arduino code.

I like Python because the same code normally works on Linux, Mac and Windows.

...R