Code Problem When Uploading to Arduino Board

Hello, I'm new here.

I have a problem with my PC, when I upload the code for the motion sensor from my PC, the code doesn't work like it should be. The sensor is always HIGH and detect motion even when there is no motion.

But when I upload the code from other PC, the code works fine and the sensor detect motion when there is motion.

So, I think my PC is not properly connected to the Arduino Board.

I tried: 1. Reinstalling driver 2. Change the port 3. Using updated or older version of the Arduino problem

Any Idea on how to fix this without using other people PC ?

If it's not properly connected, you would probably end up with avrdude errors during the upload.

Are you using the same IDE (or more specifically board manager) on both PCs?

What happens when you upload on the 'ok' PC and next connect to the 'faulty' PC and test (without uploading again)?

Adding to that, how do you know it does not work properly? Serial output? To what? Serial Monitor? Or dedicated application?