B4R Question 25+ Amp Motor control with browser and touch buttons

Discussion in 'B4R Questions' started by Jan Kanon PA7X, May 18, 2018 at 5:01 AM.

  1. Jan Kanon PA7X

    Jan Kanon PA7X Member Licensed User

    Hi b4X friends,

    I am currently working on a project which needs to control 2 x 25+ AMP DC Motors with NodeMCU (Arduino like by Wifi connection) in the prototype this works. The control is by browser which interacts with the Webservice on the NodeMCU. I now control the motors by buttons which swicthes on and of. However I need touch buttons, as long as you touch the button the motor runs , as you release the motor stops. Is there anyone who has experience (or has examples) by generating touch buttons (html5) from the B4R webserver code ? And i wonder if there is probably a better solution for this i.e. B4A / B4I App directly communication with the NodeMCU.

    Ideas would be greatly appreciated, thanks.

    Best regards, Jan
     
  2. Erel

    Erel Administrator Staff Member Licensed User

  3. Jan Kanon PA7X

    Jan Kanon PA7X Member Licensed User

    Hi Erel,

    Thanks for your prompt reply. I think I understand what you give as option (or is 1 and 2 a different option?), i only have not clear which device is the MQTT broker. In the solution as now I only have the smartphone end the NodeMCU. No router or other network connection just wifi connection between this 2 devices. And this is a need because the project is a mobile solution which has not network connections to whatever network.

    Please clarify for me the MQTT broker role.

    Best regards Jan
     
  4. Johan Hormaza

    Johan Hormaza Active Member Licensed User

    Create a free CloudMqtt account
     
  5. tigrot

    tigrot Well-Known Member Licensed User

    And how do tou think to comunicate between the two parties?
    One device must be an AP?
     
  6. Jan Kanon PA7X

    Jan Kanon PA7X Member Licensed User

    Yes this is direct Wifi between 2 devices. At the moment the NodeMCU is a webserver which can be accessed by browser on the smartphone (connecting wifi to 192.168.4.1, the default of the NodeMCU). I just read that a android can be in the role of MQTT broker so the NodeMCU will be the client in this solution i suppose.
     
  7. tigrot

    tigrot Well-Known Member Licensed User

    I dont think you can have a MQTT broker and an app on a simple arduino system. You need linux...
     
Loading...