Skip to content

Commit

Permalink
Updated the readme file
Browse files Browse the repository at this point in the history
  • Loading branch information
valmat committed Mar 6, 2016
1 parent 231c574 commit 87b4ae7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ Pino led(13, Pino::Mode::out); // select the pin for the LED
void setup() {}

void loop() {
int sensorValue = sensor.read();
auto sensorValue = sensor.read();
led.on();
// stop the program for <sensorValue> milliseconds:
delay(sensorValue);
led.off();;
led.off();
// stop the program for for <sensorValue> milliseconds:
delay(sensorValue);
}
Expand Down Expand Up @@ -113,7 +113,7 @@ The table below shows the corresponding class methods to native functions:
| `pin.shiftIn(clockPin)` |`shiftIn(pin, clockPin, MSBFIRST)`|
| `pin.shiftInRe(clockPin)` |`shiftIn(pin, clockPin, LSBFIRST)`|
More details see [surce code](Pino.h)
More details see [surce code](src/Pino.h)
![Pino](/extras/Pino.png?raw=true)
14 changes: 8 additions & 6 deletions src/Pino.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ class Pino
::tone(_pin, frequency, duration);
}

// Stops the generation of a square wave triggered by tone(). Has no effect if no tone is being generated.
// Stops the generation of a square wave triggered by tone().
// Has no effect if no tone is being generated.
void noTone() const
{
::noTone(_pin);
Expand All @@ -107,21 +108,21 @@ class Pino
// Reads a pulse HIGH on the pin.
uint32_t pulseInOn(uint32_t timeout) const
{
return pulseIn(_pin, HIGH, timeout);
return ::pulseIn(_pin, HIGH, timeout);
}
uint32_t pulseInOn() const
{
return pulseIn(_pin, HIGH);
return ::pulseIn(_pin, HIGH);
}

// // Reads a pulse HIGH on the pin.
// Reads a pulse HIGH on the pin.
uint32_t pulseInOff(uint32_t timeout) const
{
return pulseIn(_pin, LOW, timeout);
return ::pulseIn(_pin, LOW, timeout);
}
uint32_t pulseInOff() const
{
return pulseIn(_pin, LOW);
return ::pulseIn(_pin, LOW);
}

// Shifts out a byte of data one bit at a time
Expand Down Expand Up @@ -166,6 +167,7 @@ class Pino
return ::shiftIn(_pin, clockPin._pin, LSBFIRST);
}

// Cast to a number
operator uint8_t () const
{
return _pin;
Expand Down

0 comments on commit 87b4ae7

Please sign in to comment.