diff --git a/README.md b/README.md index bf48f5c..32ba1f3 100644 --- a/README.md +++ b/README.md @@ -133,9 +133,9 @@ board.ledmatrix.print("H o l a m u n d o!"); ``` The library allows you to control the scroll speed that is used to display the text on the led matrix. -* printInLandscape +* printNumber ```c++ -board.ledmatrix.printInLandscape(99); +board.ledmatrix.printNumber(99); ``` ## Libraries used in this project diff --git a/examples/01.potentiometer/scaleTo/scaleTo.ino b/examples/01.potentiometer/scaleTo/scaleTo.ino index 454bdb7..df2c3be 100644 --- a/examples/01.potentiometer/scaleTo/scaleTo.ino +++ b/examples/01.potentiometer/scaleTo/scaleTo.ino @@ -8,5 +8,5 @@ void setup() { void loop() { int potValue = board.potentiometer.scaleTo(0, 99); - board.ledmatrix.printInLandscape(potValue); + board.ledmatrix.printNumber(potValue); } diff --git a/examples/02.ldr/scaleTo/scaleTo.ino b/examples/02.ldr/scaleTo/scaleTo.ino index 8bd1e41..0d8e4fb 100644 --- a/examples/02.ldr/scaleTo/scaleTo.ino +++ b/examples/02.ldr/scaleTo/scaleTo.ino @@ -8,5 +8,5 @@ void setup() { void loop() { int ldrValue = board.ldr.scaleTo(0, 99); - board.ledmatrix.printInLandscape(ldrValue); + board.ledmatrix.printNumber(ldrValue); } diff --git a/examples/04.rgb/setIntensity/setIntensity.ino b/examples/04.rgb/setIntensity/setIntensity.ino index 31f76e6..7f12c72 100644 --- a/examples/04.rgb/setIntensity/setIntensity.ino +++ b/examples/04.rgb/setIntensity/setIntensity.ino @@ -9,5 +9,5 @@ void setup() { void loop() { int intensity = board.potentiometer.scaleTo(0, 99); board.rgb.setIntensity(intensity); - board.ledmatrix.printInLandscape(intensity); + board.ledmatrix.printNumber(intensity); } diff --git a/examples/05.ledmatrix/printInLandscape/printInLandscape.ino b/examples/05.ledmatrix/printNumber/printNumber.ino similarity index 75% rename from examples/05.ledmatrix/printInLandscape/printInLandscape.ino rename to examples/05.ledmatrix/printNumber/printNumber.ino index 91e44da..5690f68 100644 --- a/examples/05.ledmatrix/printInLandscape/printInLandscape.ino +++ b/examples/05.ledmatrix/printNumber/printNumber.ino @@ -8,5 +8,5 @@ void setup() { void loop() { int number = board.potentiometer.scaleTo(0, 99); - board.ledmatrix.printInLandscape(number); + board.ledmatrix.printNumber(number); } diff --git a/examples/06.servo/to/to.ino b/examples/06.servo/to/to.ino index 2f458fd..2bb72b0 100644 --- a/examples/06.servo/to/to.ino +++ b/examples/06.servo/to/to.ino @@ -8,6 +8,6 @@ void setup() { void loop() { int value = board.potentiometer.scaleTo(0, 180); - board.ledmatrix.printInLandscape(value); + board.ledmatrix.printNumber(value); board.servo[1].to(value); } diff --git a/examples/07.servos/robot_02/robot_02.ino b/examples/07.servos/robot_02/robot_02.ino index 2f48dfd..3a7b08c 100644 --- a/examples/07.servos/robot_02/robot_02.ino +++ b/examples/07.servos/robot_02/robot_02.ino @@ -10,7 +10,7 @@ void setup() { void loop() { int distance = board.ultrasound.pingCm(); - board.ledmatrix.printInLandscape(distance); + board.ledmatrix.printNumber(distance); if (distance < MAX_DISTANCE_FROM_OBSTACLE && distance !=0) { board.servos.stop(); diff --git a/examples/07.servos/robot_03/robot_03.ino b/examples/07.servos/robot_03/robot_03.ino index 815db13..605710d 100644 --- a/examples/07.servos/robot_03/robot_03.ino +++ b/examples/07.servos/robot_03/robot_03.ino @@ -13,7 +13,7 @@ void loop() { board.servos.setSpeed(speed); int distance = board.ultrasound.pingCm(); - board.ledmatrix.printInLandscape(distance); + board.ledmatrix.printNumber(distance); if (distance < MAX_DISTANCE_FROM_OBSTACLE && distance !=0) { board.servos.stop(); diff --git a/examples/09.ultrasound/pingCm/pingCm.ino b/examples/09.ultrasound/pingCm/pingCm.ino index a8936df..e80357b 100644 --- a/examples/09.ultrasound/pingCm/pingCm.ino +++ b/examples/09.ultrasound/pingCm/pingCm.ino @@ -8,7 +8,7 @@ void setup() { void loop() { int distance = board.ultrasound.pingCm(); - board.ledmatrix.printInLandscape(distance); + board.ledmatrix.printNumber(distance); board.bluetooth.println(distance); delay(10); } diff --git a/examples/11.dht/readHumidity_02/readHumidity_02.ino b/examples/11.dht/readHumidity_02/readHumidity_02.ino index d5d8af0..a289805 100644 --- a/examples/11.dht/readHumidity_02/readHumidity_02.ino +++ b/examples/11.dht/readHumidity_02/readHumidity_02.ino @@ -13,6 +13,6 @@ void loop() { board.ledmatrix.print("?"); } else { - board.ledmatrix.printInLandscape(humidity); + board.ledmatrix.printNumber(humidity); } } diff --git a/examples/11.dht/readTemperature_02/readTemperature_02.ino b/examples/11.dht/readTemperature_02/readTemperature_02.ino index 9a1cabd..9f44e60 100644 --- a/examples/11.dht/readTemperature_02/readTemperature_02.ino +++ b/examples/11.dht/readTemperature_02/readTemperature_02.ino @@ -13,6 +13,6 @@ void loop() { board.ledmatrix.print("?"); } else { - board.ledmatrix.printInLandscape(temperature); + board.ledmatrix.printNumber(temperature); } } diff --git a/experimental/ledmatrix_ldr_landscape/ledmatrix_ldr_landscape.ino b/experimental/ledmatrix_ldr_landscape/ledmatrix_ldr_landscape.ino index 1d27130..78dbbd8 100644 --- a/experimental/ledmatrix_ldr_landscape/ledmatrix_ldr_landscape.ino +++ b/experimental/ledmatrix_ldr_landscape/ledmatrix_ldr_landscape.ino @@ -9,5 +9,5 @@ void setup() { void loop() { int potValue = board.ldr.read(); int number = map(potValue, 0, 1022, 0, 99); - board.ledmatrix.printInLandscape(number); + board.ledmatrix.printNumber(number); } diff --git a/experimental/ledmatrix_potentiometer_landscape/ledmatrix_potentiometer_landscape.ino b/experimental/ledmatrix_potentiometer_landscape/ledmatrix_potentiometer_landscape.ino index 0fccd65..a3a45cf 100644 --- a/experimental/ledmatrix_potentiometer_landscape/ledmatrix_potentiometer_landscape.ino +++ b/experimental/ledmatrix_potentiometer_landscape/ledmatrix_potentiometer_landscape.ino @@ -9,5 +9,5 @@ void setup() { void loop() { int potValue = board.potentiometer.read(); int number = map(potValue, 0, 1022, 0, 99); - board.ledmatrix.printInLandscape(number); + board.ledmatrix.printNumber(number); } diff --git a/keywords.txt b/keywords.txt index 1e87a85..9314db3 100644 --- a/keywords.txt +++ b/keywords.txt @@ -6,7 +6,7 @@ # Datatypes (KEYWORD1) ####################################### -NanoPlayBoard KEYWORD1 +NanoPlayBoard KEYWORD1 ####################################### # Methods and Functions (KEYWORD2) @@ -19,8 +19,8 @@ playTone KEYWORD2 stopTone KEYWORD2 clear KEYWORD2 print KEYWORD2 -printInLandscape KEYWORD2 -setScrollSpeed KEYWORD2 +printNumber KEYWORD2 +setScrollSpeed KEYWORD2 setColor KEYWORD2 setIntensity KEYWORD2 on KEYWORD2 diff --git a/src/LedMatrix.cpp b/src/LedMatrix.cpp index babe962..be60619 100644 --- a/src/LedMatrix.cpp +++ b/src/LedMatrix.cpp @@ -103,7 +103,7 @@ void LedMatrix::clear() print(' '); } -void LedMatrix::printInLandscape(uint8_t number) +void LedMatrix::printNumber(uint8_t number) { byte pattern[5]; for(uint8_t i = 0; i < 5; i++) { diff --git a/src/LedMatrix.h b/src/LedMatrix.h index 39b3707..8d6e599 100644 --- a/src/LedMatrix.h +++ b/src/LedMatrix.h @@ -24,7 +24,7 @@ class LedMatrix void print(char message[]); void print(String message); void setScrollSpeed(uint8_t speed); - void printInLandscape(uint8_t number); + void printNumber(uint8_t number); protected: bool isPrintable(char symbol);