Added VCC switch to I2C
This commit is contained in:
parent
b3cc47daad
commit
21f7ee25fe
5 changed files with 11 additions and 2 deletions
|
|
@ -120,6 +120,8 @@ void i2cInput(int bytesReceived) {
|
|||
break;
|
||||
case CMD_STATE:
|
||||
break;
|
||||
case CMD_VCCSW:
|
||||
updateVccSwitch(value);
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,4 +9,5 @@
|
|||
#define CMD_CONST 0x08
|
||||
#define CMD_CONFIG 0x09
|
||||
#define CMD_ERASE 0x0a
|
||||
#define CMD_STATE 0x0b
|
||||
#define CMD_STATE 0x0b
|
||||
#define CMD_VCCSW 0x0c
|
||||
|
|
@ -168,7 +168,8 @@ void updateParams() {
|
|||
Serial.println(" (0 for active low, 1 for active high)");
|
||||
Serial.println("To enable piezo plugged detection: PZDET [0|1]");
|
||||
Serial.println(" (0 for disabled, 1 for enabled)");
|
||||
Serial.println("To change the main voltage of the circuit: VCCSW [0|1]") Serial.println(" (0 for 3.3v, 1 for 5v)");
|
||||
Serial.println("To change the main voltage of the circuit: VCCSW [0|1]");
|
||||
Serial.println(" (0 for 3.3v, 1 for 5v)");
|
||||
Serial.println("To change ADC hysteresis value: HYST [integer in millivolts]");
|
||||
Serial.println("To enable or disable debug output: DEBUG [0|1]");
|
||||
Serial.println("To print current config: CONFIG");
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@
|
|||
#define CMD_CONFIG 0x09
|
||||
#define CMD_ERASE 0x0a
|
||||
#define CMD_STATE 0x0b
|
||||
#define CMD_VCCSW 0x0c
|
||||
|
||||
#include "WString.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -141,6 +141,8 @@ void updateParams() {
|
|||
write(CMD_LOGIC, (uint16_t)serialLong);
|
||||
} else if (strcmp(serialMessageIn, "PZDET") == 0) {
|
||||
write(CMD_PZDET, (uint16_t)serialLong);
|
||||
} else if (strcmp(serialMessageIn, "VCCSW") == 0) {
|
||||
write(CMD_VCCSW, (uint16_t)serialLong);
|
||||
} else if (strcmp(serialMessageIn, "CONST") == 0) {
|
||||
write(CMD_CONST, serialLong);
|
||||
} else if (strcmp(serialMessageIn, "CONFIG") == 0) {
|
||||
|
|
@ -161,6 +163,8 @@ void updateParams() {
|
|||
Serial.println(" (0 for active low, 1 for active high)");
|
||||
Serial.println("To enable piezo plugged detection: PZDET [0|1]");
|
||||
Serial.println(" (0 for disabled, 1 for enabled)");
|
||||
Serial.println("To change the main voltage of the circuit: VCCSW [0|1]");
|
||||
Serial.println(" (0 for 3.3v, 1 for 5v)");
|
||||
Serial.println("To change ADC hysteresis value: HYST [integer in millivolts]");
|
||||
Serial.println("To enable or disable debug output: DEBUG [0|1]");
|
||||
Serial.println("To print current config: CONFIG");
|
||||
|
|
|
|||
Loading…
Reference in a new issue