AMS RFD77101 User guide

Type
User guide
RF Digital Corp.
is a subsidiary of HEPTAGON which is now
Member of the ams
Group
The technical content of this RF Digital Corporation (a subsidiary of HEPTAGON)
document is still valid.
Contact information:
Headquarters:
ams AG
Tobelbader Strasse 30
8141 Premstaetten, Austria
Tel: +43 (0) 3136 500 0
e-Mail: ams_sales@ams.com
Please visit our website at www.ams.com
!"#!$%&' ()( '$* +& , -$./0$1$23(-4$56#$1$.478+,&$94&':$1$*; $1 $6#5<= $
///>,(8?@44>'+8$1$A4@B$6=6>"!#>###C$1$'+D-&'-E,(8?@44>'+8$
!
! !
1"
Document""Copyright"2015"Simblee"Corporation""Jan,"11"2016" "
Simblee'Cloud'Reference'v1.0'
$
$
$
$
$
$
$
$
$
$
$
$
$
$
$
$
$
$
$
$
$
$
$
A:(DF,>$
*@+3G>$
H+?(@4>$
2(8?@44$*+DD4'-4G$
$
!"#!$%&' ()( '$* +& , -$./0$1$23(-4$56#$1$.478+,&$94&':$1$*; $1 $6#5<= $
///>,(8?@44>'+8$1$A4@B$6=6>"!#>###C$1$'+D-&'-E,(8?@44>'+8$
!
! !
2"
Document""Copyright"2015"Simblee"Corporation""Jan,"11"2016" "
Table'of'Contents'
SimbleeCloud+Overview+ .....................................................................................................................+3$
SimbleeCloud+Admin+Account+Setup+.............................................................................................................+3$
SimbleeCloud+Dashboard+..............................................................................................................................+4$
I,47JK$>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>$=$
SimbleeCloud+Modules+.................................................................................................................................+4$
L&84$>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>$<$
M2L$>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>$<$
N+7'4$M2L$>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>$<$
JD(-(&@$M2L $>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>$<$
MD&?@4G$>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>$<$
Services+........................................................................................................................................................+6$
L&84$>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>$"$
M2L$>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>$"$
IOP$>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>$"$
MD&?@4G$>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>$"$
Pools+.............................................................................................................................................................+7$
L&84$>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>$Q$
M2L$>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>$Q$
N+7'4$M2L$>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>$Q$
JD(-(&@$M2L $>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>$Q$
MD&?@4G$>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>$C$
SimbleeCloud+Library+Functions+....................................................................................................................+8$
;GG(DF$-:4$2(8?@44*@+3G$@(?7&70$(D-+$0+37$,R4-':$>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>$C$
ID(S34$M2L$TM@4'-7+D('$247(&@$L38?47U$>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>$C$
'@+3G>3,47JK$>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>$C$
'@+3G>'+DD4'-TU$>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>$C$
'@+3G>V7+'4,,TU$>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>$C$
'@+3G>&'-(W4TU$>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>$C$
'@+3G>,4DGT3D,(FD4G$(D-$G4,-M2LX$'+D,-$W+(G$YG&-&X$(D-$@4DU$>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>$C$
2(8?@44*@+3G>+DO4'4(W4T3D,(FD4G$(D-$+7(F(DM2LX$'+D,-$3D,(FD4G$':&7$YV&0@+&GX$(D-$@4DU$>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>$6$
Tutorials+.............................................................................................................................................+9$
Lighting+Control+............................................................................................................................................+9$
P+'&@$*+D-7+@$>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>$6$
H+?(@4$*+D-7+@$>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>$!!$
Z4?$'+D-7+@$>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>$!=$
Z4?$'+D-7+@$[$;7G3(D+$2R4-':$>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>$!<$
Z4?$*+D-7+@$[$2(8?@44*@+3G$K&,:?+&7G$>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>$!C$
Z4?$*+D-7+@$[$.AHPX$%.%X$\&W&,'7(V-$)+7$Z4?V&F4$>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>$!6$
+
+
!"#!$%&' ()( '$* +& , -$./0$1$23(-4$56#$1$.478+,&$94&':$1$*; $1 $6#5<= $
///>,(8?@44 >'+8$1$A4@B$6=6>"!#>###C$1$'+D-&'-E,(8?@44>'+8$
!
! !
3"
Document""Copyright"2015"Simblee"Corporation""Jan,"11"2016" "
SimbleeCloud'Overview'
2(8?@44*@+3G$(,$-:4$?7(GF4$-:&-$4D&?@4,$0+3$-+$'+DD4'-$4W470+D4$&DG$4W470-:(DF>$]+3$'&D$'74&-4$)&,-X$
?(G(74'-(+D&@X$&DG$,-&?@4$'+883D('&-(+D$?4-/44D$8&D0$D+G4,>$]+3$'&D$,4DG$G&-&$)7+8$8+G3@4$-+$8+G3@4X$
8+G3@4$-+$'@+3G$&DG$'@+3G$-+$8+G3@4$4&,(@0X$74@(&?@0X$&DG$S3('R@0>$*+DD4'-$,4 D,+ 7,$-+$2 (8 ?@4 4X$&DG $,4D G$G &-&$-+ $
-:4$'@+3G>$I,4$2 (8? @44 $&,$&$748 + -4X$-+$'+ D-7+ @$83 @-(V@4$G4 W('4 ,$'+D D4 '-4G $-+$-: 4$'@+3 G>$24 DG$84,,&F4,$-+$
G())474D-$2(8?@44,$)7+8$-:4$'@+3G>$A73@0$'+DD4'-$4W470+D4$&DG$4W470-:(DF$/(-:$2(8?@44>$
SimbleeCloud'Admin'Account'Setup'
A+$4D&?@4$0+37$2(8?@44$H+G3@4$-+$,V4&R$-+$2(8?@44 *@+ 3G X$/4 $)(7,-$:&W4 $-+$,4-$3V $&D $&G8 (D $&''+ 3 D->$A: (,$(,$)744$
&DG$&W&(@&?@4$-+$&@@$3,47,>$A+$,(FD$3VX$,(8V@0$W(,(-$-:4$/4?,(-4$?4@+/$&DG$'@('R$+D$^2(FD$IV_B$
https://admin.simbleecloud.com'
$
`D'4$0+3$4D-47$&D$48&(@X$&@+DF$/(-:$0+37$V&,,/+7G$+)$':+('4X$0+3$/(@@$?4$,4D-$&D$48&(@$/(-:$&$@(DR$-+$'+8V@4-4$
-:4$V7+'4,,>$ $
$
A:4$48&(@$/(@@$,:+/$-:4$)+@@+/(DFX$'@('R$+D$^*OM;AM$;**`ILA_B$
$
!"#!$%&' ()( '$* +& , -$./0$1$23(-4$56#$1$.478+,&$94&':$1$*; $1 $6#5<= $
///>,(8?@44 >'+8$1$A4@B$6=6>"!#>###C$1$'+D-&'-E,(8?@44>'+8$
!
! !
4"
Document""Copyright"2015"Simblee"Corporation""Jan,"11"2016" "
SimbleeCloud'Dashboard'
`D'4$0+3aW4$'+8V@4-4G$,(FD(DF$3VX$@+F$(D$-+$0+37$&''+3D-$/(-:$0+37$48&(@$&DG$V&,,/+7G>$Z:4D$@+FF4G$(DX$0+3$
/(@@$?4$G(74'-4G$-+$-:4$2(8?@44*@+3G$&G8(D$V&F4$&,$,:+/D$?4@+/>
$
UserID'
]+3$&74$F(W4D$&$b5c?(-$3D(S34$I,47JK$-:&-$(,$&,,+'(&-4G$/(-:$0+37$2(8?@44*@+3G$&''+3D->$A:(,$JK$?&,('&@@0$&'-,$&,$
-:4$&GG74,,$)+7$0+ 37$2 (8 ?@44 *@+ 3G >$
SimbleeCloud'Modules'
M&':$2(8?@44$H+G3@4$:&,$-:4(7$+/D$3D(S34$b5c?(-$M@4'-7+D('$247(&@$L38?47$+7$M2L$)+7$,:+7->$A:4,4$M2L,$&74$
4,,4D-(&@@0$-:4$3D(S34$&GG74,,$+)$4&':$2(8?@44$H+G3@4>$`D$-:4$H+G3 @4 ,$V &F 4X$/ 4 $/ (@@$,- +7 4$-: 4 $M2 L ,$+ )$4& ' :$
2(8?@44$H+G3@4$/4$/&D-$+37$2(8?@44*@+3G$-+$'+883D('&-4$/(-:>$*@('R(DF$+D$H+G3@4,$+D$-:4$,(G4?&7$84D3$
,:+/,$-:4$)+@@+/(DFB$
$
P4-a,$'@('R$+D$^L4/_$-+$&GG$&$D4/$M2L$-+$-:4$@(,->$
Note:&The&ESN&of&your&Simblee&Module&can&be&found&by&uploading&the&example&“GetESN”&sketch&via&the&Arduino&
IDE&under&Examples&>&SimbleeCOM.&This&sketch&will&output&the&ESN&of&the&Simblee&Module&to&the&Serial&Term inal.&
!$
!$
!"#!$%&' ()( '$* +& , -$./0$1$23(-4$56#$1$.478+,&$94&':$1$*; $1 $6#5<= $
///>,(8?@44 >'+8$1$A4@B$6=6>"!#>###C$1$'+D-&'-E,(8?@44>'+8$
!
! !
5"
Document""Copyright"2015"Simblee"Corporation""Jan,"11"2016" "
&
Name'
]+3$'&D$F(W4$'3,-+8$D&84,$-+$0+37$2(8?@44$H+G3@4,>$JD$-:(,$'&,4X$/4$D&84G$(-$^Md&8V@4_>$J-$(,$3,4)3@$)+7$
(G4D-()0(D F $4& ': $2 (8?@44$H+G3@4X$)+7$4d&8V@4 X$D & 8(DF$+D 4 $^ P & 8V_X$&DG $& D+-:47$^ N 7+ D - $K ++7_>$
ESN'
A:(,$(,$/:474$0+3$(DV3-$-:4$M2L$+)$-:4$2(8?@44$H+G3@4$+)$/:(':$0+3$/&D-$-+$'+883D('&-4$/(-:$2(8?@44*@+3G>$
Force'ESN'
Z:4D$&$2(8?@44$H+G3@4$,4DG,$G&-&$-+$2(8?@44*@+3GX$-:4$G&-&$(,$,4D-$-+$-:4$G4,-(D&-(+D$M2L$+7$^G4,-M2L_$&,$
,:+/D$(D$-:4$,R4-':$3V@+&G4G $-+$-:4$8+G3@4>$N+7'4$M2L$&@@+/ ,$0+ 3 $-+ $74G (74 ' -$-: &-$G & -&$? 0 $(DV 3 --(D F $-:4 $M 2L $+ )$
-:4$D4/$G4,-(D&-(+D$:474X$?0V&,,(DF$-:4$+7(F(D&@$G4,-M2L>$Z4$'&D$@4&W4$-:(,$?@&DR$)+7$D+/>$
Initial'ESN'
Z:4D$&$2(8?@44$H+G3@4$(D(-(&-4,$'+D D 4 '- (+D $/(-:$2(8? @4 4* @+ 3 G X$(-$, 4D G , $&D $(D (-(& @$V & 'R 4- $-: & -$@4 -a, $
2(8?@44*@+3G$RD+/$(-$/&D-,$-+$'+883D('&-4>$]+3$'&D$74G(74'-$-:(,$(D(-(&@$V&'R4-$?0$(DV3--(DF$-:4$M2L$+)$&$
247W('4$+7$%++@$0+3$/&D-$-+$,4DG$-:4$V&'R4-$-+>$Z4$/(@@$-&@R$8+74$&?+3-$247W('4,$&DG$%++@,$)37-:47$(D-+$-:4$
G+'384D->$Z4$'&D$@4&W4$-:(,$?@&DR$)+7$D+/$&,$/4@@>$
Enabled'
L4/$4D-7(4,$&74$&3-+8&-('&@@0$4D&?@4G>$ID':4'R$-:(,$?+d$()$0+3$/+3@G$@(R4$-+$G(,&?@4$-:(,$4D-70>$]+3$'&D$3,4$-: (,$
-+$G(,&?@4$2(8? @44$H+G3@4,$/(-:+3-$D44G(DF$-+$G4@4-4$-:48$)7+8$-:4$@(,->$
$
$
$
$
$
!$
5$
b$
=$
<$
!$
5$
b$
=$
<$
!"#!$%&' ()( '$* +& , -$./0$1$23(-4$56#$1$.478+,&$94&':$1$*; $1 $6#5<= $
///>,(8?@44 >'+8$1$A4@B$6=6>"!#>###C$1$'+D-&'-E,(8?@44>'+8$
!
! !
6"
Document""Copyright"2015"Simblee"Corporation""Jan,"11"2016" "
Services'
L+/$-:&-$/4$:&W4$&$/&0$-+$(G4D-()0$G&-&$)7+8$2(8?@44$H+G3@4,$-:7+3F:$&D$M2LX$/ 4 $'& D$D+/$74 G ( 74 '-X$V7+'4,,$
+7$,-+74$-:(,$G&-&$-+$+37$@(R(DF>$A+$G+$,+X$/4$'&D$3,4$247W('4,$-:&-$&74$(D$-:4$)+78$+)$%.%$,'7(V-,>$A+$,4DG$-+$&$
,V4'()('$%.%$,'7(V-X$/4$D44G$-+$&,,(FD$(-$&D$M2L>
$
P4-a,$&GG$&$,47W('4$&DG$&,,(FD$(-$&D$M2L$
>$ $
Name'
;,,(FD$&$'3,-+8$D&84$-+$-:4$247W('4>$
ESN'
;,,(FD$&$'3,-+8$M2L$-+$-:4$247W('4>$A:(,$/(@@$&'-$&,$&D$&GG74,,$)+7$-:4$247W('4$-:&-$/4$'&D$G(74'-$G&-&$-+>$
URL'
MD-47$-:4$IOP$+)$/:474$-:4$,47W('4$(,$@+'&-4G>$.474$/4$:&W4$93--+DN@&,:247W('4>V:V$,-+74G$+D$+37$,&DG?+d$
,47W47>$
Enabled'
;@@+/,$0+3$-+$G(,&?@4$-+$,47W('4$/(-:+3-$:&W(DF$-+$G4@4-4$-:4$4D-70>$
$
$
$
!$
5$
b$
=$
!$
5$
b$
=$
!"#!$%&' ()( '$* +& , -$./0$1$23(-4$56#$1$.478+,&$94&':$1$*; $1 $6#5<= $
///>,(8?@44 >'+8$1$A4@B$6=6>"!#>###C$1$'+D-&'-E,(8?@44>'+8$
!
! !
7"
Document""Copyright"2015"Simblee"Corporation""Jan,"11"2016" "
Pools'
JD$-:(,$,4 '- (+ D X$/ 4 $& 74 $&? @4 $-+$&GG74, ,$& $V + + @$+ )$/4?V&F 4 ,$- : &- $& 74 $'+ D D 4 ' -4 G $-+ $0 + 3 7$2 (8?@44*@+ 3 G >$A : 4 $M 2 L $
0+3$&,,(FD$&$V++@$/+3@G$?4$3,4G$(D$&@@$+)$-:4$/4?V&F4,$0+3$/&D-$&,,+'(&-4G$/(-:$-:4$V++@>$A:(,$&@@+/,$0+3$-+$
:&W4$F7+3V,$+)$/4?V&F4,$-:&-$'&D$?4$&GG74,,4G$,4V&7&-4@0>$
$
P4-a,$&GG$&$V++@B$
$
Name'
;,,(FD$&$D&84$-+$-:4$V++@>$
ESN'
;,,(FD$&D$M2L$-+$-:4$V++@>$
Force'ESN'
Z:4D$&$/4?V&F4$)7+8$-:4$V++@$,4DG,$G&-&$-+$2(8?@44*@+3GX$-:4$G&-&$(,$,4D-$-+$-:4$G4,-(D&-(+D$M2L$+7$
^G4,-M2L_$&,,(FD4G$(D$-:4$,'7(V->$N+7'4$M2L$&@@+/,$0+3$-+$74G(74'-$-:&-$G&-&$?0$(DV3--(DF$-:4$M2L$+)$-:4$D4/$
G4,-(D&-(+D$:474X$?0V&,,(DF$-:4$+7(F(D&@$G4,-M2L>$Z4$'&D$@4&W4$-:(,$?@&DR>$
Initial'ESN'
Z:4D$&$/4?V&F4$(D(-(&-4,$'+DD4' -(+D $/(-: $2(8 ?@44 *@+3 G X$(-$,4DG,$&D $(D(-(&@$V&' R4-$-:& -$@4-a,$2(8 ?@44 *@+ 3G $RD+ / $
(-$/&D-, $-+ $'+ 883D(' & -4 >$] +3 $' &D $7 4G (74 ' -$-: (, $(D (-(& @$V& ' R4 -$? 0 $(D V3 - -(D F $-: 4$M 2 L $+ )$& $H+G3@4X$2 47 W(' 4$+ 7$% + + @$
0+3$/&D-$-+$,4DG$-:4$V&'R4-$-+>$Z4$'&D$@4&W4$-:(,$?@&DR$)+7$D+ / $& ,$/4@@>$
5$
=$
<$
!$
5$
b$
=$
!"#!$%&' ()( '$* +& , -$./0$1$23(-4$56#$1$.478+,&$94&':$1$*; $1 $6#5<= $
///>,(8?@44 >'+8$1$A4@B$6=6>"!#>###C$1$'+D-&'-E,(8?@44>'+8$
!
! !
8"
Document""Copyright"2015"Simblee"Corporation""Jan,"11"2016" "
Enabled'
;@@+/,$0+3$-+$G(,&?@4$-+$V++@$/(-:+3-$:&W(DF$-+$G4@4-4$-:4$4D-70>$
SimbleeCloud'Library'Functions'
]+3$'&D$4&,(@0$G(W4$(D-+$2(8?@44*@+3G$?0$':4'R(DF$+3-$-:4$4d&8V@4,$&W&(@&?@4>$JD$-:4$;7G3(D+$JKMX$,4@4'-B$
N(@4$e$Md&8V@4,$e$2(8?@44*@+3 G $
Adding'the'SimbleeCloud'library'into'your'sketch'
;GG$-:4$)+@@+/(DF$@(D4$+)$'+G4$-+$-:4$W470$?4F(DD(DF$+)$0+37$,R4-':B$
#include “SimbleeForMobileClient.h”
#include “SimbleeCloud.h”
$
N+7$8+74$'+DW4D(4D-$)3D'-(+D$'&@@,X$/4$G+$-:4$)+@@+/(DFB$
SimbleeForMobileClient client;
SimbleeCloud cloud(&client);
$
A:(,$&@@+/,$3,$-+$3,4$)3D'-(+D$'&@@,$@(R4$'@+3G>NIL*AJ`LL;HMTUf$
$
Unique'ESN'(Electronic'Serial'Number)'
M&':$2(8?@44$G4W('4$:&,$&$)&'-+70$&,,(FD4G$M2L$-:&-$(,$3,4G$-+$3D(S34@0$(G4D-()0$(-$+D$-:4$D4-/+7R>$]+3$'&D$
&''4,,$-:(,$M2L$?0$'&@@(DF$-:4$)+@@+/(DF$)3D'-(+DB$
Serial.begin(9600);
printf("Module ESN is 0x%08x\n", cloud.myESN);
$
A:(,$V7(D-,$+3-$-:4$M2L$+D-+$-:4$247(&@$H+D(-+7$+)$-:4$;7G3(D+$JKM>$
$
cloud.userID'
A:(,$(,$/:474$/4$/(@@$,-+74$+37$3,47JK$&,,(FD4G$)7+8$+37$2(8? @44 *@+ 3G $G& ,:? + &7G >$
unsigned int userID = 0xFFFFFFFF; //Enter your assigned userID here
cloud.userID = userID;
cloud.connect()'
94F(D,$'+883D('&-(+D$/(-:$2(8?@44*@+3G>$
cloud.process()'
A:(,$)3D'-(+D$83,-$?4$'&@@4G$(D$-:4$@++VTU$-+$&@@+/$3,4$+)$2(8?@44* @+ 3 G $)3 D '-(+ D , >$
cloud.active()'
]+3$'&D$':4'R$-:(,$)@&F$-+$,44$()$0+3$&74$'+DD4'-4G$-+$2(8?@44*@+3G>$
cloud.send(unsigned'int'destESN,'const'void'*data,'int'len)'
A:(,$)3D'-(+D$&@@+/,$0+3$-+$,4DG$G&-&$-+$2(8?@44*@+3G>$ $
$
unsigned int destESN = 0x01010101;
cloud.send(destESN, “1”, 1); //sends “1” to end point 0x01010101
<$
!"#!$%&' ()( '$* +& , -$./0$1$23(-4$56#$1$.478+,&$94&':$1$*; $1 $6#5<= $
///>,(8?@44 >'+8$1$A4@B$6=6>"!#>###C$1$'+D-&'-E,(8?@44>'+8$
!
! !
9"
Document""Copyright"2015"Simblee"Corporation""Jan,"11"2016" "
$
SimbleeCloud_onReceive(unsigned'int'originESN,'const'unsigned'char'*payload,'int'len)'
A:(,$)3D'-(+D$74-37D,$G&-&$)7+8$-:4$7&G(+$74'4(W4G$)7+8$2(8?@44*@+3G>$
void SimbleeCloud_onReceive(unsigned int originESN, const unsigned char *payload, int len){
uint8_t myByte = payload[0]; //store first char in array to myByte
Serial.println(myByte); //print myByte via serial
}
Tutorials'
Lighting'Control'
P4-a,$G+$&D$4d&8V@4$+)$3,(DF$2(8?@44*@+3G$&DG$&VV@0(DF$(-$-+$&D$&VV@('&-(+D>$.474$(,$&$,(8V@4$3,4$'&,4$+)$&$@(F:-$
-:&-$'&D$?4$-37D 4G $+D $&DG $+))$@+ '& @@0 X$-:7+ 3 F:$&$8+?(@4$G4W('4X$+7$-:4$/4?>$ $
N+7$:&7G/&74X$/4$/(@@$3,4$&D$ONK55!55$/:(':$:+3,4,$&D$Og9$@4G$&,$+37$^@(F:-_$&DG$5$?3--+D,$)+7$,/(-':4,>$ $
$
$
$
$
$
$
$
Local'Control'
A+$'+D-7+@$-:4$@(F:-$@+'&@@0X$/4$'&D$,(8V@0$3,4$-:4$?3--+D,$&W&(@&?@4$+D$-:4$,:(4@G$&,$,/(-':4,>$`D4$?3--+D$/(@@$?4$
^,/(-':+D_$&DG$-:4$,4'+DG$?3--+D$/(@@$?4$^,/(-':+))_>$.474$(,$&D$4d&8V@4$,R4-':$+D$'+D-7+@@(DF$-:4$PMKB
//CONSTANTS
int light = 3; //green led is on GPIO2
int switchon = 5; //on switch is on GPIO5
int switchoff = 6; //off switch is on GPIO6
//STATE
int prevstate = 0;
int currentstate = 0; //0=OFF 1=ON
void setup() {
pinMode(light, OUTPUT); //set light as output
pinMode(switchon, INPUT); //set switchon as input
pinMode(switchoff, INPUT); //set switchoff as input
Serial.begin(9600);
Serial.println("Light Demo Initiated");
}
void loop() {
readswitches(); //check status of switches
!$
5$
b$
P(F:-$ (,$`L$
P(F:-$ (,$`NN$
!"#!$%&' ()( '$* +& , -$./0$1$23(-4$56#$1$.478+,&$94&':$1$*; $1 $6#5<= $
///>,(8?@44 >'+8$1$A4@B$6=6>"!#>###C$1$'+D-&'-E,(8?@44>'+8$
!
! !
10"
Document""Copyright"2015"Simblee"Corporation""Jan,"11"2016" "
if(currentstate != prevstate){
checkstate();
prevstate = currentstate;
}
}
void readswitches(){
if(digitalRead(switchon) == HIGH)
currentstate = 1;
if(digitalRead(switchoff) == HIGH)
currentstate = 0;
}
void checkstate(){
if(currentstate == 1){
digitalWrite(light, HIGH);
Serial.println("Light is ON");
}
else{
digitalWrite(light, LOW);
Serial.println("Light is OFF");
}
}
$
97(4)$/&@R-:7+3F:$+)$-:4$,R4-':$&?+W4B$ $
!>" h&7(&?@4,$&74$'74&-4G$-+$,-+74$+37$W&@34,>$.474$/4$':++,4$/:(':$?3--+D$(,$+D$/:(': $V (D $& DG $& @, +$/:&-$
V(D$-:4$PMK$(,$'+DD4'-4G$-+>$2-&-4,$&74$&@,+$'74&-4G$-+$R44V$-7&'R$+)$/:&-$,-&-4$-:4$PMK$(,$(DX$`L$+7$`NN>$
5>" `37$setup()$)3D'-(+D$73D ,$+D '4X$&D G$(D(-(& @(i4,$&$)4/ $-: (DF,>$N(7,-$/4$,4-$-:4$V(D$-:&-$+37$PMK$(,$+D$-+$&D$
+3-V3-X$&DG$/4$,4-$-:4$V(D,$+37$?3--+D,$&74$'+DD4'-4G$-+$&,$(DV3-,>$Z4$-:4D$?4F(D$&$247(&@$V+7-$/:(':$
/4$'&D$3,4$-+$8+D(-+7$&DG$G4?3F$+37$'+G4$W(&$-:4$247(&@$H+D(-+7$+)$-:4$;7G3(D+$JKM>$ $
b>" A:4$loop()$)3D '-(+ D$73 D, $'+D -(D3 +3 ,@0>$. 474 $/4 $73D $(D-+$+ 37$)(7,-$'74 &-4 G$)3D '-(+D$'&@@4G$read sw itches ()>$
;,$-:4$D&84$(8V@(4,X$/4$3,4$-:(,$-+$':4'R$()$-:4$,/(-':4,$:&W4$?44D$V74,,4G>$A:4$D4d-$@(D4$(,$&D$()$
,-&-484D-X$/:474$/4$'+8 V&74$currentstate$W,$-:4$prevstate>$J)$currentstate$(,$L`A$4 S 3 &@$- + $prevstateX$
-:4D$/4$4D -47$-:4 $()$,-&-484D-$&DG$?4F(D$-:4$D4d-$'74&-4G$)3D'-(+D$'&@@4G$checkstate()>$;)-47$
checkstate()$(,$'+8V@4-4GX$/ 4 $/ 7 (-4 $-: 4 $W& @3 4$(D $cu rrentstate$(D-+ $prevstate>$A:(,$/ (@@$8 & R4 $currentstate+
&DG$prevstate$-:4$,&84$W&@34>$A:(,$&@@+/ ,$-: 4$()$,-&-48 4 D-$-+$? 4$,R(V V4 G$?4 '& 3,4 $-:4$&7F384D-$(,$D+-$
-734>$ $
=>" readswitches()$[$Z4$:&W4$5$?3--+D,$'&@@4G$switchon$&DG$switchoff>$A:(,$)3 D '- (+D $' :4 ' R,$-+ $,4 4 $()$4(-: 4 7$
?3--+D$:&,$?44D$V74,,4G>$J)$switchon$(,$V74,,4G X$-: 4 D $/ 4 $': & D F 4$cu rrentstate$-+$!$T8 4& D(DF $`L U>$J)$
switchoff$(,$V74, , 4G X$-: 4 D $ /4$':&DF4$currentstate$-+$#$T84&D (DF$` NN U>$
<>" checkstate()$[$ J) $-: 4 74 $: & ,$? 4 4 D $&$' : & D F4 $(D $, -& -4 X$-: 4 D $/4$3,4$-: (,$)3D'-(+D$- + $': 4 ' R$/:&-$,-&- 4$/4$&74$
(D>$J)$+37$currentstate$(,$! X$/ 4 $/(@@$-:4D$-37 D$+ D $- :4 $P M K X$&D G $& @,+ $V 7(D - $+3 - $-: & -$-: 4 $^ P(F : -$(, $` L _ $+ D $-:4$
,47(&@$8+D(-+7>$J)$+37$currentstate$(,$#X$/4$/(@@$-3 7D $`NN$-:4$PM K X$& D G $V 7(D -$+ 3 -$- :& -$- : 4$^ P (F: - $(,$`NN_$+D$
-:4$,47(&@$8+D(-+ 7>$
$
$
$
=$
<$
!$
5$
b$
=$
<$
!"#!$%&' ()( '$* +& , -$./0$1$23(-4$56#$1$.478+,&$94&':$1$*; $1 $6#5<= $
///>,(8?@44 >'+8$1$A4@B$6=6>"!#>###C$1$'+D-&'-E,(8?@44>'+8$
!
! !
11"
Document""Copyright"2015"Simblee"Corporation""Jan,"11"2016" "
Mobile'Control'
A+$'+D-7+@$-:4$@(F:-$W(&$8+?(@4$G4W('4X$/4$/(@@$D+/$(D-7+G3'4$2(8?@44N+7H+?(@4$(D-+$-:4$,R4-':>$Z4$/(@@$F4D47&-4$
+D4$,/(-':$-+$-37D$+D$&DG$+))$-:4$PMK>$;,$&D$(DG('&-+7$+D$-:4$,'744DX$/4$/(@@$G7&/$&$@&?4@4G$,S3&74$-:&-$':&DF4,$
'+@+7,$&DG$-4d-$/:4D$-:4$PMK$(,$+D$W,$+))>$ $
$
$
$
$
$
$
$
Md&8V@4$,R4-':$?4@+/B$ $
#include <SimbleeForMobile.h>
//CONSTANTS
int light = 3; //green led is on GPIO2
int switchon = 5; //on switch is on GPIO5
int switchoff = 6; //off switch is on GPIO6
//STATE
int prevstate = 0;
int currentstate = 0; //0=OFF 1=ON
//SimbleeForMobile Objects
uint8_t mobileswitch, mobilelight, mobiletext;
void setup() {
pinMode(light, OUTPUT); //set light as output
pinMode(switchon, INPUT); //set switchon as input
pinMode(switchoff, INPUT); //set switchoff as input
Serial.begin(9600);
Serial.println("Light Demo Initiated");
SimbleeForMobile.advertisementData = "Light";
SimbleeForMobile.begin();
}
void loop() {
readswitches(); //check status of switches
if(currentstate != prevstate){
checkstate();
prevstate = currentstate;
}
if(SimbleeForMobile.updatable){
SimbleeForMobile.updateColor(mobilelight, currentstate ? GREEN : BLACK);
!$
5$
b$
c$93--+D$;$(,$%74,,4G$
`O$
c$2/(-':$(,$V74,,4G$
-+$+D$,-&-4$
c$93--+ D$9$(,$%74,,4G$
`O$
c$2/(-':$(,$V74,,4G$
-+$+))$,-&-4$
2/(-':$
A4d-$
O4'-&DF @4$
!"#!$%&' ()( '$* +& , -$./0$1$23(-4$56#$1$.478+,&$94&':$1$*; $1 $6#5<= $
///>,(8?@44 >'+8$1$A4@B$6=6>"!#>###C$1$'+D-&'-E,(8?@44>'+8$
!
! !
12"
Document""Copyright"2015"Simblee"Corporation""Jan,"11"2016" "
SimbleeForMobile.updateValue(mobileswitch, currentstate);
SimbleeForMobile.updateText(mobiletext, currentstate ? "ON" : "OFF");
SimbleeForMobile.updateColor(mobiletext, currentstate ? BLACK : WHITE);
SimbleeForMobile.updateX(mobiletext, currentstate ? 115 : 100);
}
SimbleeForMobile.process();
}
void ui(){
SimbleeForMobile.beginScreen();
mobilelight = SimbleeForMobile.drawRect(30,80,260,260,BLACK);
mobileswitch = SimbleeForMobile.drawSwitch(135,380);
mobiletext = SimbleeForMobile.drawText(100,180,"OFF",WHITE,60);
SimbleeForMobile.setEvents(mobileswitch, EVENT_PRESS);
SimbleeForMobile.endScreen();
}
void ui_event(event_t &event){
if(event.id == mobileswitch){
currentstate = !currentstate;
}
}
void readswitches(){
if(digitalRead(switchon) == HIGH){
currentstate = 1;
}
if(digitalRead(switchoff) == HIGH){
currentstate = 0;
}
}
void checkstate(){
if(currentstate == 1){
digitalWrite(light, HIGH);
Serial.println("Light is ON");
}
else{
digitalWrite(light, LOW);
Serial.println("Light is OFF");
}
}
void SimbleeForMobile_onConnect(){
Serial.println("Mobile connected");
}
void SimbleeForMobile_onDisconnect(){
Serial.println("Mobile disconnected");
}
$
P4-a,$F+$+W47$-:4$&GG4G$'+8V+D4D-,$)7+8$2(8?@44N+7H+?(@4$(D$-:4$&?+W4$,R4-':B$ $
!>" .474$/4$(D'@3G4$-:4$:4&G47$)(@4$)+7$2(8?@44N+7H+?(@4>$A:(,$(,$D44G4G$-+$3,4$)3D'-(+D,$-:&-$?4@+DF$-+$-:4$
2(8?@44N+7H+?(@4$'@&,,>$
5>" A:(,$(,$/:474$/4$(D(-(&@(i4$4&':$+?j4'-$/4$/(@@$?4$3,(DF$+D$+37$2(8?@44N+7H+?(@4$(D-47)&'4>$N(7,-$/4$
'74&-4$mobileswitchX$-+$&'-$&,$+37$,/(-' : $(D$-:4$(D-4 7) & ' 4 >$Z4$-:4D $: & W 4 $mobilelightX$/:(':$/ (@@$? 4 $& $
G7&/D$74'-&DF@4$-:&-$':&DF4,$'+@+7$/:4D$-:4$@(F:-$(,$+D$+7$+))>$Z4$/(@@$&@,+$:&W4$mobiletext$-:&-$,&0,$+D $
+7$+))$G4V4DG(DF$+D$-:4$,-&-4$&,$/4@@>$
=$
<$
"$
Q$
!$
5$
!"#!$%&' ()( '$* +& , -$./0$1$23(-4$56#$1$.478+,&$94&':$1$*; $1 $6#5<= $
///>,(8?@44 >'+8$1$A4@B$6=6>"!#>###C$1$'+D-&'-E,(8?@44>'+8$
!
! !
13"
Document""Copyright"2015"Simblee"Corporation""Jan,"11"2016" "
b>" JD$+37$setup ()$)3D '-(+D X$/4 $&GG $+3 7$'3 ,-+8(i4G$D&8 4$)+7$-: 4$&G W4 7-(,48 4 D-$& ,$^P(F :-_>$A :4 D$/ 4$? 4F (D$
2(8?@44N+7H+?(@4>$
=>" JD$+37$lo o p ()$)3D'-(+DX$/4aW4$&G G 4G $-:4$& ?(@(-0$-+ $3VG&-4$-:4$2(8?@44N+7H+?(@4$(D-47)&'4$3,(DF$+37$
3VG&-4$)3D'-(+D,>$94)+74$/4$3VG&-4$&D0$+?j4'-,X$/4$/+3@G$D44G$-+$':4'R$&$)@&F$'&@@4G$
SimbleeForMobile.updatable()$-+$8&R4$,374$/ 4$'&D $V7+ '44 G>$J)$-:4$)@&F $(,$-734X$/4 $'&D $3VG &-4 $+3 7$
74'-&DF@4$T+37$@(F: -$(DG('&-+7UX$,/(-':X$&DG$-4d->$SimbleeForMobile.process()$(,$-:4D$'&@@4G $& -$-: 4 $4 D G $+) $
+37$@++V$-+$4D&?@4$-:4$V7+'4,,4,$2(8?@44N+7H+?(@4$3,4,>$
<>" void9ui()$(,$/:474$/4$? 4 F (D $-+ $G 7& / $+ 3 7$& '- 3& @@0 $+ ?j4 ' -, $+D - +$- : 4$, '7 44 D >$Z4$,-&7-$+) )$? 0$
SimbleeForMobile.beginScreen()X$/:(':$G4)& 3 @-, $-:4$,'744 D $(D -+$V+7-7&( -$8+G4X$/ ( -: $& $/:(-4$
?&'RF7+3DG>$Z4$-:4D$G7& / $+ 3 7$74 '-& D F@4 X$,/ (-' : $&D G $-4d ->$N +7 $+3 7$,/(-':X$/4$/ (@@$: &W 4$& D $4W 4D -$, 4-$
/:4D$-:4$,/(-':$(,$V74,,4G>$Z4$-:4D$4DG$+37$,'744D$G7&/(DF$/(-:$SimbleeForMobile.endScreen()>$
">" void9ui_event()9(,$'&@@4G$/:4 D$& D $4 W4 D -$+ ' '3 7, >$` 3 7$+ D @0$4 W 4D - $(,$/ : 4 D $-: 4 $,/(-':$(,$V74 ,, 4G >$2 (D '4 $-: 4$
,/(-':$&@/&0,$,-&7-,$+))$(D$-:4$'+774'-$V+,(-(+D$(D$74@&-(+D$-+$-:4$,-&-4$+)$-:4$PMKX$/4$,(8V@0$(DW47,4$-:4$
,-&-4$/:4D$-:4$,/(-':$(,$V74,,4G>$
Q>" A:4$@&,-$&GG(-(+D$)7+8$+37$2(8 ?@44 N+ 7H + ?(@4$&V V@('& -(+D$(,$-+$,(8 V@0$V 7(D-$+3 -$+D -+$-: 4$,47(&@$8 +D (-+7$()$
2(8?@44N+7H+?(@4$(,$'+DD4'-4G$+7$G(,'+DD4'-4G>$
$
$
$
$
$
$
$
$
$
$
$
$
$
$
b$
=$
<$
"$
Q$
!"#!$%&' ()( '$* +& , -$./0$1$23(-4$56#$1$.478+,&$94&':$1$*; $1 $6#5<= $
///>,(8?@44 >'+8$1$A4@B$6=6>"!#>###C$1$'+D-&'-E,(8?@44>'+8$
!
! !
14"
Document""Copyright"2015"Simblee"Corporation""Jan,"11"2016" "
Web'control'
L+/$-:&-$/4$:&W4$?+-:$@+'&@$&DG$8+?(@4$'+D-7+@$+)$-:4$PMKX$/4$'&D$8+W4$+D-+$&GG(DF$/4?$)3D'-(+D&@(-0>$A:4$
F+&@$+)$/4?$)3D'-(+D&@(-0$/+3@G$?4$-:4$&?(@(-0$-+$W(4/X$':&DF4X$&DG$':4'R$-:4$,-&-4$+)$-:4$PMK>$A:474$&74$83@-(V@4$
)&'4-,$-:&-$D44G $-+$? 4$'+ D)(F 374 G B$
!>" ;7G3(D+$2R4-':$+D$2(8?@44$.&7G/&74$
5>" *+D)(F37&-(+D$+)$2(8?@44*@+3G$3,(DF$2(8?@44*@+3G$K&,:?+&7G$
b>" .AHPX$\&W&2'7(V-X$&DG$%.%$'+G4 $) + 7$/4?V& F4 $
.474$(,$&$F4D47&@$@&0+3-$+)$-:4$)3D'-(+D&@(-0B$ $
$
$
$
$
$
$
$
$
$
$
$
$
$
$
$
$
$
$
$
A.JLg$
H`9JPM$
ZM9$
93--+D$;$(,$V74,,4G$
93--+D$9$(,$V74,,4G$
2/(-':$V74,,4G$+D$
2/(-':$V74,,4G$+))$
P(F:-$`D$'@('R4G$
P(F:-$`))$'@('R4G$
!"#!$%&' ()( '$* +& , -$./0$1$23(-4$56#$1$.478+,&$94&':$1$*; $1 $6#5<= $
///>,(8?@44 >'+8$1$A4@B$6=6>"!#>###C$1$'+D-&'-E,(8?@44>'+8$
!
! !
15"
Document""Copyright"2015"Simblee"Corporation""Jan,"11"2016" "
Web'control'–'Arduino'Sketch'
P4-a,$,-&7-$+))$/(-:$-:4$;7G3(D+$,R4-':>$A+$G+$-:(,X$/4$/(@@$D+/$&VV@0$2(8?@44*@+3G$-+$-:4$,R4-':>$2(8?@44* @+3G $
&@,+$3,4,$2(8?@44N+7H+?(@4*@(4D-$&,$/4@@X$,+$/4$/(@@$(D'+7V+7&-4$-:&-$(D-+$+37$&VV@('&-(+D>$ $
#include <SimbleeForMobile.h>
#include <SimbleeForMobileClient.h>
#include <SimbleeCloud.h>
//SimbleeCloud ESNs
unsigned int userID = 0xd448c367;
unsigned int destESN = 0x00001010;
SimbleeForMobileClient client;
SimbleeCloud cloud(&client);
//CONSTANTS
int light = 3; //green led is on GPIO2
int switchon = 5; //on switch is on GPIO5
int switchoff = 6; //off switch is on GPIO6
//STATE
int prevstate = 0;
int currentstate = 0; //0=OFF 1=ON
//SimbleeForMobile Objects
uint8_t mobileswitch, mobilelight, mobiletext;
void setup() {
pinMode(light, OUTPUT); //set light as output
pinMode(switchon, INPUT); //set switchon as input
pinMode(switchoff, INPUT); //set switchoff as input
Serial.begin(9600);
Serial.println("Light Demo Initiated");
Serial.print("The ESN of my light is: 0x");
Serial.println(cloud.myESN,HEX);
cloud.userID = userID;
SimbleeForMobile.advertisementData = "Light";
SimbleeForMobile.begin();
}
void loop() {
readswitches(); //check status of switches
if(currentstate != prevstate){
checkstate();
prevstate = currentstate;
}
if(SimbleeForMobile.updatable){
SimbleeForMobile.updateColor(mobilelight, currentstate ? GREEN : BLACK);
SimbleeForMobile.updateValue(mobileswitch, currentstate);
SimbleeForMobile.updateText(mobiletext, currentstate ? "ON" : "OFF");
SimbleeForMobile.updateColor(mobiletext, currentstate ? BLACK : WHITE);
SimbleeForMobile.updateX(mobiletext, currentstate ? 115 : 100);
}
SimbleeForMobile.process();
cloud.process();
}
void ui(){
if(cloud.connect())
!$
5$
b$
=$
<$
!"#!$%&' ()( '$* +& , -$./0$1$23(-4$56#$1$.478+,&$94&':$1$*; $1 $6#5<= $
///>,(8?@44 >'+8$1$A4@B$6=6>"!#>###C$1$'+D-&'-E,(8?@44>'+8$
!
! !
16"
Document""Copyright"2015"Simblee"Corporation""Jan,"11"2016" "
Serial.println("Cloud connected");
else
Serial.println("Cloud disconnected");
SimbleeForMobile.beginScreen();
mobilelight = SimbleeForMobile.drawRect(30,80,260,260,BLACK);
mobileswitch = SimbleeForMobile.drawSwitch(135,380);
mobiletext = SimbleeForMobile.drawText(100,180,"OFF",WHITE,60);
SimbleeForMobile.setEvents(mobileswitch, EVENT_PRESS);
SimbleeForMobile.endScreen();
}
void ui_event(event_t &event){
if(event.id == mobileswitch){
currentstate = !currentstate;
}
}
void SimbleeCloud_onReceive(unsigned int originESN, const unsigned char *payload, int len){
Serial.println("Cloud Switch");
if(payload[0] == '1'){
currentstate = 1;
}
else if(payload[0] == '0'){
currentstate = 0;
}
else{
if(currentstate == 1)
cloud.send(destESN,"1",1);
else
cloud.send(destESN,"0",1);
}
}
void readswitches(){
if(digitalRead(switchon) == HIGH){
currentstate = 1;
}
if(digitalRead(switchoff) == HIGH){
currentstate = 0;
}
}
void checkstate(){
if(currentstate == 1){
digitalWrite(light, HIGH);
if(cloud.active()){
cloud.send(destESN, "1", 1);
Serial.println("SENT");
}
Serial.println("Light is ON");
}
else{
digitalWrite(light, LOW);
if(cloud.active()){
cloud.send(destESN, "0", 1);
Serial.println("SENT");
}
Serial.println("Light is OFF");
}
}
void SimbleeForMobile_onConnect(){
"$
Q$
!"#!$%&' ()( '$* +& , -$./0$1$23(-4$56#$1$.478+,&$94&':$1$*; $1 $6#5<= $
///>,(8?@44 >'+8$1$A4@B$6=6>"!#>###C$1$'+D-&'-E,(8?@44>'+8$
!
! !
17"
Document""Copyright"2015"Simblee"Corporation""Jan,"11"2016" "
Serial.println("Mobile connected");
}
void SimbleeForMobile_onDisconnect(){
Serial.println("Mobile disconnected");
Serial.println("Cloud disconnected");
}
$
P4-a,$-&R4$&$@++R$&-$/:&-$/&,$&GG4G$-+$4D&?@4$*@+3G$'+DD4'-(W(-0B$ $
!>" \3,-$@(R4$(D$-:4$V74W(+3 ,$& GG (-(+D X$/4$D 44 G$-+ $(D'@3G 4$-: 4$:4 &G 47$)(@4, $)+7$?+ -:$2(8?@44*@+3G $&D G$
2(8?@44N+7H+?(@4*@(4D->$ $
5>" A:(,$(,$/:474$/4$&,,(FD$4&':$M2L$-+$&$W&7(&?@4>$userID$(,$&D $M 2L $-:&-$(,$&@74&G0$V74'+D)(F374G$-:7+3F:$
+37$2(8?@44*@+3G$G&,:?+&7G$/:(':$/4$/(@@$F+$+W47$(D$-:4$D4d-$,4'-(+D>$Z4$/(@@$&,,(FD$destESN$&,$
#d####!#!#>$Z4$-:4D$,4-$3V$+37$R40/+7G$cloud$-+$4D'+ 8 V& ,,$?+ -:$2(8 ? @44* @+3 G$&D G $
2(8?@44N+7H+?(@4*@(4D-$)3D'-(+D&@(-0>$ $
b>" ;D+-:47$M2L$-+$-&R4$D+-4$+)$(,$-:4$M2L$+)$+37$2(8?@44$8+G3@4>$cloud.myESN$,-+74,$-:4$M2L$+)$0+37$
2(8?@44$8+G3@4$/:(':$/4$-:4D$V7(D-$+3-$W(&$-:4$247(&@$H+D(-+7>$A:4$D4d-$@(D4$-:4D$'+D)(F374,$+37$
cloud.userID$/(-:$-:4$3,47JK$/4$(D(-(&@(i4G$(D$,-4V$5>$
=>" Cloud.process()$(,$-:4D$'&@@4GX$,(8(@&7$-+$SimbleeForMobile.process()$-+$4D&?@4$-:4$V7+ '4,, 4,$-:& -$
2(8?@44*@+3G$3,4,>$ $
<>" A+$8&R4$,374$-:&-$+37$,0,-48$(,$'+DD4'-4G$-+$2(8?@44*@+3GX$/4$G+$&$S3('R$':4'R$3,(DF$cloud.connect()>$ $
">" SimbleeCloud_onReceive()$(,$'&@@4G$/: 4D 4 W 47$/4$74'4(W4 $G &- &$) 7+ 8 $2 (8?@44*@+3G>$A+$:4@V$/(-:$
G4?3FF(DFX$/4$V7(D-$+3-$^*@+3G$2/(-':_$+D$+37$247(&@$H+D(-+7$/:4D4W47$/4$74'4(W4$G&-&>$K&-&$(,$,-+74G$
(D$&D$&77& 0$' &@@4 G $payload>$2(D' 4$/ 4 $& 74$+ D @0$' : 4' R(D F $()$&$,/ (- ': $(,$+ D $+7$+ ))X$/ 4 $+ D @0$3 ,4 $+D 4 $?0 -4 $
Tpayload[0]U$&DG$':&DF4$(-$)7+8 $!$+7$#>$N7+8$-:(,$G&-&X$/4$':&DF4$-:4$currentstate$+)$-:4$PMK$
'+774,V+DG(DF@0>$L+-('4X$/4$&@,+$:&W4$&D$4@,4$,-&-484D->$A:(,$4@,4$,-&-484D-$(,$3,4G$-+$8&R4$,374$-:&-$
-:4$,47W47$/4? V& F4 $(,$3VG &-4G $-+$G(,V @&0$-: 4$'+ 774'-$,-& -4$+D $,-&7-3 V>$N7+ 8 $-:4 $/4 ?V &F4 X$/4$,4DG$&$^5_$
-+$':4'R$)+7$,-&-4>$
Q>" Z4$8&R4$&$)4/$8+G()('&-(+D,$-+$+37$checkstate()$)3D'-(+D$-+$,4 DG $-+$2(8 ? @44 *@+ 3G $-:4 $,-&-4 $+)$-:4 $
@(F:->$L+- 4 $-: &- $/ 4 $': 4 ' R$-+ $8&R4$,374 $' +D D 4 '- (+ D $-+ $2(8?@44*@+ 3 G $(,$& ' -(W4 X$? 4 )+ 74 $/ 4 $,4 D G $G& - &$- +$
2(8?@44*@+3G>$
$
$
$
$
$
$
$
!$
5$
b$
=$
<$
"$
Q$
!"#!$%&' ()( '$* +& , -$./0$1$23(-4$56#$1$.478+,&$94&':$1$*; $1 $6#5<= $
///>,(8?@44 >'+8$1$A4@B$6=6>"!#>###C$1$'+D-&'-E,(8?@44>'+8$
!
! !
18"
Document""Copyright"2015"Simblee"Corporation""Jan,"11"2016" "
Web'Control'–'SimbleeCloud'Dashboard'
L+/$/4$/(@@$'+D)(F374$+37$2(8?@44*@+3G$K&,:?+&7G>$;)-47$@+FF(DF$(DX$@4-a,$W(,(-$-:4$H+G3@4,$V&F4$-+$&GG$+37$
2(8?@44$8+G3@4$-+$-:4$M2L$@(,->$*@('R$+D$L4/$-+$&GG$&$D4/$4D-70>$ $
$
Z4$/(@@$D&84$-:4$8+G3@4$^P(F:-_$&DG$4D-47$-:4$M2L$/4$74'4(W4G$)7+8$-:4$'@+3G>80M2L$+D$-:4$247(&@$H+D(-+7>$
*@('R$+D$*74&-4$/:4D$)(D(,:4G>$
$
L4d-X$/4$/(@@$&GG$+37$G4,-M2L$(D-+$+37$%++@,$@(,->$A:4$G4,-M2L$/4$':+,4$(D$-:4$;7G3(D+$,R4-':$/&,$#d####!#!#>$
P4-a,$&GG$-:&-$-+$+37$%++@$@(,-B$
$
*+D)(78$?0$'@('R$+D$*74&-4$&)-47$0+3$4D-47$-:4$V&7&84-47,>$
!"#!$%&' ()( '$* +& , -$./0$1$23(-4$56#$1$.478+,&$94&':$1$*; $1 $6#5<= $
///>,(8?@44 >'+8$1$A4@B$6=6>"!#>###C$1$'+D-&'-E,(8?@44>'+8$
!
! !
19"
Document""Copyright"2015"Simblee"Corporation""Jan,"11"2016" "
$
Z4aW4$D+/$'+D)(F374G$+37$2(8?@44*@+3G$K&,:?+&7G>$
Web'Control'–'HTML,'PHP,'JavaScript'for'Webpage'
P4-a,$'74&-4$-:4$/4?V&F4$-:&-$/(@@$'+D-7+@$+37$PMK$W(&$2(8?@44*@+3Gk$N(7,-$/4$D44G$-+$F7&?$2(8?@44*@+3G>j,$)7+8$
-:4$)+@@+/(DF$@(DRB$
https://service.simbleecloud.com/demo.zip+
!
]+3$/(@@$D44G$-+$(D'@3G4$-:(,$)(@4$/(-:$-:4$.AHP$)(@4$/4$/(@@$?3(@G$&,$(-$'+D-&(D,$V74/7(--4D$,'7(V-,$-:&-$/4$'&D$3,4$
(D$+37$4d& 8V@4>$]+3 $'& D $': + + ,4$-+ $.+,-$-:4,4$)(@4,$@+'&@@0$T()$0+37$&?@4$-+U$+7$748+-4@0$3,(DF$&$748+-4$,47W47>$N+7$
-:(,$4d&8V@4X$/ 4aW4 $,4-$3V $&$,&D G? +d $,47W4 7$/: 474 $/4 $'&D $,-+74 $&DG $&'' 4,,$-: 4,4$)(@4,>$.474$(,$:+ / $+3 7$
/4?V&F4$/(@@$@++R$/(-:$-:4$@(F:-$+))B$
$
$
$
$
$
$
  • Page 1 1
  • Page 2 2
  • Page 3 3
  • Page 4 4
  • Page 5 5
  • Page 6 6
  • Page 7 7
  • Page 8 8
  • Page 9 9
  • Page 10 10
  • Page 11 11
  • Page 12 12
  • Page 13 13
  • Page 14 14
  • Page 15 15
  • Page 16 16
  • Page 17 17
  • Page 18 18
  • Page 19 19
  • Page 20 20
  • Page 21 21
  • Page 22 22
  • Page 23 23

AMS RFD77101 User guide

Type
User guide

Ask a question and I''ll find the answer in the document

Finding information in a document is now easier with AI