Program code Password protect identification

Hi all.

I would like to ask anybody knows that if I write a program and uploaded to the Arduino it is possible to make a password when I connected the Arduino? Is it possible to make password protection?

It believe it could be possible on arduinos using atmega for USB-interface.. A rewrite of the bootloader. I'm not up to the task!

wentworthmiller5: Is it possible to make password protection?

What do you want to protect? And what level of protection do you want?

It is very difficult to make sense of code that has been uploaded to an Arduino - even if you can download the Hex code to a PC. And you can set fuse bits in the Atmega 328 to prevent that.

It would not be difficult to add code in setup() that requires a password to be entered before it allows loop() to run.

...R

Robin2: What do you want to protect? And what level of protection do you want?

It is very difficult to make sense of code that has been uploaded to an Arduino - even if you can download the Hex code to a PC. And you can set fuse bits in the Atmega 328 to prevent that.

It would not be difficult to add code in setup() that requires a password to be entered before it allows loop() to run.

...R

for example. When I write a program code I sell to anyone. If anyone can connect my arduino He can read my program source code. He will know the program algorithm and he can modify my program. In the worst case he can duplicate my work and he can sell my program to anyone. This is the reason why I would like to protect my code with password. But I dont know how.

If anyone can connect my arduino He can read my program source code

Your source code never goes anywhere your Arduino.

AWOL: Your source code never goes anywhere your Arduino.

ohh I understand. If I have a code I can upload the codes (this always a new code) but nobody can't read the original code. Am I right?

The IDE calls a C/C++ compiler which converts your source code into machine code. You can then ask the IDE to upload that machine code to your Arduino.

It is still possible to extract the machine code, but it will look nothing like your source code, and will take a considerable effort to make it so.

AWOL: The IDE calls a C/C++ compiler which converts your source code into machine code. You can then ask the IDE to upload that machine code to your Arduino.

It is still possible to extract the machine code, but it will look nothing like your source code, and will take a considerable effort to make it so.

Its clear. Thank you everything.