Failed connection: Data Streamer for Excel showing no values

Hello everyone,

I am relatively new to the world of Arduino programming and am currently facing a problem: I cannot read data from my Arduino Micro in Excel. The code seems to be correct, as the values displayed in the Serial Monitor are exactly what I want. However, reading the data into Excel via the Datastreamer does not work. I have closed all tabs in the Arduino IDE, but nothing happens. Both the port and the baud rate have been set correctly.

Another strange thing is that I don't get any timestamps in the first table in Excel; this remains empty even after the execution has started, just like all the other data. Does anyone have any idea what could be causing this? Or could it even be directly due to the Arduino Micro?

Here is my example code:

// Pin-28BYJ-48 
const int motorPin1 = 8;
const int motorPin2 = 9;
const int motorPin3 = 10;
const int motorPin4 = 11;


const int potPin1 = A0; // Potentiometer 1, Angle determination for engine
const int potPin2 = A3; // Potentiometer 2, Rotation angle for determining the step of the motor

// 28BYJ-48 Motor
const int stepsPerRevolution = 4096; // Total steps for 28BYJ-48
int stepNumber = 0; // 

struct Event {
  float voltage1;
  float voltage2;
  int stepNumber;
};

void setup() {
  Serial.begin(9600); 

 
  pinMode(motorPin1, OUTPUT);
  pinMode(motorPin2, OUTPUT);
  pinMode(motorPin3, OUTPUT);
  pinMode(motorPin4, OUTPUT);
}

void loop() {
  Event event;

  int potValue1 = analogRead(potPin1);
  int potValue2 = analogRead(potPin2);
  event.voltage2 = potValue2 * (5.0 / 1023.0);
  event.voltage1 = potValue1 * (5.0 / 1023.0);
  event.stepNumber = stepNumber;

  Serial.println(event.voltage1);
 delay(150);

  // Output Sensor1 for stepper
  int angle = map(potValue1, 0, 1023, 0, 270);
  int invertedAngle = 270 - angle;
  int targetStep = map(invertedAngle, 0, 270, 0, stepsPerRevolution / 2);

  int stepsToMove = targetStep - stepNumber;

  if (stepsToMove != 0) {
    int direction = stepsToMove > 0 ? 1 : -1;
    stepMotor(direction);
    stepNumber += direction;
  }

  delay(2); // speed Stepper
}

void stepMotor(int step) {
  switch (stepNumber % 4) {
    case 0:
      digitalWrite(motorPin1, HIGH);
      digitalWrite(motorPin2, LOW);
      digitalWrite(motorPin3, LOW);
      digitalWrite(motorPin4, LOW);
      break;
    case 1:
      digitalWrite(motorPin1, LOW);
      digitalWrite(motorPin2, HIGH);
      digitalWrite(motorPin3, LOW);
      digitalWrite(motorPin4, LOW);
      break;
    case 2:
      digitalWrite(motorPin1, LOW);
      digitalWrite(motorPin2, LOW);
      digitalWrite(motorPin3, HIGH);
      digitalWrite(motorPin4, LOW);
      break;
    case 3:
      digitalWrite(motorPin1, LOW);
      digitalWrite(motorPin2, LOW);
      digitalWrite(motorPin3, LOW);
      digitalWrite(motorPin4, HIGH);
      break;
  }
}

Many thanks in advance and best regards!

If your data appears accurately in the Serial Monitor, then the issue you're facing is unrelated to your code. I have a couple of suggestions that may help resolve this problem, as they are generally applicable: Firstly, ensure that the Data Streamer is configured to a baud rate of 9600. Have you done this? Additionally, please note that the Streamer will not function if the Serial Monitor is active. Turn off the Serial Monitor and give it another try.

Thanks for the input, but both things have been checked. Both the baud rate is correct and no serial monitor is open as I am not installing the code for the Arduino on the PC with the Excel Data Streamer. What is strange is that contrary to all tutorials I don't get any timestamps in the table.

Can I see a screenshot of your settings? Maybe I could help from there.
Also, if you have Arduino IDE running on the same port, try closing it and only using excel on that as two softwares cannot be using the same port at the same time.

1 Like

Sure, I've attached the pictures for you. If you need others, please let me know! Thank you very much



I have just tried again with another Windows computer on which no Arduino software. After installing the Data Streamer step by step, I came to the same conclusion that no values or times are entered. Could this be related to the fact that I have always written the software on a Mac and uploaded it from there to the Arduino Micro?

Yes, it seem that way.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.