Skip to content

Commit

Permalink
run clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
fabianoriccardi committed Sep 11, 2022
1 parent 440d8de commit 4699eef
Show file tree
Hide file tree
Showing 24 changed files with 1,059 additions and 1,119 deletions.
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"editor.formatOnSave": false,
"editor.formatOnSave": true,
"editor.detectIndentation": true,
"editor.rulers": [
100
Expand Down
11 changes: 6 additions & 5 deletions examples/1_dimmable_light/1_dimmable_light.ino
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/**
/**
* Before uploading this sketch, check and modify the following variables
* accordingly to your hardware setup:
* - syncPin, the pin listening for AC zero cross signal
* - thyristorPin, the pin connected to the thyristor
*/
*/

#include <dimmable_light.h>

Expand All @@ -17,10 +17,11 @@ const int period = 50;

void setup() {
Serial.begin(115200);
while(!Serial);
while (!Serial)
;
Serial.println();
Serial.println("Dimmable Light for Arduino: first example");

Serial.print("Initializing DimmableLight library... ");
DimmableLight::setSyncPin(syncPin);
// VERY IMPORTANT: Call this method to activate the library
Expand All @@ -29,7 +30,7 @@ void setup() {
}

void loop() {
for(int i=0;i<256;i++){
for (int i = 0; i < 256; i++) {
light.setBrightness(i);
delay(period);
}
Expand Down
9 changes: 5 additions & 4 deletions examples/2_dimmable_lights/2_dimmable_lights.ino
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
/**
* An extension of the first example to demonstrate how easy is controlling multiple lights.
*/
*/
#include <dimmable_light.h>

const int syncPin = 13;
Expand All @@ -13,11 +13,12 @@ const int period = 1000;

void setup() {
Serial.begin(115200);
while(!Serial);
while (!Serial)
;
Serial.println();
Serial.println("Dimmable Light for Arduino: second example");
Serial.println();

Serial.print("Initializing the dimmable light class... ");
DimmableLight::setSyncPin(syncPin);
DimmableLight::begin();
Expand Down
Loading

0 comments on commit 4699eef

Please sign in to comment.