-
-
Notifications
You must be signed in to change notification settings - Fork 1
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 #2 from RobTillaart/develop
- fix ghost channels when using for OUTPUT - add disable/enable in setChannel() - update setChannel() performance. - update readme.md - update GitHub actions - minor edits
- Loading branch information
Showing
12 changed files
with
148 additions
and
25 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
# These are supported funding model platforms | ||
|
||
github: RobTillaart | ||
custom: "https://www.paypal.me/robtillaart" | ||
|
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
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,56 @@ | ||
// | ||
// FILE: HC4051_performance.ino | ||
// AUTHOR: Rob Tillaart | ||
// PURPOSE: Demo for HC4051 8 channel (simple) multiplexer | ||
|
||
|
||
#include "HC4051.h" | ||
|
||
HC4051 mp(4, 5, 6, 8); // enable pin(8) | ||
|
||
uint32_t start, stop; | ||
|
||
|
||
void setup() | ||
{ | ||
Serial.begin(115200); | ||
Serial.println(__FILE__); | ||
Serial.print("HC4051 LIBRARY VERSION: "); | ||
Serial.println(HC4051_LIB_VERSION); | ||
Serial.println(); | ||
delay(100); | ||
|
||
mp.setChannel(10); | ||
|
||
for (uint8_t ch = 0; ch < 8; ch ++) | ||
{ | ||
start = micros(); | ||
mp.setChannel(ch); | ||
stop = micros(); | ||
Serial.print("Channel "); | ||
Serial.print(ch); | ||
Serial.print(": \t"); | ||
Serial.println(stop - start); | ||
delay(100); | ||
} | ||
|
||
mp.setChannel(5); | ||
delay(100); | ||
|
||
start = micros(); | ||
mp.setChannel(5); | ||
stop = micros(); | ||
|
||
Serial.print("\nSetChannel: \t"); | ||
Serial.println(stop - start); | ||
delay(100); | ||
|
||
} | ||
|
||
|
||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
|
||
HC4051_performance.ino | ||
HC4051 LIBRARY VERSION: 0.2.0 | ||
|
||
Channel 0: 20 | ||
Channel 1: 20 | ||
Channel 2: 24 | ||
Channel 3: 24 | ||
Channel 4: 28 | ||
Channel 5: 24 | ||
Channel 6: 24 | ||
Channel 7: 20 | ||
|
||
SetChannel: 4 | ||
|
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,5 +1,5 @@ | ||
name=HC4051 | ||
version=0.1.1 | ||
version=0.2.0 | ||
author=Rob Tillaart <[email protected]> | ||
maintainer=Rob Tillaart <[email protected]> | ||
sentence=Arduino library for a HC4051 1x8 channel multiplexer | ||
|