manojkl
Newbie level 5
hello
I am trying to control 230V lamp brightness using a triac and zero crossing detector using voice recognition module.whenever i say something to voice module it takes that value and compare it with the stored value if it matches(using switch statement) then execute certain code,but the function i am calling in case is executing only once so my bulb will glow only once but i need to glow bulb until next command is given through voice module i.e i need to keep on checking the condition also update the values to the voice module if that condition is not met then it should come out of the loop and goto the given condition.How can i do that? i think while is not a good option any other suggestion?
I am trying to control 230V lamp brightness using a triac and zero crossing detector using voice recognition module.whenever i say something to voice module it takes that value and compare it with the stored value if it matches(using switch statement) then execute certain code,but the function i am calling in case is executing only once so my bulb will glow only once but i need to glow bulb until next command is given through voice module i.e i need to keep on checking the condition also update the values to the voice module if that condition is not met then it should come out of the loop and goto the given condition.How can i do that? i think while is not a good option any other suggestion?