Pro Micro Serial Communication Issue
Posted: Wed Jul 15, 2015 5:43 pm
Hello all,
Basically, I am unable to send the Pro Micro 3V anything over serial.
I am receiving data from the board just fine (in fact, it doesn't matter what I set the baud rate to, it seems to adjust every time I connect), but sending anything through the Arduino serial monitor causes it to freeze up until I unplug the Pro Micro.
Using a different serial monitor (Realterm) showed much the same results, except that the freezing was handled better and I just kept seeing the incoming serial data, suggesting it's an issue with the Pro Micro or the Pro Micro drivers.
The LED on the board doesn't light up when I send any commands, suggesting nothing is reaching the board to begin with.
The sketch itself is pretty straightforward. It constantly outputs sensor values (everything seems correct here) until I send a command, when it should stop and send something else. The Pro Micro doesn't seem to be receiving the command and just keeps outputting the sensor values. Fairly sure it's not a code issue though, given the results above and that the code works flawlessly on a Nano.
What can I do to further troubleshoot?
System: Windows 7 Pro x64
Arduino IDE: 1.6.4
EDIT:
Here's the truncated code:
Basically, I am unable to send the Pro Micro 3V anything over serial.
I am receiving data from the board just fine (in fact, it doesn't matter what I set the baud rate to, it seems to adjust every time I connect), but sending anything through the Arduino serial monitor causes it to freeze up until I unplug the Pro Micro.
Using a different serial monitor (Realterm) showed much the same results, except that the freezing was handled better and I just kept seeing the incoming serial data, suggesting it's an issue with the Pro Micro or the Pro Micro drivers.
The LED on the board doesn't light up when I send any commands, suggesting nothing is reaching the board to begin with.
The sketch itself is pretty straightforward. It constantly outputs sensor values (everything seems correct here) until I send a command, when it should stop and send something else. The Pro Micro doesn't seem to be receiving the command and just keeps outputting the sensor values. Fairly sure it's not a code issue though, given the results above and that the code works flawlessly on a Nano.
What can I do to further troubleshoot?
System: Windows 7 Pro x64
Arduino IDE: 1.6.4
EDIT:
Here's the truncated code:
Code: Select all
#include <SPI.h>
// a few sensor libraries go here
// a ton of variables go here
boolean start = true;
int loopDelay = 20;
void setup() {
Serial.begin(115200);
//initializing stuff for the sensors (SPI)
delay(1000);
}
void loop() {
if (start && millis() - last >= loopDelay)
{
last = millis(); // this is just to keep track of the last loop run, mostly to give the sensors time to get new values
String output = "";
// several sensor and calculated values added to String output
Serial.println(output);
}
// for debugging
if (!start)
Serial.println("Stopped");
}
void serialEvent(){
if (start)
if (Serial.available() > 0)
if ((char)(Serial.read()) == 's')
start = false;
}