Created
June 16, 2020 17:01
-
-
Save vishal-pandey/f0e16596d5d2e3e7be2136914b7d6cc7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Package IOTC</title> | |
<script type="text/javascript" src="http://18.221.22.148/iotc-js/iotc.js"></script> | |
</head> | |
<body> | |
<h1 align="center">IOT Made simple</h1> | |
<script type="text/javascript"> | |
IOTC_connect("__APP_KEY__") | |
onConnect = ()=>{ | |
console.log("Hello") | |
subscribe('bulb') | |
subscribe('ac') | |
send('bulb', 'on') | |
} | |
onReceive = (msg, deviceId)=>{ | |
console.log(msg) | |
console.log(deviceId) | |
} | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment