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

Jan Kanon PA7X

Member
Licensed User
Longtime 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
 

Jan Kanon PA7X

Member
Licensed User
Longtime 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
 
Upvote 0

Jan Kanon PA7X

Member
Licensed User
Longtime User
And how do tou think to comunicate between the two parties?
One device must be an AP?

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.
 
Upvote 0
Top