1212 any redistribution
1313*********************************************************************/
1414
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+ */
1825#include < Arduino.h>
1926#include < Adafruit_NeoPixel.h>
2027#include < Adafruit_GFX.h>
@@ -58,8 +65,11 @@ void setup()
5865{
5966 Serial.begin (115200 );
6067 Serial.println (F (" Adafruit Bluefruit NeoMatrix" ));
61- Serial.println (F (" ------------------------------------ " ));
68+ Serial.println (F (" ----------------------------" ));
6269
70+ Serial.println ();
71+ Serial.println (" Please connect using Bluefruit Connect LE application" );
72+
6373 // Config Neopixels Matrix
6474 matrix.begin ();
6575 matrix.setTextWrap (false );
@@ -69,6 +79,7 @@ void setup()
6979 // Init Bluefruit
7080 Bluefruit.begin ();
7181 Bluefruit.setName (" Bluefruit52" );
82+ Bluefruit.setConnectCallback (connect_callback);
7283
7384 // Configure and Start Device Information Service
7485 bledis.setManufacturer (" Adafruit Industries" );
@@ -99,6 +110,12 @@ void setupAdv(void)
99110 Bluefruit.ScanResponse .addName ();
100111}
101112
113+ void connect_callback (void )
114+ {
115+ Serial.println (" Connected ! Please select 'Uart' tab and send any characters" );
116+ }
117+
118+
102119void loop ()
103120{
104121 // Echo received data
0 commit comments