-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from LeoColomb/v3.0-wip
v3.0
- Loading branch information
Showing
10 changed files
with
135 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// | ||
// SonarSRF | ||
// Arduino Library for controlling SRF sonar sensors | ||
// http://www.arduino.cc/playground/Main/SonarSrf08 | ||
// | ||
// MIT License | ||
// Copyright(c) 2009 Zach Foresta | ||
// Copyright(c) 2012 Philipp A. Mohrenweiser | ||
// Copyright(c) 2012-2016 Leo Colombaro | ||
// | ||
|
||
#include "SonarSRF08.h" | ||
|
||
/// <summary> | ||
/// Get luminosity captured by SRF08 sensor | ||
/// </summary> | ||
/// <returns>The luminosity (one byte)</returns> | ||
int SonarSRF08::getLuminosity() | ||
{ | ||
startRanging('i'); | ||
delay(70); | ||
|
||
sendCommand(0, LIGHT_SENSOR); | ||
Wire.requestFrom(_address, 1); | ||
while (Wire.available() < 0); // While byte available | ||
return (int)(Wire.read()); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
name=SonarSRF | ||
version=3.0.0 | ||
author=Léo Colombaro | ||
maintainer=Léo Colombaro <[email protected]> | ||
sentence=Arduino interfacing with sonar sensor SRF | ||
paragraph=This lib wants to give a quick shot on differences for usage of SRF 02 and 08 atm. | ||
category=Sensors | ||
url=https://github.com/LeoColomb/Arduino-SRF | ||
architectures=* |