I am newer to the Arduino scene and have been trying to understand the Serial Monitor better.
I am using a Sparkfun SAMD21 Pro RF and tying to take in and interpolate some GPS data. I was seeing outputs in the serial monitor but then they stopped. Suspecting a problem, I loaded up some simple code as seen below:
This simple code did not produce anything in the Monitor window. Because I see the LED blinking, I believe that Serial.println() function is being executed. Baud Rate was set to 9600 and drop down to 'No Line Ending'. Also restarted IDE.
The LED did blink before, albeit quickly and not at full brightness, but I added a delay to be sure. I also added a Serial.println() in the setup as suggested.
Unfortunately, still nothing in the Serial Monitor Window. I know there are some differences between a SAMD and an Arduino when it comes to certain libraries (SoftwareSerial.h). Wonder if that has any effect?
IF your Arduino is plugged into the USB on PC and if enumerated correctly by Windows OS, then device manager will "show" the enumerated COMx port number.
IF your ArduinoIDE is connected to the virtual COMx port, then There is NO reason a test sketch needs Software Serial.
/*
Blink
Turns on an LED on for one second, then off for one second, repeatedly.
Sketch uses 2846 bytes (1%) of program storage space. Maximum is 253952 bytes.
Global variables use 220 bytes (2%) of dynamic memory, leaving 7972 bytes for local variables. Maximum is 8192 bytes.
*/
#include <Streaming.h> // requires library from http://arduiniana.org/libraries/streaming/
#define BOARD_LED_PIN 13 // Mega
#define BAUD 9600
#define ON_Time 750 // mS
#define OFF_Time 250
int n = 0;
void setup() {
// initialize the digital pin as an output.
pinMode(BOARD_LED_PIN, OUTPUT);
Serial.begin(BAUD);
Serial << "Blink LED & count Demo" << "\n \r" << "by MRB" << "\n\r\n\r" ;
}
void loop() {
digitalWrite(BOARD_LED_PIN, HIGH); // set the LED on
delay(ON_Time); // wait
digitalWrite(BOARD_LED_PIN, LOW); // set the LED off
delay(OFF_Time); // wait
Serial << "Loop #: " << ++n << "\n\r" ;
}
Thanks for the feedback. I agree, this test sketch does not need the SoftwareSerial library. Just bringing it up as an example of how the SAMD21 is slightly different.
I fired up the code you supplied. Again, the programs seems to run fine with respect to the LED but still nothing on the Serial Monitor window. In the meantime I got a redownloaded IDE to no avail.