12
12
any redistribution
13
13
*********************************************************************/
14
14
15
- // This sketch is intended to be used with the NeoPixel control
16
- // surface in Adafruit's Bluefruit LE Connect mobile application.
17
-
15
+ /* How to run this sketch
16
+ * - Connect Neopixel FeatherWing and Load sketch to Bluefruit52
17
+ * - Connect using Bluefruit Connect LE app
18
+ * - Send character using BLEUART
19
+ * - Bluefruit will draw received character on Neopixel FeatherWing
20
+ *
21
+ * Note: due to the font is larger than 4x8 Neopixel Wing, you can
22
+ * only see part of the characters (but you got the idea).
23
+ * Run the sketch with larger Neopixel Matrix for complete demo
24
+ */
18
25
#include < Arduino.h>
19
26
#include < Adafruit_NeoPixel.h>
20
27
#include < Adafruit_GFX.h>
@@ -58,8 +65,11 @@ void setup()
58
65
{
59
66
Serial.begin (115200 );
60
67
Serial.println (F (" Adafruit Bluefruit NeoMatrix" ));
61
- Serial.println (F (" ------------------------------------ " ));
68
+ Serial.println (F (" ----------------------------" ));
62
69
70
+ Serial.println ();
71
+ Serial.println (" Please connect using Bluefruit Connect LE application" );
72
+
63
73
// Config Neopixels Matrix
64
74
matrix.begin ();
65
75
matrix.setTextWrap (false );
@@ -69,6 +79,7 @@ void setup()
69
79
// Init Bluefruit
70
80
Bluefruit.begin ();
71
81
Bluefruit.setName (" Bluefruit52" );
82
+ Bluefruit.setConnectCallback (connect_callback);
72
83
73
84
// Configure and Start Device Information Service
74
85
bledis.setManufacturer (" Adafruit Industries" );
@@ -99,6 +110,12 @@ void setupAdv(void)
99
110
Bluefruit.ScanResponse .addName ();
100
111
}
101
112
113
+ void connect_callback (void )
114
+ {
115
+ Serial.println (" Connected ! Please select 'Uart' tab and send any characters" );
116
+ }
117
+
118
+
102
119
void loop ()
103
120
{
104
121
// Echo received data
0 commit comments