Password protect your project?

Hello,

I'm thinking about adding a password to a project. It is hard to google, since a common doorlock password is dominating google results. I did find a video that seems to be what I'm looking for, but it is not clear.

Can this be done?

Thank you!

Thinking..
.
.
Eehhhr
.
.
Thinking..
.
.
.

What's the difference between what you want and what you found a gazillion times already ?

The answer to your real question is: Yes, sure.

gr4474:
Hello,

I'm thinking about adding a password to a project. It is hard to google, since a common doorlock password is dominating google results. I did find a video that seems to be what I'm looking for, but it is not clear.

Can this be done?

Thank you!

HOW TO ADD PASSWORD TO YOUR PROJECTS || KEYPAD INTERFACING WITH LCD TO ARDUINO || ARDUINO PROJECT - YouTube

What are you trying to password protect? Is it for your code (as in a user needs to enter a password to do something)? or do you want to prevent access to your code (as in someone looking over your programming)?

If it's the latter, of course you can do whatever you want with your own stuff, but withholding code from the open source community is kinda counter-productive to the concept of open source?

How much would it have cost you if you had to license and pay for the compiler, the IDE and all of the publicly available libraries available for the Arduino?

Think about it.

I'm thinking about someone who had my item trying to make money off of it. If they weren't trying to profit from it, I could care less who sees the code.

You could require a password be entered as part of your setup() code, if no password is entered then have the code just hang:
while(1);
and not proceed into loop().

You can use the Lock Bits to prevent someone from downloading the fuses and Flash contents from the uC in your project.
That would force anyone trying to duplicate your code to resort to more hostile hardware methods (perhaps involving delidding the uC chip) to access it.

Thank you CrossRoads.

gr4474:
I'm thinking about someone who had my item trying to make money off of it. If they weren't trying to profit from it, I could care less who sees the code.

What is the point? If I had you device (the chip) I could not "read" your code but only the content of the flash memory. I could then make a copy if it and sell it. If you set the lock bits as suggested by CrossRoads I could only observe your device's behaviour and guess how it was programmed.
We are talking about max. 32k code size. A good programmer can derive the source code from the observed output in a few days and produce a clone of your device

olf2012:
What is the point?

Like a normal lock or password etc, a deterrent, or protection. That's what passwords are normally for.

If the device is stand-alone then you make a key device it needs to run. Each one has a unique ID and responds to random queries differently by ID segments and perhaps how many questions have been asked with random noise Q&A thrown in, like adding a few parts to a big IKEA kit or a disassembled appliance. Reverse engineer that.

Yes, LOCK the chips but you can only use the Arduino compiler, the standard libraries from AVR/GCC LibC and libraries/sketches released without OpenSource CopyLeft prohibitions (a lot of my examples here are says so FREE to use).

But you will need to write your own SPI & SD library(ies) to get SD for instance, using the current ones REQUIRE you to publish the full source those libraries are part on, as do a lot of common support you find and may use.

You lock the chip, the flash can't be read or written to by 5V programmers. It takes totally wiping the flash (special 12V programmer) before you can change the flash or lock bits..

You could look into other compilers/IDE's too.