1 Reply Latest reply on Nov 17, 2014 8:36 AM by Intel_Peter

    Just Started: Using two of a Component(SD,USB)

    RSutton

      Hello Galileo Community !

       

      I just started and I have been going through some code for starting and I notice alot of items are called such like   SD.DoSomething  or Serial.Read .... What if I have 4 different serial ports hooked up? how do I go about accessing each one individually?  Serial.begin(9600); assumes what com port? I Guess what im not understanding is what if im using 3 com ports on my Galileo... which Serial is it reading on? How do I set this?  

       

      What if I have two SD's ? and such... Could someone point me in the right direction?

        • 1. Re: Just Started: Using two of a Component(SD,USB)
          Intel_Peter

          Hello RSutton,

           

          As I understand you can use multiple serial ports at the same time, but you have to initialize all of them for example:

           

          To use the serial port 0:

          Serial.Begin(XXXXX);                    //Enter the baud rate you want to use instead of the XXXXX

          Serial.Read();

          Serial.println();

          To use the serial port 1:

          Serial1.Begin(XXXXX);                  //Enter the baud rate you want to use instead of the XXXXX

          Serial1.Read();

          Serial1.println();

           

          In regard to using the SD port is a little bit different because you use the SDIO, if you follow the link I will post bellow you will find a post about reading and writing on the SD Card, it's an Edison post but Ihink it should work on Galileo as well.

           

          How to use SD card

           

          If you have any other doubts don't hesitate to ask.

           

          Regards,

                      Peter