The latest release of Fritzing (0.4.0) has a surprise new experimental feature: a programming window. It’s intended to be a place to type your script for downloading to a microcontroller, and then actually download it. It’s not intended to replace your usual microcontroller programming environment. Rather, it’s meant to be a lightweight alternative, particularly useful for novices, workshops, and classrooms. It’s also a nice way to keep both your sketch and script files together.
At the moment, Fritzing only fully supports the PICAXE microcontroller, and only on the Windows platform. While there is support for typing in Ardiuno programs, we do not yet handle the download part (and that may have to wait for the release of Arduino 1.0).1
There is one programming window per sketch, but a programming window can have multiple tabs. The reason for multiple tabs is that we imagine you might want to play with slightly different versions of the same script until you hone in on one.
Aside from the standard file and edit commands, there are four steps you need to perform.
- First, choose the microcontroller language for your script. Right now there are two choices, Arduino and PICAXE.2 Once you choose a language, you will notice that the script you're working on is highlighted according to that language, and also that you can only save or load files with the appropriate extension.
- Second, select a serial port. First plug in your microcontroller into your USB port. This should create a new USB serial port for that device, which should now be listed when you click on the port combo box.
- Third, select a programmer (i.e. the executable which will compile and download your script). Fritzing does not install these programs for you, you have to do it yourself.
- Fourth, hit the program button. Feedback from the programmer should be displayed in the console area on the bottom of the programming window.
Here’s an image. As usual, we will be refining the implementation and UI in future releases.
A couple of acknowledgements. This work was partly sponsored by PICAXE (grateful thanks to Clive). And thanks to Bryant–our first new major code contributor–for co-implementing this feature.
That’s it, happy programming.
1. For the technically minded, here is the explanation: right now there’s not a simple way to invoke the Arduino compiler and downloader via shell command(s). This feature is slated for Arduino 1.0.
2. There are two requirements for adding a new language to the programming window. First, to enable syntax highlighting, Fritzing implements a subset of Kate Highlighting XML. So a new Kate Highlighting XML file has to be provided for each new microcontroller language. You can find the current set of highlighting files in your Fritzing installation folder, in the …/translations/syntax folder. The second requirement is to find a compiler/downloader for the microcontroller that can be accessed via shell commands.