-
-
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.
- change return type of **bool setChannel()** - verify the channel parameter of **bool setChannel()** - add parameter to **bool setChannel(channel, disable = true)** - correct the channel math in setChannel() - update readme.md
- Loading branch information
1 parent
dadb727
commit 5f7ee5a
Showing
9 changed files
with
78 additions
and
15 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,40 @@ | ||
// | ||
// FILE: HC4051_ghost_channels.ino | ||
// AUTHOR: Rob Tillaart | ||
// PURPOSE: Demo for HC4051 8 channel (simple) multiplexer | ||
// showing (very short) ghost channels. | ||
// you might need a scope to see this. | ||
// URL: https://github.com/RobTillaart/HC4051 | ||
|
||
|
||
#include "HC4051.h" | ||
|
||
HC4051 mp(4, 5, 6); | ||
|
||
|
||
void setup() | ||
{ | ||
Serial.begin(115200); | ||
Serial.println(__FILE__); | ||
Serial.print("HC4051 LIBRARY VERSION: "); | ||
Serial.println(HC4051_LIB_VERSION); | ||
Serial.println(); | ||
|
||
delay(1000); | ||
} | ||
|
||
|
||
void loop() | ||
{ | ||
for (uint8_t channel = 0; channel < 8; channel++) | ||
{ | ||
// do not disable the device during setChannel. | ||
mp.setChannel(channel, false); | ||
Serial.println(analogRead(A0)); | ||
delay(100); | ||
} | ||
Serial.println(); | ||
} | ||
|
||
|
||
// -- 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
name=HC4051 | ||
version=0.2.0 | ||
version=0.2.1 | ||
author=Rob Tillaart <[email protected]> | ||
maintainer=Rob Tillaart <[email protected]> | ||
sentence=Arduino library for a HC4051 1x8 channel multiplexer | ||
|