Arduino IDE on Windows with Minimus32 Profile

Some time ago I typed up an explanation and presented a download of a compressed file for the Arduino IDE on Windows which included libraries for the Minimus32.

The zip file was/is unnecessarily bulky and has folders in places where they don’t need to be. So I decided to create a script.

The script downloads the Arduino IDE, of a version which you specify from the Arduino Website along with PBrook’s Minimus32 and OneWire components from his GitHub page and also the pre-compiled version 4.7.0 of AVR-GCC for windows (if you want a different version then feel free to update and compile from the source code yourself but for now it’s supplied by yours truly).

It then puts it all in a folder called ‘ide’ and it should copy/rename/move everything in its correct place within a sub-folder. The drivers still have to be manually installed.

There are some thoughts on what I’ve done:

1. Alter the script so that it scrapes the Arduino site for the latest stable revision number.
2. Have the drivers self-signed so that the don’t prompt with an error message. This can’t be done as self signing only works for the system it is signed upon.
3. Use a command line tool to inject the drivers into Windows / auto install them.
4. Perform error checking in the script. I have since done this to at least check that the files exist, but nothing more.

The over-all benefit of this, I feel, is that it’s not waiting for me to do a ‘snapshot’ and anyone can now check the latest version (if they modify the script a bit), type it into the script and when it’s finished downloading it should just work nicely without having to do anything (much) extra.

So once you’ve downloaded it. Extract it to wherever you have write access to, then just double-click or run install.cmd from a command prompt.

You shouldn’t need to, but run it as Administrator if you really get into trouble.

I mainly wrote this for myself, because I’m lazy. So if it does help anyone else, great. I am also aware it could be implemented a lot better, so go ahead.

Download: Arduino IDE Download Script for Windows with AVR-GCC 4.7.0 + Paul’s Minimus32 Profile & Internal PullUp OneWire Library (2.98mB)

Arduino IDE on Windows

If I have learnt anything from software development over the years, it’s that programming on Windows is a mixed bag. Even more so when it comes to the development of hardware, as I have learnt more recently since joining the Leeds Hackspace.

The Arduino, a rather nice prototyping board, does have an Integrated Development Environment (IDE) for windows, but when you try to do that little bit more with it, such as code for an unorthodox piece of hardware it can get a bit trickier. Namely, when certain chips aren’t supported.

The Arduino IDE (AIDE) is actually a mixture of smaller components. A Java GUI, the AVR-GCC compiler, source code in C++ and profiles for the various Arduino hardware. A problem mainly arises when you want to use a new device, that is perhaps acting like an Arduino but is using a newer chip on the board than is supported by the archaic AVR-GCC compiler that is bundled with the AIDE.

I’ve been working on a script which pulls down the latest AIDE and incorporates support for, in particular, the minimus32 (using the ATMega32u) but it isn’t exactly user friendly (yet). Until that appears (though if you want to try it out, get in touch), I have happened across a rebuild of the Arduino IDE which is a bit nicer and, perhaps with suggestions for including decent updates such as a recompiled AVR-GCC, it could potentially be a better solution.

OpenWRT on an MR3020 – ish

I bought a portable 9000mAh battery pack – which gives out 5 to 5.5v at 2200 mA. Why? Well the intention here is to power something which doesn’t take much, well, to power, for a very long time. This is where the MR3020 steps in.

By default its intention as a device is to share, over 2.4Ghz WiFi (I think, I’m not sure if it does 5Ghz, I haven’t checked, but it does do 802.11bgn) a 3g or 3.5g mobile connection (from USB). It can also share this over your standard LAN Ethernet, or it can share the Ethernet over the WiFi.. I think you get the idea?

Well there’s this firmware called OpenWRT which lets me do what I want with it, effectively turning it into a small, linux-esque computer with its Atheros processor at the core.

So my intention is to plug in a GPS adapter, USB storage pen-drive, configure the device over Ethernet and use that 9000mAh battery pack to power it. I didn’t mention? The MR3020 is powered by a mini-usb port. Wonderful.

However, this project hasn’t been without, shall we say, trouble. You see, when you flash a firmware (its Operating System, like Windows or Linux) to the device it is then restricted to those files and programs in that firmware (short of some configuration files) and to expand upon it further you need to to install them. This can be done through ‘opkg’ which is OpenWRT’s package manager.

Unfortunately you’ve just used up the majority of the space on the device flashing the firmware, so if you’re fortunate you can add the packages to allow you to use a USB storage pendrive. If not, it’s time to make your own tasty good make feel nice firmware.

Which is what I tried to do. This did not go well. This is because the core of the firmware, at the base of it all is the kernel which interfaces between the software and the hardware. I had foolishly filled it with too much and it couldn’t load it. I had effectively ‘bricked‘ my mini router. That is to say, it no longer functioned as it should and it was stuck in a loop, rebooting.

A bit of soldering, the assistance of Nav from the Leeds Hackspace lending me a serial cable later, I was back on track with a working device. What I had to do, was transfer a new firmware to the device, using only the bootloader and TFTP (over Ethernet). This worked, to a point that I could now get into the failsafe mode of OpenWRT rather than just the bootloader. Where I then, more easily, transferred a better, larger, firmware to it and ensured that the configurations were reset to default.

Now I’m going to try building a firmware again, or maybe I’ll find one suitable and upgrade it. I had looked at PirateBox but that was mainly for sharing files, and MiniPwner – but the problems encountered with that (MiniPwner) are (by default) its kernel is out of date for the latest packages (easily fixed, I found, by using an upgrade firmware from OpenWRT) and a bit more tinkering to get it just right.

So back to trying to get the USB pen-drive and GPS to work at the same time (hacking in a USB hub) along with relocating the packages to the USB pen-drive.

Then, hopefully, I can do what I planned to. Triangulate and map WiFi access points on a Google Maps style layout referenced to GPS layout. Or something similar, maybe I’ll introduce BlueTooth or anything else I can pick up with a sensor. Yes, I might just be able to attach in a Minimus32.