Edit comments for clarity (#478)

* Edit comments for clarity

I was a little confused reading what this sketch did the first time so I attempted to edit these for clarity.

* code edits as well

Grammar fixes for some parts of the code as well
This commit is contained in:
Joey Babcock 2017-07-02 08:54:20 -07:00 committed by Me No Dev
parent 1be6a5c361
commit ad2adce65e

View File

@ -12,15 +12,15 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
// Sketch shows how SimpleBLE to advertise the name of the device and change it on button press // Sketch shows how to use SimpleBLE to advertise the name of the device and change it on the press of a button
// Usefull if you want to advertise some short message // Useful if you want to advertise some sort of message
// Button is attached between GPIO 0 and GND and modes are switched with each press // Button is attached between GPIO 0 and GND, and the device name changes each time the button is pressed
#include "SimpleBLE.h" #include "SimpleBLE.h"
SimpleBLE ble; SimpleBLE ble;
void onButton(){ void onButton(){
String out = "BLE32 at: "; String out = "BLE32 name: ";
out += String(millis() / 1000); out += String(millis() / 1000);
Serial.println(out); Serial.println(out);
ble.begin(out); ble.begin(out);
@ -33,7 +33,7 @@ void setup() {
Serial.print("ESP32 SDK: "); Serial.print("ESP32 SDK: ");
Serial.println(ESP.getSdkVersion()); Serial.println(ESP.getSdkVersion());
ble.begin("ESP32 SimpleBLE"); ble.begin("ESP32 SimpleBLE");
Serial.println("Press the button to change the device name"); Serial.println("Press the button to change the device's name");
} }
void loop() { void loop() {