diff --git a/DOC/README.md b/DOC/README.md new file mode 100644 index 0000000..a1b0596 --- /dev/null +++ b/DOC/README.md @@ -0,0 +1,4 @@ + +!![Alt text](https://github.com/UA6EM/Arduino-MCP4131/blob/mpgsp/DOC/mcp41x1_install.jpeg) + +![Alt text](https://github.com/UA6EM/Arduino-MCP4131/blob/mpgsp/DOC/mcp41x1_spi.jpeg) diff --git a/DOC/mcp41x1_install.jpeg b/DOC/mcp41x1_install.jpeg new file mode 100644 index 0000000..3d122b3 Binary files /dev/null and b/DOC/mcp41x1_install.jpeg differ diff --git a/DOC/mcp41x1_spi.jpeg b/DOC/mcp41x1_spi.jpeg new file mode 100644 index 0000000..f428d6a Binary files /dev/null and b/DOC/mcp41x1_spi.jpeg differ diff --git a/README.md b/README.md index 4eb3670..6c1a763 100644 --- a/README.md +++ b/README.md @@ -5,9 +5,15 @@ Example Wiring ![Alt text](https://github.com/dgduncan/Arduino-MCP4131/blob/master/extras/Screen%20Shot%202018-04-08%20at%209.56.42%20PM.png "Example Wiring Diagram") + +!![Alt text](https://github.com/UA6EM/Arduino-MCP4131/blob/mpgsp/DOC/mcp41x1_install.jpeg) + +![Alt text](https://github.com/UA6EM/Arduino-MCP4131/blob/mpgsp/DOC/mcp41x1_spi.jpeg) + License ===== + ``` The MIT License (MIT) diff --git a/keywords.txt b/keywords.txt index 7f40e59..7979c66 100644 --- a/keywords.txt +++ b/keywords.txt @@ -1,5 +1,5 @@ MCP4131 KEYWORD1 -readWiper KEYWORD2 -writeWiper KEYWORD2 -decrementWiper KEYWORD2 -incrementWiper KEYWORD2 +readValue KEYWORD2 +writeValue KEYWORD2 +decrementValue KEYWORD2 +incrementValue KEYWORD2 diff --git a/library.properties b/library.properties index eef41ef..e8d9e58 100644 --- a/library.properties +++ b/library.properties @@ -1,9 +1,9 @@ name=MCP4131 library -version=1.0.0 +version=1.0.1 author=Derek Duncan -maintainer=Derek Duncan +maintainer=ua6em sentence=A library to control an MCP4131 digital potentiometer paragraph=A library to control an MCP4131 digital potentiometer category=Device Control -url=https://github.com/dgduncan/Arduino-MCP4131 +url=https://github.com/UA6EM/Arduino-MCP4131/tree/mpgsp architectures=* diff --git a/src/MCP4131.cpp b/src/MCP4131.cpp index 324287e..a465708 100644 --- a/src/MCP4131.cpp +++ b/src/MCP4131.cpp @@ -17,11 +17,11 @@ MCP4131::MCP4131(int slavePin) { pinMode(slavePin, OUTPUT); } -byte MCP4131::readWiper() { +byte MCP4131::readValue() { return sendCommand(ADDRESS_WIPER0, COMMAND_READ, 255); } -void MCP4131::writeWiper(unsigned int wiperValue) { +void MCP4131::writeValue(unsigned int wiperValue) { sendCommand(ADDRESS_WIPER0, COMMAND_WRITE, wiperValue); } @@ -65,11 +65,11 @@ byte MCP4131::sendCommand(byte address, char command, unsigned int data) { } -void MCP4131::decrementWiper() { +void MCP4131::decrementValue() { sendCommand(ADDRESS_WIPER0, COMMAND_DECREMENT); } -void MCP4131::incrementWiper() { +void MCP4131::incrementValue() { sendCommand(ADDRESS_WIPER0, COMMAND_INCREMENT); } @@ -79,4 +79,4 @@ void MCP4131::enableChip() { void MCP4131::disableChip() { digitalWrite(slaveSelectPin, HIGH); -} \ No newline at end of file +} diff --git a/src/MCP4131.h b/src/MCP4131.h index 1972eaa..ad26fbb 100644 --- a/src/MCP4131.h +++ b/src/MCP4131.h @@ -14,10 +14,10 @@ class MCP4131 { public: MCP4131(int slave_select_pin); - byte readWiper(); - void writeWiper(unsigned int wiperValue); - void decrementWiper(); - void incrementWiper(); + byte readValue(); + void writeValue(unsigned int wiperValue); + void decrementValue(); + void incrementValue(); private: const static byte ADDRESS_WIPER0 = 0x0;