I'm new to Arduino and I'm working on a project for controlling my somfy blind with Arduino. I have a 433mhz transmitter and I changed it's crystal so it now 433.42mhz.

Now, I used this code GitHub - Nickduino/Somfy_Remote: An Arduino Sketch able to simulate a Somfy remote control
to transmit the commands to the blind but it not working every time, just sometimes... I didn't understand the reason yet. I think that the problem is in the software because one time I sent a command, the blind moved, then I sent another command and it didn't move, and then I sent an additional command and it moved... But there is a rolling code that needs to be +1 every time you send a command(like "down 1", "up 2", "down 3"...) and when the blind gets a wrong rolling code, he removes this remote code and this remote code won't work again. So why my blind didn't removed the Arduino-remote when he got a wrong rolling code?

I have a LED connected to the transmitter pin so I can see if the Arduino really transmit the command(I tried to remove the LED, still not working).

The writer of this code didn't use digitalWrite, and when I copied this code to a project with buttons, the buttons pins were INPUT_PULLUP, and after the Arduino transmitted a code, the buttons needed to be set as INPUT_PULLUP again to work again. So... maybe the problem is at here, that the writer didn't use digitalWrite, he used PORTD?

Sorry if all of that is bulshit, like I said above, I'm a beginner.
And sorry for my very bad English

Please follow the advice on posting a programming question given in Read this before posting a programming question

In particular note the advice to Auto format code in the IDE and to use code tags when posting code here