Set LB1 and LB2 low on Arduino and ATmega
The lock bits can only be set via ISP, HVSP, or HVPP. There is no provision for setting the lock bits via the Arduino IDE even when a programmer is used; they must be set using AVRDUDE or a comparable tool.