How to Turn LED blinking on and off using Toggle button?
Afficher commentaires plus anciens
On a toggle button callback, I'm doing this:
while button_state == get(hObject,'Max')
writeDigitalPin(a,'D3',1);
writeDigitalPin(a, 'D6' ,0);
pause(.5);
writeDigitalPin(a,'D3',0);
writeDigitalPin(a, 'D6' ,1);
pause(.5);
end
if button_state == get(hObject,'Min')
writeDigitalPin(a, 'D3' ,0);
writeDigitalPin(a, 'D6' ,0);
end
Now problem is once LED starts blinking, they wont stop and blink continuously, even after I turn toggle button "off". Help me solving the logic.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur App Building dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!