deLIGHT ME
- this is what i named for this smart thing. When the sensor detects that the light changes to dim, it automatically turn on the lamp. As of now this is just a beginner sample for IOT project, soonest i will develop this 'delight me' with another functionality.
I will give you the code for this one, I am using JS.
//CPF- deLIGHT Me
var value = cpf.get("light sensor");
if (value < 10) {
//Control Digital-out D2
var d2 = ui.get("socket d2");
cpf.set("socket d2", 1)
cpf.repeat();
}
else {
//Control Digital-out D2
var d2 = ui.get("socket d2");
cpf.set("socket d2", 0);
cpf.repeat();
}
The cable of the lamp is connected to the relay then from relay to arduino shield next is the light sensor connected again to arduino shield.
Thank you guys, i will be posting here for more updates.
Congratulations! This post has been upvoted by the communal account, @steemph.cebu by jriel being run at Teenvestors Cebu (Road to Financial Freedom Channel). This service is exclusive to Steemians following the Steemph.cebu trail at Steemauto. Thank you for following Steemph.cebu curation trail!
Don't forget to join Steem PH Discord Server, our Discord Server for Philippines.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Congratulations! This post has been upvoted from the communal account, @minnowsupport, by jriel from the Minnow Support Project. It's a witness project run by aggroed, ausbitbank, teamsteem, theprophet0, someguy123, neoxian, followbtcnews, and netuoso. The goal is to help Steemit grow by supporting Minnows. Please find us at the Peace, Abundance, and Liberty Network (PALnet) Discord Channel. It's a completely public and open space to all members of the Steemit community who voluntarily choose to be there.
If you would like to delegate to the Minnow Support Project you can do so by clicking on the following links: 50SP, 100SP, 250SP, 500SP, 1000SP, 5000SP.
Be sure to leave at least 50SP undelegated on your account.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit