psieg / Lightpack

Lightpack and Prismatik open repository

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

sometimes LED does not turn off when i click turn off

hans2356 opened this issue · comments

i am using ambilight kit from alliexpress.
the led works fine, but when i click turn off button, the leds changes dim white, and does not response to screen.
also, if i shutdown my computer without turn off the leds, they left tuned on.

try setting this to 0
image

that fixes dim white problem, but i want to keep eye care setting.
and they did not fix the turn off problem when my computer shuted down.

i've got source code from seller, and it seems very similar to https://github.com/dmadison/Adalight-FastLED/blob/master/Arduino/LEDstream_FastLED/LEDstream_FastLED.ino#L221
i think there is timeout option for controller, but i can not upload it to my board somehow..

my sketch says
avrdude: Version 6.3-20190619
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch

     System wide configuration file is "C:\Users\hans\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"

     Using Port                    : COM3
     Using Programmer              : arduino
     Overriding Baud Rate          : 115200

avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0xf8

and this is code from seller
LEDstream_FastLED.ino.txt.txt

Is there possible to make plugin that automatically turn off the leds when program off or computer shutted down?

commented

hi, could you try this one:
https://github.com/dmadison/Adalight-FastLED
it's an updated version of the one you linked and have a timeout in case of no communication.
by default it's 60s but you can change it:

const uint16_t
	SerialTimeout  = 60;      // time before LEDs are shut off if no data (in seconds), 0 to disable

unfortunately, my uno can't reprograming. it seems not reprogramable. so, i made some macro using autohotkey which automatically change the profile that turn off all led when i shut down.

commented

Weird, never saw a Uno which can't be reprogrammed.
What does the error say ?
Have you exit the ambilight software before trying to reprogram it ?

i am using arduino ide 2.0.0 and using same useb port the product use(ch340)
when i click upload button, they says
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x13
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x13
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x13
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x13
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x13
Problem uploading to board. See https://support.arduino.cc/hc/en-us/sections/360003198300 for suggestions.

avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x13
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x13
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x13
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x13
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x13

and the seller says, this product can't be rewritten.
so i made some macro using #306
they let profile changed (luminosity threshold 0, overall brightness 0%) before the system shutdown.

commented

Interesting. Do you have a brand / model name ?
Maybe this is why arduino chip can be found online for cheap.

i don't have it right now, but i will ask to seller, and after they answer, I'll post here

could be SPIEN fuse bit

SPIEN: 0 value (programmed) means serial programming of ATmega32/32A enabled. Don’t change this unless you have parallel programmer! Because once disabled ATmega32A can’t be programmed using serial programmer.

https://binaryupdates.com/setting-avr-fuse-bits/