I am making a lighting for my room with a 5 meter, 300 LED's strip.
I would like to control them by using a Bluetooth HC-05 module.
The program itself works fine.
The only problem is that the receiver gets wrong values when the arduino is under full load.
Sometimes it receives nothing, mostly it gets wrong values (I sent an 'I' but it gets f.e. a ')' ) and after 5 or more attempts it reads the right value.
I don't understand why it works (almost but not everytime) under low or normal load, but not under full, or approximately full load (when my variable wait (in loop()) tends towards 0).
Maybe it's because i bought a 3€ arduino and a even cheaper bluetooth module.
If bluetooth is available it calls my blt() function which expects more numbers for changing the settings. After every read value it clears the Input Buffer of bt by using my function rewindBt().
Btw. is there any function in the SoftwareSerial library like rewind(stdin) in C?
I know, that i could set a delay(30) in my loop() but i want the LED's to walk fast along the strip f.e. when i use snake().
Sorry for my bad English, my German would be a lot better. ![]()
Thanks for reading this and maybe helping me.
Led_Strip_2.0.ino (12.6 KB)