-
-
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.
Browse files
Browse the repository at this point in the history
- Fix #20, **disableChannel()** bug + optimize. - Fix **isConnected(address, channel)** bug. - update keywords.txt - update readme.md - add **uint8_t find(address)** function, returns mask. - update / add examples.
- Loading branch information
1 parent
503d254
commit e8f6b83
Showing
10 changed files
with
123 additions
and
37 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,52 @@ | ||
// | ||
// FILE: TCA9548_find.ino | ||
// AUTHOR: Rob Tillaart | ||
// PURPOSE: demo TCA9548 I2C multiplexer | ||
// URL: https://github.com/RobTillaart/TCA9548 | ||
|
||
|
||
#include "TCA9548.h" | ||
|
||
TCA9548 MP(0x70); | ||
|
||
uint8_t channels = 0; | ||
|
||
|
||
void setup() | ||
{ | ||
Serial.begin(115200); | ||
Serial.println(__FILE__); | ||
Serial.print("TCA9548_LIB_VERSION: "); | ||
Serial.println(TCA9548_LIB_VERSION); | ||
Serial.println(); | ||
|
||
Wire.begin(); | ||
if (MP.begin() == false) | ||
{ | ||
Serial.println("COULD NOT CONNECT TO MULTIPLEXER"); | ||
} | ||
|
||
channels = MP.channelCount(); | ||
Serial.print("CHAN:\t"); | ||
Serial.println(MP.channelCount()); | ||
|
||
// adjust address range to your needs. | ||
for (uint8_t addr = 60; addr < 70; addr++) | ||
{ | ||
if (addr % 10 == 0) Serial.println(); | ||
Serial.print(addr); | ||
Serial.print("\t"); | ||
Serial.print(MP.find(addr), BIN); | ||
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
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