Code doesn't work on PlatformIO, even if it works on Arduino IDE

Hi everyone,
I’m quite new to this environment and today i tried to use a 1 digit segment display with a SN74HC595N module(I use an Arduino mega2560), here’s the code:

#include <Arduino.h>

int pinDT = 7;
int pinLTC = 6;
int pinCLK = 5;

byte letters[3] = { B11101101, B11101000, B11000001};
int c = 0;

void scrollLetter(int c) {
digitalWrite(pinLTC, LOW);
shiftOut(pinDT, pinCLK, LSBFIRST, letters[c]);
digitalWrite(pinLTC, HIGH);
}

void setup() {
for (int i = 5; i < 8; i++){
pinMode(i, OUTPUT);
}
}

void loop() {
scrollLetter(c);
delay(1000);
if (c < 3)
c++;
else
c = 0;
}

Any suggestions are appreciated, thanks in advance.

Can you get more specific than “it doesn’t work”? Compile error, runtime error? What’s the platformio.ini?

thanks for your response, i checked the terminal output and I noticed it was trying to load from a wrong folder, now I solved. Sorry for the inconvenience :slight_smile: