Skip to content

Commit dcc5282

Browse files
author
microbuilder
committed
Minor cleanup
1 parent 89a0956 commit dcc5282

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

libraries/Bluefruit52Lib/examples/Peripheral/hid_camerashutter/hid_camerashutter.ino

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
/*
1616
* This sketch uses the HID Consumer Key API to send the Volume Down
1717
* key when PIN_SHUTTER is grounded. This will cause your mobile device
18-
* to capture a photo when you are in Camera App
18+
* to capture a photo when you are in the camera app
1919
*/
2020
#include <bluefruit.h>
2121

@@ -24,10 +24,10 @@ BLEHidAdafruit blehid;
2424

2525
#define PIN_SHUTTER 27
2626

27-
void setup()
27+
void setup()
2828
{
2929
pinMode(PIN_SHUTTER, INPUT_PULLUP);
30-
30+
3131
Serial.begin(115200);
3232

3333
Serial.println("Bluefruit52 HID Camera Shutter Example");
@@ -44,24 +44,24 @@ void setup()
4444
Bluefruit.begin();
4545
Bluefruit.setName("Bluefruit52");
4646

47-
// Configure and Start Device Information Service
47+
// Configure and start DIS (Device Information Service)
4848
bledis.setManufacturer("Adafruit Industries");
4949
bledis.setModel("Bluefruit Feather 52");
5050
bledis.begin();
5151

5252
/* Start BLE HID
5353
* Note: Apple requires BLE devices to have a min connection interval >= 20m
5454
* (The smaller the connection interval the faster we can send data).
55-
* However for HID and MIDI device, Apple will accept a min connection interval
56-
* as low as 11.25 ms. Therefore BLEHidAdafruit::begin() will try to set
57-
* the min and max connection interval to 11.25 ms and 15 ms respectively
55+
* However, for HID and MIDI device Apple will accept a min connection
56+
* interval as low as 11.25 ms. Therefore BLEHidAdafruit::begin() will try to
57+
* set the min and max connection interval to 11.25 ms and 15 ms respectively
5858
* for the best performance.
5959
*/
6060
blehid.begin();
6161

6262
/* Set connection interval (min, max) to your perferred value.
6363
* Note: It is already set by BLEHidAdafruit::begin() to 11.25ms - 15ms
64-
* min = 9*1.25=11.25 ms, max = 12*1.25= 15 ms
64+
* min = 9*1.25=11.25 ms, max = 12*1.25= 15 ms
6565
*/
6666
/* Bluefruit.setConnInterval(9, 12); */
6767

@@ -73,20 +73,20 @@ void setup()
7373
}
7474

7575
void setupAdv(void)
76-
{
76+
{
7777
Bluefruit.Advertising.addFlags(BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE);
7878
Bluefruit.Advertising.addTxPower();
7979

8080
Bluefruit.Advertising.addAppearance(BLE_APPEARANCE_HID_KEYBOARD);
81-
81+
8282
// Include BLE HID service
8383
Bluefruit.Advertising.addService(blehid);
8484

8585
// There is enough room for the dev name in the advertising packet
8686
Bluefruit.Advertising.addName();
8787
}
8888

89-
void loop()
89+
void loop()
9090
{
9191
// Make sure you are connected and bonded/paired
9292
if ( Bluefruit.connected() && Bluefruit.connPaired() )
@@ -96,14 +96,14 @@ void loop()
9696
{
9797
// Turn on red LED when we start sending data
9898
digitalWrite(LED_RED, 1);
99-
99+
100100
// Send the 'volume down' key press
101101
// Check BLEHidGerneric.h for list of defined consumer usage codes
102102
blehid.consumerKeyPress(HID_USAGE_CONSUMER_VOLUME_DECREMENT);
103103

104104
// Delay a bit between reports
105105
delay(10);
106-
106+
107107
// Send key release
108108
blehid.consumerKeyRelease();
109109

0 commit comments

Comments
 (0)