Optiboot / optiboot

Small and Fast Bootloader for Arduino and other Atmel AVR chips
Other
1.09k stars 401 forks source link

How to turn built in led completly off? #288

Closed FrisscoCBR closed 4 years ago

FrisscoCBR commented 4 years ago

So i am using a command like this to create a bootloader to flash on to atmega328p so i dont have built in led on never.

omake LED_START_FLASHES=0 LED_START_ON=0 atmega328

Everything goes as expected. It uploads as expected but then built in LED turns full on until i upload a blank sketch. After that whe i hit RESET on arudino in again turns on led for a short time and than nothing as expected.

The thing is i want it to never turn on. To not pull that pin HIGH ever, untill i tell it to. Its really important becuase i am controlling a cnc spindle VFD with that pin,and i can not use any other pin becuase GRBL is defined in that way!

Thanks in advance!

WestfW commented 4 years ago

Fixed in https://github.com/Optiboot/optiboot/commit/6f98751c6d184ec4a9c7f1fe0f0dcf12f9db2cc9 All of the option symbols are now 0/1 instead of sometimes defined/undefined.

FrisscoCBR commented 4 years ago

After testing out your new code and using the same command

omake LED_START_FLASHES=0 LED_START_ON=0 atmega328

and burn it to the chip now after i restart the power to the arduino and upload the blank sketch built in led stays fully on! I am usnig arduino uno board!

After i went out to test with multimeter built in led turned off! Which means that some current is leaking but the pin is not HIGH at all! So your code is correct just the damn led is bad! I suggest this to be added in comments for anyone that is interested.

Even if you use LED_START_FLASHES=0 the pin actually newer goes high! Its just the damn BUILT IN LED that is getting leaking current from somewhere therefore it appears to be ON not OFF!