9 Replies Latest reply on Feb 5, 2015 12:16 AM by tingxuan

    no response in serial console

    tingxuan

      my code is compiled with no error and there was no error when i am uploading the sketch from arduino 1.5.3-intel.1.0.4. however the serial console will not even print out text from void setup().

       

      my galileo gen 2 is connected to 2 RFID reader at pin 5, 6, 7 and 8.

       

      setup.PNG

       

      anyone knows how to rectify this issue?

       

      thks

        • 1. Re: no response in serial console
          DiegoV_Intel

          Hi tingxuan,

           

          I've just tested it and you should use "Serial" instead of "Serial1".

           

          I edited the delay line also to delay(1000);

           

          See the picture below:

          Capture1.JPG

           

           

          Regards,

          Diego.

          • 2. Re: no response in serial console
            rgb

            You can see more in AlexT;s blog

            http://alextgalileo.altervista.org/blog/galileo-uart-and-arduino-serial-objects-mapping/

            Serial = USB

            Serial1 = pins 0 & 1

            Serial2 = 3.5mm port

            rgb

            • 3. Re: no response in serial console
              tingxuan

              hi diego and rgb,

               

              thanks for your reply.

               

              I have tried serial and serial2 but neither is printing anything on the serial console also.  I upload the sketch via a microUSB cable to the Galileo. Could the microUSB cable be the reason why galileo is not able to send serial data to the serial console?

              • 4. Re: no response in serial console
                rgb

                Hi Tingxuan

                If you can connect and upload a sketch, the console should work

                Assuming that it uploaded successfully, your console settings are correct (9600) and you selected the correct board, my guess would be that you couldn't open the serial console in the fraction of a second before the message was sent.

                Try the following

                // the setup routine runs once when you press reset:

                void setup() {

                  // initialize serial communication at 9600 bits per second:

                  Serial.begin(9600);

                  delay(5000);

                  Serial.println("Testing Setup");

                }

                 

                // the loop routine runs over and over again forever:

                void loop() {

                  Serial.println("Testing Looping");

                  delay(5000);

                }

                rgb

                • 5. Re: no response in serial console
                  tingxuan

                  Hi rgb,

                   

                  I have adopted your suggestion in a new sketch and upload to my galileo gen 2. The serial print is working fine even at delay(1000).

                   

                  testing1.PNG

                  however when i delay the time in my sketch, the serial console shows the **B0100000063f694 which indicates a crash error.

                   

                  below is my sketch in the setup and void section and i am only use the softwareserial library.

                   

                  //Init

                  void setup() 

                  {

                    delay(5000);

                    Serial.begin(9600);

                    delay(5000);

                    Serial.println("13.56MHz SM130 Reader(s) Initialized");

                    Serial.println("Place Tags within Antenna Field and Press 'S' followed by Enter");

                   

                   

                  }

                  //Main

                  void loop()                

                  {

                     // check for command from serial port

                    if(Serial.available() > 0)

                    {

                      switch(Serial.read())

                      {

                      case 's':

                      case 'S':     

                        //rfid = rfid1;

                        seekingMode = 1;

                        rfid1.begin(19200);

                        onAntennaPower1();

                        tagsString1 = seeking1();

                        offAntennaPower1();

                        rfid1.end();

                       

                        //rfid = rfid2;

                        seekingMode = 1;

                        rfid2.begin(19200);

                        onAntennaPower2();    

                        tagsString2 = seeking2();

                        offAntennaPower2();

                        rfid2.end();

                       

                        Serial.println(tagsString1);

                        Serial.println(tagsString2);

                        tagsString1 = "";

                        tagsString2 = "";

                       

                        break;

                      case 'x':

                      case 'X':

                        //rfid = rfid1;

                        rfid1.begin(19200);

                        rfidReset1();

                        rfid1.end();

                       

                        //rfid = rfid2;

                        rfid2.begin(19200);

                        rfidReset2();

                        rfid2.end();

                        break;

                      default:

                        Serial.println("Invalid Command");

                      }

                    }

                  }

                  • 6. Re: no response in serial console
                    rgb

                    Hi tingxuan

                    The purpose of the delay in setup was to give you time to open the console the delay in the loop was to avoid saturating the communications channel

                    I assume that you are trying to use the software serial library and rfd1 and rfd2 are pins that you are trying to do serial communication on.

                    I generally work in Python, but I don't think that the software serial library works with the Galileo

                    see: https://communities.intel.com/message/219095

                    You could use serial1 with pins 0 & 1 or i2c interface or a slave boards

                    rgb

                    • 7. Re: no response in serial console
                      DiegoV_Intel

                      Hi,

                       

                      SoftwareSerial works only in Galileo Gen2.

                       

                      I attached an example if you can test it. It uses SoftwareSerial library.

                       

                      Regards,

                      Diego.

                      • 8. Re: no response in serial console
                        rgb

                        Hi Diego

                        Thanks for the correction

                        I have been working with Gen 1 boards, so didn't know

                        rgb

                        • 9. Re: no response in serial console
                          tingxuan

                          Hi guys,

                           

                          I have gotten the answer. SoftwareSerial only works with pin 2 and 3 for galileo gen2 hence the program crashes and will not work with the use other pins.