Reading serial & multi-threading

I’m new in your world… I have a Arduino and as a C# developer I’m interested in FEZ Domino.
In a few words, I would like to read 2 serial sensors (a GPS and a echosounder, both sending NMEA183 sentences) with a FEZ Domino.
I have read that with FEZ it is possible to connect up to 4 serial sensors (only 1 with Arduino), can you confirm it?
Also, can I do multithreading with FEZ, and read both serial ports in separate threads?
Thanks for your answers!

Page 31 of the Beginners Guide is your friend.

So yes, multithreading is supported.


You can also do it with data ready interrupts of the serial ports.

Yup, should be easy as pie.

NMEA0183 is (basically) RS232. You will need the RS232 shield, or it’s simple to roll your own with a RS232 chip.

GPS and echo sounder? Maybe you are working on a project similar to mine?
The current version is using two Arduinos but Im planning to replace them both with one FEZ Domino, also adding a XBee to enable it to be controlled manually.

Geir> Yes, that’s it! Congratulations, your project seems to work wonderfully!
I also have in mind to enable remote control, in case of emergency, like a big ship is coming in the field of survey. I plan to use my boat in sea, and where I live there are some hazards in the water.
I never did a boat model, so you blog will be very helpful for me.
Again, I’m very impressed. Even little bit deveived, I thought it was a new idea!


Gier, This is a freakin’ neat project :o
I love it

It indeed is :o Very nice :clap:

Cool project…we need to sponsor you somehow :wink:

Thank you all for your comments.
As I mentioned, when the Pandas arrive I will probably move the FEZ Domino over from Whirligig (link removed) and replace it with a Panda. The SD card isnt critical for Whirligig as it is for SEA RENDERING.

With the FEZ Domino in SEA RENDERING my aim is to improve the concept with an XBee module so the user can have live feed of the depths as the boat is working. Also the ability to hold its position in a parking zone until we are ready to take it ashore.
With the far superior computing power of FEZ to Arduino I would like to add some dynamic to the scanning so areas with flat and uninteresting bottom will scan faster than areas with more interesting formations.

The hull of SEA RENDERING is actually only one half of the catamaran that is planned. The catamaran will have a full solar panel on top and better batteries. With the added stability and room for more payload the plan is to add more advanced equipment like side sonar.

When it comes to sponsoring thats always welcome :), -but for now I probably have what I need.

It would be nice to have a FEZ sticker on the side of the transport box. A university in Saudi Arabia has actually shown interests in this boat to map up shallow water coral reefs. So some stickers to front your products cant be bad.

Thanks Patrick5 for your answer…
What is the utility of a RS232 shield, because to me FEZ is ready to read RS232 without the help of extra harware (and I need to know where I’m wrong): I had in mind to connect directly my GPS / sounder to serial pins… I think I just have to double-check that my RS232 GPS / Sounder is outputting 5V signal (not the old 12V), right? Is there some other things to check?


Great project you have there indeed! :clap:

May I congratulate you, regarding an interest in your project from a university in Saudi Arabia.

But I worry a little bit about if you want to place/display some ad./sticker on the transport box.
I’m not trying to discourage you to do so, don’t get me wrong!
But I do not want to see you put yourself in the awkward situation.

Here is some hints
Image of human or animal shouldn’t be shown on your transport box, if you do
that image might get blacken out by the black marker or black paint anyway.
Or if they feel that the image is improper, your transport box might be held at the custom indefinitely.
The box should be as plain as possible, better yet if it has only name of the company in plain text.
Green is most preferable color in Saudi Arabia.
Consult the Saudi Embassy or Consulate regarding everything.

Just want to let you know before hand.

You make a very good point there. Ill drop any marking on the box.
Thanks for your concern.

The UART pins typically need a small external circuit to protect them, even if the device is 5v. Many are NOT 5v, and I would always use one to be safe. You will need two, one for each device, unless you are connecting them with a NMEA 0183 multiplexer prior to the FEZ (for which there is no need, you can do this yourself much cheaper.)

These are very common ICs, cheap and easy to find so don’t let this discourage you!

Thank you Patrick for your answer.
One more beginner question, what is the name of this small external circuit you are talking about? Maybe Max232, RS232 shifter, or other ?
In advance, thanks!

RS232 transceiver. A MAX232 will suit you well, though you will need 4 external capacitors. If you look at the datasheet for the MAX220, there are a couple versions which do not require external capacitors, which is my preference - why add 4 caps if you don’t have to :slight_smile: