Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Novice
1,503 Views

no response in serial console

Jump to solution

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.

anyone knows how to rectify this issue?

thks

0 Kudos

Accepted Solutions
Highlighted
Novice
19 Views

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.

View solution in original post

9 Replies
Highlighted
Employee
19 Views

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:

Regards,

Diego.

0 Kudos
Highlighted
Valued Contributor I
19 Views
Highlighted
Novice
19 Views

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?

Highlighted
Valued Contributor I
19 Views

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

Highlighted
Novice
19 Views

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).

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");

}

}

}

Highlighted
Valued Contributor I
19 Views

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# 219095 https://communities.intel.com/message/219095

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

rgb

Highlighted
Employee
19 Views

Hi,

SoftwareSerial works only in Galileo Gen2.

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

Regards,

Diego.

0 Kudos
Highlighted
Valued Contributor I
19 Views

Hi Diego

Thanks for the correction

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

rgb

0 Kudos
Highlighted
Novice
20 Views

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.

View solution in original post