Site migration

April 23rd, 2009

It’s all the same stuff, but in a new location.  For Arduiniana, please visit http://arduiniana.org.

Thanks!

Mikal

New Flash library

March 24th, 2009

I wrote a new library, Flash, which abstracts away most of the complexity of PROGMEM programming. It provides String, Array, and Table types that make ROM-based data collections as easy to use as “normal” types. Each overrides the C++ [] operator, so to get at individual elements, one simply uses familiar array syntax. For example, if you have 1000 floating point temperatures in a flash-based “temperature_table” array, you might write code like this:

for (int i=0; i<temperature_table.count(); ++i)
  if (temperature_table[i] > 98.6)
    Serial.println(temperature_table[i]);

Interested to learn more? Read all about it here!

Mikal

TinyGPS 8 released

March 3rd, 2009

Thanks to a helpful suggestion by user DanP, I have increased the effective resolution of the latitude and longitude values returned.  The get_position method now returns values in units of 10-5 degrees, a 10-fold increase in resolution.  Note that if you use use the old get_position, you will have to make some minor changes to your code if you upgrade to version 8.

Thanks DanP!

Mikal

NewSoftSerial 6

February 20th, 2009

Ladyada tested NewSoftSerial and made some improvements to the code, contributed a “goodnight moon” sketch, and tested the library (successfully) with the Atmega328p processor. Thanks, ladyada! Go buy a bunch of processors from her, please. They give you twice the RAM and nearly twice the flash space.

I posted the new library.

goodnight moon. goodnight cow jumping over the moon. goodnight light and the red balloon. goodnight bears. goodnight chairs…

Mikal

Introducing PStrings

February 17th, 2009

Check out the new PString class.

PString is a very lightweight string class that derives from Print, so you can use it to render text to string buffers the same way you would to the Serial port or to a LiquidCrystal device.  Try it out.  Feedback welcome.

Mikal

NewSoftSerial 5

February 15th, 2009

NewSoftSerial version 5 is available. A lot of people have been using this library — thanks! — but I really need to recognize the exceptional work of two contributors.

First of all, the diligent analysis of forum user etracer yielded the root cause of a tricky problem with NSS on OSX. An avr-gcc 4.3.0 bug causes to compiler to fail to generate the proper entry and exit sequences for certain interrupt handlers. etracer identified the problem and provided an inline workaround. Thanks! etracer’s fix is in NSS 5.

Secondly, user jin contributed a large body of work based on NSS and identified a potential problem that could result in data loss (fixed in NSS 5). jin made a variant of NSS that supports 4-pin serial, with the additional pins providing a very nice RTS/CTS flow control. We may see this in NSS in the near future. Please comment. Is this an interesting feature?

Thanks for all the feedback.

Mikal

Insertion-style streaming

February 11th, 2009

Lots of people find having to write repetitive blocks of Serial.print() statements tedious. I wrote a little article today on how to employ insertion-style streaming using << to accomplish this. The technique allows you to compress many lines of code into one or two. If you have a C++ background, or if you just think small code is better, you might want to check it out:

No-cost << Streaming

Blogging Arduino

January 29th, 2009

Hello.

Welcome to my Arduino site. Today I formally released my first two libraries for Arduino: TinyGPS and NewSoftSerial.

Mikal Hart