logo elektroda
logo elektroda
X
logo elektroda

OpenBeken + WB2S + A4988, how to control it using smart switch?

Arsenich 771 6
ADVERTISEMENT
  • #1 20617053
    Arsenich
    Level 2  

    Hello!
    Just flashed OpenBeken to Smart Switch Mini, it's awesome!)))
    But what is my question/problem... I want to use it as a curtain controller with stepper motor and A4988 drivers with shield. WB2S has enough free PWM pins (some of them can be freely released) to control the stepper. But I'm stuck in searching how to realize it, maybe you can help me?
  • ADVERTISEMENT
  • #2 20617510
    p.kaczmarek2
    Moderator Smart Home

    If I understand correctly, you want to implement a stepper motor driver in OBK? Well, then you can look into the drivers system, add a new driver within a separate file, and write your logic here.
    You can look at other drivers and use them as an example. For example, here is a bridge driver by @valeklubomir:
    https://github.com/openshwprojects/OpenBK7231T_App/blob/main/src/driver/drv_bridge_driver.c
    Do you have any programming and C experience?
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #3 20617562
    Arsenich
    Level 2  

    Thank you for your answer!
    Yes, I have a little C experience, tomorrow I will look for your link, hope I'll understand)))
  • #4 20617574
    p.kaczmarek2
    Moderator Smart Home

    You can just fork OpenBeken and use online build to get binaries. So-called "Release artifacts" are generated every time, even in forks. You can start by editing drv_main.c and adding a new driver entry.
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #5 20617583
    Arsenich
    Level 2  
    Can you give me a link for online build, please?
  • #6 20617601
    p.kaczmarek2
    Moderator Smart Home
    You need to fork OpenBeken main app repository and then when you commit, you get a mark here:
    OpenBeken + WB2S + A4988, how to control it using smart switch?
    you click that mark and get that:
    OpenBeken + WB2S + A4988, how to control it using smart switch?
    click details now, and you will see:
    OpenBeken + WB2S + A4988, how to control it using smart switch?
    then click summary:
    OpenBeken + WB2S + A4988, how to control it using smart switch?
    and then scroll down:
    OpenBeken + WB2S + A4988, how to control it using smart switch?
    if you download that "artifacts" 12.4MB file, you will get binaries for all platforms for that commit
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #7 20617605
    Arsenich
    Level 2  
    Great!!! Thank you! Hope tomorrow will be good news with my project. :)

Topic summary

The discussion revolves around using OpenBeken firmware on a Smart Switch Mini to control a stepper motor with A4988 drivers for curtain automation. The user seeks guidance on implementing a stepper motor driver within the OpenBeken framework. Responses suggest forking the OpenBeken repository, modifying the driver files, and utilizing online build tools to generate the necessary binaries. Links to relevant resources and examples are provided to assist the user in their project.
Summary generated by the language model.
ADVERTISEMENT