Skip to content

Commit

Permalink
Merge pull request #68 from josejuansanchez/rev-0.2.1
Browse files Browse the repository at this point in the history
Fixed #67
  • Loading branch information
josejuansanchez authored Apr 14, 2017
2 parents 9ae8679 + 6c105ff commit ef3b7b1
Show file tree
Hide file tree
Showing 16 changed files with 19 additions and 19 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion examples/01.potentiometer/scaleTo/scaleTo.ino
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ void setup() {

void loop() {
int potValue = board.potentiometer.scaleTo(0, 99);
board.ledmatrix.printInLandscape(potValue);
board.ledmatrix.printNumber(potValue);
}
2 changes: 1 addition & 1 deletion examples/02.ldr/scaleTo/scaleTo.ino
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ void setup() {

void loop() {
int ldrValue = board.ldr.scaleTo(0, 99);
board.ledmatrix.printInLandscape(ldrValue);
board.ledmatrix.printNumber(ldrValue);
}
2 changes: 1 addition & 1 deletion examples/04.rgb/setIntensity/setIntensity.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ void setup() {

void loop() {
int number = board.potentiometer.scaleTo(0, 99);
board.ledmatrix.printInLandscape(number);
board.ledmatrix.printNumber(number);
}
2 changes: 1 addition & 1 deletion examples/06.servo/to/to.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
2 changes: 1 addition & 1 deletion examples/07.servos/robot_02/robot_02.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion examples/07.servos/robot_03/robot_03.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion examples/09.ultrasound/pingCm/pingCm.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
2 changes: 1 addition & 1 deletion examples/11.dht/readHumidity_02/readHumidity_02.ino
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ void loop() {
board.ledmatrix.print("?");
}
else {
board.ledmatrix.printInLandscape(humidity);
board.ledmatrix.printNumber(humidity);
}
}
2 changes: 1 addition & 1 deletion examples/11.dht/readTemperature_02/readTemperature_02.ino
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ void loop() {
board.ledmatrix.print("?");
}
else {
board.ledmatrix.printInLandscape(temperature);
board.ledmatrix.printNumber(temperature);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
6 changes: 3 additions & 3 deletions keywords.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# Datatypes (KEYWORD1)
#######################################

NanoPlayBoard KEYWORD1
NanoPlayBoard KEYWORD1

#######################################
# Methods and Functions (KEYWORD2)
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/LedMatrix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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++) {
Expand Down
2 changes: 1 addition & 1 deletion src/LedMatrix.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit ef3b7b1

Please sign in to comment.