-
Notifications
You must be signed in to change notification settings - Fork 195
Description
Hi,
In your code at this stage:
office = new Switch("office lights", 80, officeLightsOn, officeLightsOff);
kitchen = new Switch("kitchen lights", 81, kitchenLightsOn, kitchenLightsOff);
you are referring invocation as "office lights" & "kitchen Lights" and then port and following that
"On callback" and "off call back".
So here in On call back you are turning something on and in off turing it off.
So let's say example I have created the same for TV :
TV= new Switch("TV", 80, TVOn, TVOff); // This is for tv turning on and off
So What should I write next to increase, decrease or mute the TV volume?
Should it be like this:
Volume= new Switch("Volume", 81, Increasevol, decreasevol);
mute = new Switch("Volume", 81, mutevol, unmutevol);
and respective function for Increasevol, decreasevol, mutevol & unmutevol I will create.
Please help regarding above...