Motor and sensor

dear wvmarle i can't thank you enought.

The simulation work and it's what i need.

And again i can't be enough grateful to you.

Just one last thing...

Can you tell me what the difference between digitalRead and digitalWrite?

And also what the difference about '=' and '=='?