This video shows how to use the limit switch to make motor stop immediately in emergency case. The controller used in this video can support up to 4 limit switches.
The source code is very simple:
?php
include_once "/lib/sd_spc.php";
spc_reset();
spc_sync_baud(460800);
spc_request_dev(14, "set mode half");
spc_request_dev(14, "goto -sw0 800 100000");
while(1)
{}
?
For more information, refer to this document [ Ссылка ]
Show less
![](https://i.ytimg.com/vi/a5nphhUd5E8/maxresdefault.jpg)