![[Youtube] BK7231 LED strip flashing and modification - add IR receiver and buttons to any BK strip [Youtube] BK7231 LED strip flashing and modification - add IR receiver and buttons to any BK strip](https://obrazki.elektroda.pl/2738954100_1672071453_thumb.jpg)
This is a short guide for flashing BK7231T single color LED strip controller with WB3S module.
Futhermore, we're also showing how to connect extra IR receiver (in this case recovered for free from old DVD player), extra buttons and how to configure and script them with OpenBeken event handlers, so they can control LED strip state and brightness.
Please note:
- for scriptable buttons, we're using Btn_ScriptOnly role, it's a button that does not fire anything automatically, it just sends events like OnClick, OnHold, OnDblClick
- for power button, we're using Btn role, this is a button that is automatically linked to LED strip power state and requires no scripts
- for IR receiver, we're using IRRecv role
- after setting pins, you might need to restart device in order to get changes running
- full commands list is available here: https://github.com/openshwprojects/OpenBK7231T_App/tree/main/docs
- our repository is here: https://github.com/openshwprojects/OpenBK7231T_App
- our devices list is here: https://openbekeniot.github.io/webapp/devicesList.html
Here is the script used in the video:
// P21 role is Btn, a power button that works without scripting
// set button hold/repeat/etc times
SetButtonTimes 10 3 3
// alias to turn off LED after 4 secs (repeating event with 1 repeat)
alias add_turnoff_event addRepeatingEvent 4 1 led_enableAll 0
// button events - 23, 22, etc are pin numbers
addEventHandler OnHold 23 add_dimmer 10
addEventHandler OnHold 22 add_dimmer -10
addEventHandler OnDblClick 22 led_dimmer 5
addEventHandler OnDblClick 23 led_dimmer 100
addEventHandler OnClick 20 add_turnoff_event
// IR events
addEventHandler2 IR_Samsung 0x707 0x62 add_dimmer 10
addEventHandler2 IR_Samsung 0x707 0x65 add_dimmer -10
addEventHandler2 IR_Samsung 0x707 0x61 led_enableAll 0
addEventHandler2 IR_Samsung 0x707 0x60 led_enableAll 1
Feel free to ask if you have any questions. Thank you.
Cool? Ranking DIY