D F R o b o t _ E S P 3 2 _ W i F i B L E 
 
 
 
 勓^WNE S P 3 2 ;NB L E ^(uz^0[SNTeޏc4 *NNYv^SNǏn
NTv
gRI D ޏc
NTv݄Yr0Te؏~QN~TW i F i TB L E v:yO0
 
 
 
 [ň
 
 N}vU_ D F R o b o t _ E S P 3 2 _ W i F i B L E  v^\vQyR0R }c,gvU_-Nv l i b r a r i e s  vU_-N6qT͑e/TRA r d u i n o   I D E 6qT`\w0R[R(WF i l e - > E x a m p l e s - > D F R o b o t _ E S P 3 2 _ W i F i B L E N0
 
 
 
 (ul
 
 ^[OS:NwQ	gB L E v[a(uNNB L E STQeQpenc0
 
 # i n c l u d e  D F R o b o t _ E S P 3 2 _ B L E . h  
 
 D F R o b o t _ E S P 3 2 _ B L E 
 
 
 
 
 
 v o i d   s e t S e r v i c e u i n t 1 6 _ t   s e r 	
 
 nY
gRI D 0
 
 O
 
 b l e . s e t S e r v i c e 0 x d f b 0 	; 
 
 l0 x d f b 0 /fB l u n o vs e r i v e   I D @bN`OSNޏcB l u n o 0
 
 
 
 
 
 v o i d   s e t C h a r a c t e r i s t i c u i n t 1 6 _ t   c h a 	
 
 nhTyr_0
 
 O
 
 b l e . s e t C h a r a c t e r i s t i c 0 x d f b 1 	; 
 
 l0 x d f b 0 /fB l u n o vyr_SxыlC h a r a c t e r i s t i c   n u m b e r 	@bN`SNޏcB l u n o 0
 
 
 
 
 
 v o i d   s e t c o n n u m m a x u i n t 8 _ t   m a x 	
 
 neg:ghVvޏcpe
 
 O
 
 b l e . s e t c o n n u m m a x 2 	; 
 
 lُ̑n g'Yޏcpe:N2 0
 
 
 
 
 
 v o i d   s e t c o n n e c t n a m e 0 S t r i n g   s t r 	
 
 nYVYv
TyT*N|~\ޏc0
 
 O
 
 b l e . s e t c o n n e c t n a m e 0    B l u n o 0  	; 
 
 
 
 
 
 v o i d   i n i t 	
 
 /TRE S P 3 2   B L E Y0
 
 O
 
 b l e . i n i t 	; 
 
 
 
 
 
 v o i d   b e g i n 	
 
  _YЏL݄YrY
 
 O
 
 b l e . b e g i n 	; 
 
 
 
 
 
 S t r i n g   r e a d d a t a c h a r   *   b u f 	
 
 NB L E Spenc0
 
 O
 
 c h a r   d a t a N a m e   [ 1 5 ]   =   { ' \   0 ' } ; 
 
 S t r i n g   b l e d a t a   =   b l e . r e a d d a t a d a t a N a m e 	; 
 
 
 
 
 
 
 
 @ n (Wُ̑S!jWW
 
 @ n dk:yOnϑ'Y\v^d>ePNGrk0
 
 @ n   C o n n e c t i o n   a n d   D i a g r a m _ S K U _ D F R 0 4 7 8 	* 
 
 HrCg@b	gD F R o b o t 2 0 1 6 
 
 HrCg@b	gG N U   L e s s e r   G e n e r a l   P u b l i c   L i c e n s e   * 
 
 @ a u t h o r   C h o c h o 
 
 Hr,gV 1 . 0 
 
 eg2 0 1 7 - 2 - 1 0 
 
 
 
 
 
 
 
 
 
 Se
 
 
 
 D F R o b o t _ E S P 3 2 _ W i F i B L E 
 
 
 
 T h i s   l i b r a r y   i s   b a s e d   o n   E S P 3 2   m a s t e r   B L E   a p p l i c a t i o n s .   I t   c a n   c o n n e c t   4   s l a v e   d e v i c e s   a t   t h e   s a m e   t i m e ,   a n d   c a n   c o n n e c t   d i f f e r e n t   B l u e t o o t h   t h r o u g h   s e t t i n g   d i f f e r e n t   s e r v i c e   I D .   A t   t h e   s a m e   t i m e ,   a n   e x a m p l e   o f   c o m b i n i n g   W i F i   a n d   B L E   i s   a l s o   g i v e n . 
 
 
 
 I n s t a l l a t i o n 
 
 D o w n l o a d   t h e   d i r e c t o r y   " D F R o b o t _ E S P 3 2 _ W i F i B L E      a n d   m o v e   i t   i n t o   t h e   " l i b r a r i e s "   d i r e c t o r y   i n s i d e   y o u r   s k e t c h b o o k   d i r e c t o r y ,   t h e n   r e s t a r t   t h e   A r d u i n o   I D E .   Y o u   w i l l   t h e n   s e e   i t   l i s t e d   u n d e r   F i l e - > E x a m p l e s - > D F R o b o t _ E S P 3 2 _ W i F i B L E . 
 
 
 
 
 
 U s a g e 
 
 T h e   l i b r a r y   i s   i n s t a n t i a t e d   a s   a n   o b j e c t   w i t h   B L E   p r o v i d e d   t o   r e a d   a n d   w r i t e   d a t a   f r o m   B L E . 
 
 # i n c l u d e   " D F R o b o t _ E S P 3 2 _ B L E . h " 
 
 D F R o b o t _ E S P 3 2 _ B L E   b l e ; 
 
 
 
 
 
 v o i d   s e t S e r v i c e ( u i n t 1 6 _ t   s e r ) 
 
 S e t t i n g   u p   p e r i p h e r a l   s e r v i c e   I D . 
 
 E x a m p l e : 
 
 b l e . s e t S e r v i c e ( 0 x d f b 0 ) ; 
 
 0 x d f b 0   i s   t h e   s e r i v e   I D   f o r   B l u n o ,   s o   y o u   c a n   c o n n e c t   B l u n o . 
 
 
 
 
 
 v o i d   s e t C h a r a c t e r i s t i c ( u i n t 1 6 _ t   c h a ) 
 
 S e t t i n g   u p   p e r i p h e r a l   C h a r a c t e r i s t i c . 
 
 E x a m p l e : 
 
 b l e . s e t C h a r a c t e r i s t i c ( 0 x d f b 1 ) ; 
 
 0 x d f b 0   i s   t h e   C h a r a c t e r i s t i c   n u m b e r   f o r   B l u n o ,   s o   y o u   c a n   c o n n e c t   B l u n o . 
 
 
 
 
 
 v o i d   s e t c o n n u m m a x ( u i n t 8 _ t   m a x ) 
 
 S e t s   t h e   n u m b e r   o f   c o n n e c t i o n s   f r o m   t h e   m a c h i n e 
 
 E x a m p l e : 
 
 b l e . s e t c o n n u m m a x ( 2 ) ; 
 
 T h e   m a x   c o n n c e c t   n u m b e r   i s   2 . 
 
 
 
 
 
 v o i d   s e t c o n n e c t n a m e 0 ( S t r i n g   s t r ) 
 
 S e t t i n g   u p   p e r i p h e r a l ' s   n a m e , w h i c h   s e r i v e   w i l l   c o n n e c t e d . 
 
 E x a m p l e : 
 
 b l e . s e t c o n n e c t n a m e 0 ( " B l u n o 0 " ) ; 
 
 
 
 
 
 v o i d   i n i t ( ) 
 
 I n i t a l i z e   E S P 3 2   B L E   d e v i c e . 
 
 E x a m p l e : 
 
 b l e . i n i t ( ) ; 
 
 
 
 
 
 v o i d   b e g i n ( ) 
 
 S t a r t   r u n n i n g   B l u e t o o t h   d e v i c e 
 
 E x a m p l e : 
 
 b l e . b e g i n ( ) ; 
 
 
 
 
 
 S t r i n g   r e a d d a t a ( c h a r   * b u f ) 
 
 R e a d   d a t a   f r o m   B L E . 
 
 E x a m p l e : 
 
 c h a r   d a t a N a m e [ 1 5 ]   =   { ' \ 0 ' } ; 
 
 S t r i n g   b l e d a t a   =   b l e . r e a d d a t a ( d a t a N a m e ) ; 
 
 
 
 
 
 
 
 @ n   G e t   t h e   m o d u l e   h e r e 
 
 @ n   T h i s   e x a m p l e   S e t   t h e   v o l u m e   s i z e   a n d   p l a y   m u s i c   s n i p p e t . 
 
 @ n   C o n n e c t i o n   a n d   D i a g r a m _ S K U : _ D F R 0 4 7 8 )   * 
 
 C o p y r i g h t   D F R o b o t ,   2 0 1 6 
 
 C o p y r i g h t   G N U   L e s s e r   G e n e r a l   P u b l i c   L i c e n s e   * 
 
 @ a u t h o r   C h o c h o 
 
 v e r s i o n   V 1 . 0 
 
 d a t e   2 0 1 7 - 2 - 1 0 