Skip to content

Not an Issue But a question #69

@rajdpandey

Description

@rajdpandey

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...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions