HOME  > >  ARDUINO MAIN PAGE > >  HINTS AND HOW-TOs > >  NuELEC DATALOG  t.o.c.     Delicious Bookmark this on Delicious   Recommend to StumbleUpon

Working with the nuElectronics Datalogging Shield

As ever: The devil is in the details!

This page covers some points which apply to the family of pages of which it is a part.

Much of what you read here "should" not be important... but if you've used computers for a week, you know that "little details" can matter. Sigh.

The other pages in the family mostly address the use of specific elements of the excellent (c.$16, 7/10) datalogging shield for Arduinos, which was produced for us by nuelectronics.com. They also sell a useful range of sensors and accuators (effectors), already wired up so you can just plug them into the shield, at reasonable prices. Much of the material in this family of pages can be used by a shield owner to integrate sensors, etc into his project. The information can also be useful to sensor owners integrating the sensors into other projects, even without the nuelectronics shield.

Serial Monitor

Let's consider the page about using the DS18B20 temperature sensor as an example of how I was working while writing the tutorials.

... and that's about it! However, that may be a little bit different from what the writers of the demo software nuelectronics was supplying in June 2010... and the differences matter in some instances. And let's look a little at the bits relating to the serial monitor, in case you aren't old friends.

Forget about the shield and the temperature sensor for a moment.

If you ran the following in an Arduino, it would display "Hello world" somewhere. If you know where, skim for a bit... but there's more, even for you, in a moment.

