mirror of
https://github.com/RobTillaart/Arduino.git
synced 2024-10-03 18:09:02 -04:00
0.3.1 MCP4725
This commit is contained in:
parent
9a1789312c
commit
436be948d6
@ -2,7 +2,7 @@
|
|||||||
// FILE: MCP4725.cpp
|
// FILE: MCP4725.cpp
|
||||||
// AUTHOR: Rob Tillaart
|
// AUTHOR: Rob Tillaart
|
||||||
// PURPOSE: Arduino library for 12 bit I2C DAC - MCP4725
|
// PURPOSE: Arduino library for 12 bit I2C DAC - MCP4725
|
||||||
// VERSION: 0.3.0
|
// VERSION: 0.3.1
|
||||||
// URL: https://github.com/RobTillaart/MCP4725
|
// URL: https://github.com/RobTillaart/MCP4725
|
||||||
//
|
//
|
||||||
// HISTORY:
|
// HISTORY:
|
||||||
@ -23,6 +23,7 @@
|
|||||||
// 0.2.2 2020-07-05 add get/setPercentage();
|
// 0.2.2 2020-07-05 add get/setPercentage();
|
||||||
// 0.2.3 2020-12-26 arduino-CI, bool isConnected(), bool begin()
|
// 0.2.3 2020-12-26 arduino-CI, bool isConnected(), bool begin()
|
||||||
// 0.3.0 2021-01-15 Add WireN support (e.g. teensy)
|
// 0.3.0 2021-01-15 Add WireN support (e.g. teensy)
|
||||||
|
// 0.3.1 2021-05-27 Fix arduino-CI / arduino-lint
|
||||||
|
|
||||||
|
|
||||||
#include "MCP4725.h"
|
#include "MCP4725.h"
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// FILE: MCP4725.h
|
// FILE: MCP4725.h
|
||||||
// AUTHOR: Rob Tillaart
|
// AUTHOR: Rob Tillaart
|
||||||
// PURPOSE: Arduino library for 12 bit I2C DAC - MCP4725
|
// PURPOSE: Arduino library for 12 bit I2C DAC - MCP4725
|
||||||
// VERSION: 0.3.0
|
// VERSION: 0.3.1
|
||||||
// URL: https://github.com/RobTillaart/MCP4725
|
// URL: https://github.com/RobTillaart/MCP4725
|
||||||
// HISTORY: See MCP4725.cpp
|
// HISTORY: See MCP4725.cpp
|
||||||
//
|
//
|
||||||
@ -13,7 +13,7 @@
|
|||||||
#include "Arduino.h"
|
#include "Arduino.h"
|
||||||
|
|
||||||
|
|
||||||
#define MCP4725_VERSION (F("0.3.0"))
|
#define MCP4725_VERSION (F("0.3.1"))
|
||||||
|
|
||||||
|
|
||||||
// constants
|
// constants
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// FILE: MCP4725_keypad.ino
|
// FILE: MCP4725_keypad.ino
|
||||||
// AUTHOR: Rob Tillaart
|
// AUTHOR: Rob Tillaart
|
||||||
// VERSION: 0.1.1
|
// VERSION: 0.2.0
|
||||||
// PURPOSE: test MCP4725 lib
|
// PURPOSE: test MCP4725 lib
|
||||||
// DATE: 2019-10-16
|
// DATE: 2019-10-16
|
||||||
// URL: https://github.com/RobTillaart/MCP4725
|
// URL: https://github.com/RobTillaart/MCP4725
|
||||||
@ -9,15 +9,16 @@
|
|||||||
|
|
||||||
// Note: possible to replace I2CKeypad with Serial code
|
// Note: possible to replace I2CKeypad with Serial code
|
||||||
|
|
||||||
|
|
||||||
#include "Wire.h"
|
#include "Wire.h"
|
||||||
#include "MCP4725.h"
|
#include "MCP4725.h"
|
||||||
|
|
||||||
MCP4725 MCP(0x62); // 0x62 or 0x63
|
MCP4725 MCP(0x62); // 0x62 or 0x63
|
||||||
|
|
||||||
#include "I2CKeyPad.h"
|
#include "I2CKeyPad.h" // at least version 0.2.1
|
||||||
#define KEYPAD_ADDR 0x38
|
#define KEYPAD_ADDR 0x38
|
||||||
|
|
||||||
I2CKeyPad keyPad;
|
I2CKeyPad keyPad(KEYPAD_ADDR);
|
||||||
|
|
||||||
uint32_t value = 0;
|
uint32_t value = 0;
|
||||||
uint32_t oldValue = 0;
|
uint32_t oldValue = 0;
|
||||||
@ -31,7 +32,7 @@ void setup()
|
|||||||
|
|
||||||
MCP.begin();
|
MCP.begin();
|
||||||
MCP.setValue(0);
|
MCP.setValue(0);
|
||||||
keyPad.begin(KEYPAD_ADDR);
|
keyPad.begin();
|
||||||
}
|
}
|
||||||
|
|
||||||
void loop()
|
void loop()
|
||||||
|
@ -15,7 +15,8 @@
|
|||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/RobTillaart/MCP4725.git"
|
"url": "https://github.com/RobTillaart/MCP4725.git"
|
||||||
},
|
},
|
||||||
"version":"0.3.0",
|
"version": "0.3.1",
|
||||||
|
"license": "MIT",
|
||||||
"frameworks": "arduino",
|
"frameworks": "arduino",
|
||||||
"platforms": "*"
|
"platforms": "*"
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
name=MCP4725
|
name=MCP4725
|
||||||
version=0.3.0
|
version=0.3.1
|
||||||
author=Rob Tillaart <rob.tillaart@gmail.com>
|
author=Rob Tillaart <rob.tillaart@gmail.com>
|
||||||
maintainer=Rob Tillaart <rob.tillaart@gmail.com>
|
maintainer=Rob Tillaart <rob.tillaart@gmail.com>
|
||||||
sentence=Arduino library for 12 bit I2C DAC - MCP4725
|
sentence=Arduino library for 12 bit I2C DAC - MCP4725
|
||||||
|
Loading…
Reference in New Issue
Block a user