This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Turn Off All Ports When One Motor Disconnect

Hi Everyone,

I am trying to improve my coding skill. Here is my scenario:

I have four ports which connected to four DC motor. The default state of the ports is set to '0'. I change the ports state to '1' for turning on all the motors. When I disconnect one of the Motors from their port, one motor will be off because I disconnect it. But the other three are still running. How do I know if my ports is connected to any device such as DC motors? Can anyone show a sample code?

Thanks!

Regards,
Sharil

Parents
  • This site really is broken.

    I get a timeout when I post the first time. Trying to press post a second time, the site claims I have already posted.

    So I keep the text and wait for almost two hours. Do a reload of the thread and my post isn't visible. I then repost and now both the original post and the repost becomes visible. So Keil seems to sometimes fail to perform the full database update when receiving posts and then doesn't repair the thread until a new post arrives.

Reply
  • This site really is broken.

    I get a timeout when I post the first time. Trying to press post a second time, the site claims I have already posted.

    So I keep the text and wait for almost two hours. Do a reload of the thread and my post isn't visible. I then repost and now both the original post and the repost becomes visible. So Keil seems to sometimes fail to perform the full database update when receiving posts and then doesn't repair the thread until a new post arrives.

Children
No data