void setup(){

void loop(){
Serial.println("Hello World");

The two lines starting "Serial." are to do with "the serial monitor". If you just want to wink some LEDs, you don't need to know about the serial monitor, and if you are a beginner you may not have seen it yet. It is "hidden" until you "turn it on"... but it is always available, and a very useful tool it is!

To see it in action: Put the little "Hello world" example into your Arduino. Wait for the message "Done uploading" to appear on the bar between the panel you typed the code into and the messages area below, where you hope to see "Binary sketch size...", the message that says your code had no syntax errors.

After you've been told the development environment is done uploading, if you click on the right hand icon of the toolbar... the one that is a rectangle with a vertical line out the top to a tiny circle, the one that gives rise to the "Serial Monitor" message just to it's right when you put the mouse pointer on the icon... if you click it, a new window should open, and a moment later your "Hello World" should appear.

(A little "gotcha": If you are impatient, if you click the Serial Monitor icon before the "Done Uploading" message, nothing happens. The system isn't broken. You just can't have the serial monitor until your code has been uploaded to your Arduino.)

(Another little "gotcha": The number in "Serial.begin(9600);" must be the same as the "baud" number in the lower left of the serial monitor window. The nuelectronics programs use different numbers in the equivalent places. Don't hesitate to change them to suit the details of how you are working. If you are getting gibberish, especially if simple text headers are scrambled, look for a mis-match between your program and the settings in effect for your serial monitor. (They are changed by the "baud" window... and elsewhere.... but you "shouldn't" have this problem if you can upload programs to the Arduino, and the "Serial.begin" lines in them have the right number.)

Not only does the serial monitor give you a place to display messages from the Arduino, it also gives you a way to send messages to it. Those messages are only sent after you press "enter"... they are not sent character by character as you type the message. The "get_line" subrouting which is part of many of my demo programs is at the heart of using messages from the user. It was adapted from the "get_line" in the nuelectronics demo programs. It uses some techniques which, frankly, somewhat puzzle me... but it works!... when you work as I did. E.g. via the serial monitor, etc.

I suspect that the nuelectronics people were interacting with their Arduino via a separate terminal program. In the Windows world, Hyperterminal used to be "standard", used to routinely be supplied with the operating system. Nowadays, I think that the free "PuTTY" is the program I'd use for such things. (I've done a write up of PuTTY and other good freeware elsewhere.)

You may be able to get away with having two things connected to your Arduino at the same time... the developement environment and Hyperterminal... but it makes me nervous. Hence my preference for working via the serial terminal. Apologies for any difficulties this gives rise to. They should, I hope, be restricted to needing to tweak "get_line" and how you interact with what's in your Arduino and shield, while working with the demos. These issues become largely moot in any "real" application of the hardware.


As a general rule, I prefer not to clutter my system with libraries. In a some cases, you will need libraries to work with the demos I've done. In each case, I hope the library needs are clear in the text of the specific demo. You do not, by the way, need to install the library for Dallas "1-wire" chips, supported by the general Arduino community.

I will try to produce a separate beginner's guide to general "use of libraries" points. (If ar3ne1lib.htm has become available, please remind me to edit this page!)

A detail, which I've discussed again on ar3ne1onetwo.htmits own page... You will see "one wire" and "one wire interface" in the nuelectronics documentation. This is not always connected with "1-Wire" (a Dallas trademark) at all, and even when you are connecting a 1-Wire device to a nuelectronics "one wire" connection point, you won't often (ever?) get dragged into some of the more complex 1-Wire issues. Don't get me wrong... I like 1-Wire... it is powerful. But to get everything you can from 1-Wire gets dangerously close to Serious Work. nuElectonics lets you use some of the (marvelous) 1-Wire devices without the work!


Forgive the abrupt end... I want to write up the tutorial on using the SD card reader/writer... you'd rather I did that than polish this, wouldn't you?


See Also: The Arduino programming course from Sheepdog Guides:

Further to the Arduino ideas the page you are reading now will take you to, I have posted a series of essays which try to help you become a better Arduino programmer and engineer... but, for the best result, you will have to buckle down and work your way through them in sequence. The "How To's" here can be accessed in whatever order you like.

Feel free to use this information in programming courses, etc, but a credit of the source would be appreciated. If you simply copy the pages to other web pages you will do your readers a disservice: Your copies won't stay current. Far better to link to these pages, and then your readers see up-to-date versions. For those who care- thank you- I have posted a page with more information on what copyright waivers I extend, and suggestions for those who wish to put this material on CDs, etc.

Editorial Philosophy

See the discussion near the bottom of the "top level" page covering the bulk of my Arduino contributions. There is information there, too, about things like "May I copy your material?", and the system of file names I am trying to work to.

   Search this site or the web        powered by FreeFind
  Site search Web search
Site Map    What's New    Search

The search engine is not intelligent. It merely seeks the words you specify. It will not do anything sensible with "What does the 'could not compile' error mean?" It will just return references to pages with "what", "does", "could", "not".... etc.
In addition to the information about the nuelectronics data shield of which this page is part, I have other sites with material you might find useful.....

Tutorials about the free database which is part of the free Open Office.
Sequenced set of tutorials on Pascal programming and electronics interfacing.
Some pages for programmers.
Using the parallel port of a Windows computer.

If you visit 1&1's site from here, it helps me. They host my website, and I wouldn't put this link up for them if I wasn't happy with their service... although I was less than pleased the other day to have what I was doing interrupted by a telephone call from their sales team, trying to get me to extend my involvement. Sigh. Hardly a rare event, but I'd thought 1&1 were a bit classier that some of the people who have my telephone number.

Ad from page's editor: Yes.. I do enjoy compiling these things for you... hope they are helpful. However.. this doesn't pay my bills!!! If you find this stuff useful, (and you run an MS-DOS or Windows PC) please visit my freeware and shareware page, download something, and circulate it for me? Links on your page to this page would also be appreciated!

Click here to visit editor's Sheepdog Software (tm) freeware, shareware pages.

And if you liked that, or want different things, here are some more pages from the editor of these tutorials....

Click here to visit the homepage of my biggest site.

Click here to visit the homepage of Sheepdogsoftware.co.uk. Apologies if the "?Frmar3ne1ser" I added to that link causes your browser problems. Please let me know, if so?

Click here to visit editor's pages about using computers in Sensing and Control, e.g. weather logging.

To email this page's editor, Tom Boyd.... Editor's email address. Suggestions welcomed!

Valid HTML 4.01 Transitional Page tested for compliance with INDUSTRY (not MS-only) standards, using the free, publicly accessible validator at validator.w3.org

Why does this page cause a script to run? Because of the Google panels, and the code for the search button. Why do I mention the script? Be sure you know all you need to about spyware.

....... P a g e . . . E n d s .....