View Single Post
Old 06-02-2012, 11:44 PM   #111 (permalink)
thingstodo
Master EcoModder
 
Join Date: Sep 2010
Location: Saskatoon, canada
Posts: 1,488

Ford Prefect - '18 Ford F150 XLT XTR

Tess - '22 Tesla Y LR
Thanks: 749
Thanked 565 Times in 447 Posts
Arduino, Logging and communications continued

Quote:
Originally Posted by thingstodo View Post
The things that are left:
- get datalogging to work to an SD card
Let's have a go at this one.

The last time I tried this, the only SD card that I had was not well supported by the datalogging shield. I have a different SD card now, and the SD Info sketch works fine with it.

Modify the example datalog sketch to log a line each time a character is received from the serial monitor - three tries to get the program right, but it works.

Now add the ethernet shield back to the arduino stack. Copy the datalogging program into my webdatalog program (version 3) and log serial data from the serial monitor.

... nothing works ...

It appears that the ethernet shield uses pin 10 as a chip select - that is the pin that is turned ON when the ethernet shield is the target that the arduino wants to `talk`to. And the ethernet shield then responds back to the Arduino.

It just so happens that the datalogging shield ALSO uses pin 10 as chip select, and that the datalogger to the compactflash is enabled by pin 10.

One of these has to change. We have a conflict. The libraries for the ethernet shield are a bit scarier to me. The Datalogger is a much less complex circuit and so should be a bit easier to modify. So that`s the board that I will hack and the code that I will hack into.

What pin should I use ... that will take a bit of research. There is no point using something that is already used for a shield that I will want to use so I have to go through this again ...

I see no comprehensive guide that lists which vendor boards use which chip select pins, but I have not seen pin 8 used in the dozen or so that I checked. It's not a PWM output or an analog input ... just a plain old digital output. That's good enough for me.

  Reply With Quote