Go Down

Topic: 2 arduinos 1 shield (Read 1 time) previous topic - next topic

MichaelMeissner


Thanks,

Do you think that using a faster Arduino, as the Due, can make the application work better?

It depends.  I suspect in general you will be limited by network speeds on the web server, the speed of writing data to/from one Arduino to the other, and the speed that the SD card can write on the logger.  If those are your bottlenecks, then putting a faster processor in won't help at all.

It may be the Due/Mega might be useful in that they would have more memory, and you could do both the logging and the web stuff in one processor.  However, that probably requires you to be real careful so that each thread (web serving, writing to the SD card) doesn't interfere with the other.

PaulS

Quote
However, that probably requires you to be real careful so that each thread (web serving, writing to the SD card) doesn't interfere with the other.

Since the Arduino isn't running a multi-threaded operating system, that shouldn't be a problem.

MichaelMeissner


Quote
However, that probably requires you to be real careful so that each thread (web serving, writing to the SD card) doesn't interfere with the other.

Since the Arduino isn't running a multi-threaded operating system, that shouldn't be a problem.

I was thinking more  that since you have two logical threads, but no threading infrastructure, that instead of doing blocking reads and delays, you have to do polling, and use techniques like blink without delay so that both threads will be done.  It isn't rocket science, but it is attention to detail.

PaulS

Quote
It isn't rocket science, but it is attention to detail.

That I'll agree with. And, it's the point I was alluding to when I said that the web server needed to access the file only when the logger wasn't trying to write to it.

Go Up