There was an interesting thread on the Sketching in Hardware mailing list a while back on how to control an inkjet printer. Wendy Ju started the discussion. Following are some of the links from that thread:
A closed, proprietary portable printer: Xyron Design Runner
Nice explanation of how inkjets work and how to control them in general. Link submitted by Scott Minneman
Instructions for now sold-out Parallax Serial Inkjet Kit (which does include inkjet cartridge pinouts for the HP 51604A Black Inkjet Cartridge, as well as board schematics, parts and instruction routines for writing to the cartridge). Even without the device, Parallax’ documentation is handy.
Instructions on how to build your own DNA microarrayer using commercial off-the-shelf parts, including inkjet technologies. The last two links submitted by Wendy.
Haven’t had occasion to use these yet, but they seem handy.
Hans Steiner and Patrick Dwyer forwarded a couple of links that should make it possible to program PIC microcontrollers on the Mac. You need to do it in C, and you need to use the Mac Developer Tools, and you need to find or build a programmer that can interface to the tools provided. But here’s a few links (haven’t tried this myself yet):
GNU PIC utilities – GPUTILS is a collection of tools for the Microchip (TM) PIC microcontrollers.
SciSpot lists a link to MacrocASM, an assembler/programmer for the PIC that’s native to OSX, and a few links to hardware programmers.
The combination of these should mean you can program the PIC in C on a Mac. However, there are still some things missing, for those used to higher level programming like BASIC and CCS C. The nice function libraries, like ADC and serial, that come with CCS C and PicBasic Pro, are not here. You will definitely need to know more about the lower level details of the PIC. But hey, it’s a step out of PC world for Mac PIC people.
A bit more from Brygg Ullmer at LSU:
“Regarding Mac programming of PICs: we have had success with this at LSU, to at least some extent. The “picp” program compiled cleanly and worked fine for us from Mac Mini’s (OSX at the time), downloading to PICSTART-compatible programmers (both real and clone, following leads from this list) with a USB->Serial dongle. (Some dongles worked, and others not; but I suspect you guys have a handle on this).
“This was only a half-solution, as we were compiling on the Linux-based CCS compiler on a different machine, scp’ing it over, then picp’ing it on the Mac Mini to a PIC. We’ve just successfully Fedorified a number of Mac Minis (we needed support for some devices which had clean support under Linux, but not under OSX; e.g., using evrouter and gizmod). That *could* open a path toward using CCS on Mac hardware, too — but I slightly doubt they’ve released PPC-compatible binaries yet.”
Technorati Tags: OSX, pcomp, physical computing, PIC
Most microcontrollers don’t have a random function. Random functions are not truly random, they’re actually a complex mathematical formula that results in a number that “seems” random. That can take up lots of processing time, so it’s usually the first function to go when writing a microprocessor language.
In fact, most of what you do in programming physical computing projects is to figure out how to deal with the world’s natural randomness and make it look smooth. A photoresistor read through an analog-to-digital converter, for example, will never give you a nice steady number, it always fluctuates with tiny changes in lighting that your eye can’t see. Your consciousness is a great leveller for the sensors that are your eyes, ears, skin, nose, and taste buds When you move a photoresistor from one room to another, your readings will be totally different, and all of a sudden, you have to re-calculate what is “average” and what constitutes the lighting change that you want. And that’s just one of many examples. The fact is, data from sensors is filled with the noise of the real world. Plan for it in advance.
Technorati Tags: pcomp, physical computing, programming
Continue reading “Random Numbers and Physical Computing”