-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- fix #8 ambiguity - update keywords.txt - add example **tca9548_search_device.ino** - update readme.md - prepare error handling (constants) - some minor edits.
- Loading branch information
1 parent
c8004a8
commit 109849b
Showing
9 changed files
with
112 additions
and
27 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,49 @@ | ||
// | ||
// FILE: tca9548_search_device.ino | ||
// AUTHOR: Rob Tillaart | ||
// PURPOSE: demo TCA9548 I2C multiplexer | ||
// URL: https://github.com/RobTillaart/TCA9548 | ||
|
||
|
||
#include "TCA9548.h" | ||
|
||
TCA9548 MP(0x70); | ||
|
||
uint8_t searchAddress = 0x38; // dummy, adjust to your needs. | ||
|
||
|
||
void setup() | ||
{ | ||
Serial.begin(115200); | ||
Serial.println(__FILE__); | ||
Serial.println(); | ||
|
||
Wire.begin(); | ||
if (MP.begin() == false) | ||
{ | ||
Serial.println("Could not connect to TCA9548 multiplexer."); | ||
} | ||
|
||
Serial.println("\nScan the channels of the multiplexer for searchAddress.\n"); | ||
for (int chan = 0; chan < 8; chan++) | ||
{ | ||
MP.selectChannel(chan); | ||
bool b = MP.isConnected(searchAddress); | ||
Serial.print("CHAN: "); | ||
Serial.print(chan); | ||
Serial.print("\t"); | ||
Serial.print( b ? "found!" : "x"); | ||
} | ||
Serial.println(); | ||
|
||
Serial.println("done..."); | ||
} | ||
|
||
|
||
void loop() | ||
{ | ||
} | ||
|
||
|
||
// -- END OF FILE -- | ||
|
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 |
---|---|---|
@@ -1,11 +1,11 @@ | ||
name=TCA9548 | ||
version=0.1.4 | ||
version=0.1.5 | ||
author=Rob Tillaart <rob.tillaart@gmail.com> | ||
maintainer=Rob Tillaart <rob.tillaart@gmail.com> | ||
sentence=Arduino Library for TCA9548 I2C multiplexer. | ||
paragraph=TCA9548, TCA9548a, PCA9548, PCA9548a | ||
category=Signal Input/Output | ||
url=https://github.com/RobTillaart/TCA9548 | ||
architectures=* | ||
includes=TCA9548.h | ||
includes=TCA9548.h | ||
depends= |
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