Skip to content

Commit 84502b1

Browse files
SetVCOM sketch feedback fix
1 parent e3b968a commit 84502b1

File tree

5 files changed

+40
-50
lines changed

5 files changed

+40
-50
lines changed

examples/Inkplate10/Diagnostics/Inkplate10_Set_VCOM/Inkplate10_Set_VCOM.ino

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
Don't have "e-radionica Inkplate10" or "Soldered Inkplate10" option? Follow our tutorial and add it:
66
https://soldered.com/learn/add-inkplate-6-board-definition-to-arduino-ide/
77
8-
This sketch is intended to help calibrate the VCOM display voltage.
9-
It should not be run frequently, as doing so may damage internal components.
10-
Use with caution.
8+
WARNING! - VCOM voltage is written in EEPROM, which means it can be set a limited number of
9+
times, so don't run this sketch repeteadly! VCOM should be set once and then left as is.
10+
Use with caution!
1111
1212
Want to learn more about Inkplate? Visit https://soldered.com/documentation/inkplate/
1313
Looking to get support? Write on our forums: https://forum.soldered.com/
@@ -28,24 +28,23 @@ Inkplate display(INKPLATE_3BIT); // Create an object on Inkplate library and als
2828

2929

3030
double currentVCOM; //Stores the current VCOM value stored on EEPROM
31-
const int EEPROMAddress=0;
31+
const int EEPROMAddress=0; //Should leave the address as it is for correct EEPROM reading later
3232
double vcomVoltage;
3333

3434
double readPanelVCOM();
3535
double getVCOMFromSerial(double *_vcom);
3636
uint8_t writeVCOMToEEPROM(double v);
3737
void displayTestImage();
38-
template<typename T>
39-
void writeReg(uint8_t reg, T data);
38+
void writeReg(uint8_t reg, float data);
4039
uint8_t readReg(uint8_t reg);
4140

4241
void setup() {
4342
Serial.begin(115200); //Start serial at 115200 baud
4443
EEPROM.begin(512); //Initialize EEPROM
4544
Wire.begin(); //Initialize I2C buss
4645
display.begin(); //Initialize the Inkplate
47-
display.einkOn();
48-
Serial.println("Enter VCOM value, it must be [-5, 0]");
46+
Serial.println("The optimal VCOM Voltage for your Inkplate's panel can sometimes be found written on the flat cable connector");
47+
Serial.println("Write VCOM voltage from epaper panel. \r\nDon't forget negative (-) sign!\r\nUse dot as the decimal point.\r\nFor example -1.23\n");
4948
displayTestImage();
5049
}
5150

@@ -135,8 +134,7 @@ uint8_t writeVCOMToEEPROM(double v){
135134
Serial.println("VCOM EEPROM PROGRAMMING OK");
136135
return 1;
137136
}
138-
template<typename T>
139-
void writeReg(uint8_t reg, T data){
137+
void writeReg(uint8_t reg, float data){
140138
Wire.beginTransmission(0x48);
141139
Wire.write(reg);
142140
Wire.write((uint8_t)data);

examples/Inkplate5V2/Diagnostics/Inkplate5v2_Set_VCOM/Inkplate5v2_Set_VCOM.ino

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
Don't have "Soldered Inkplate 5v2" option? Follow our tutorial and add it:
66
https://soldered.com/learn/add-inkplate-6-board-definition-to-arduino-ide/
77
8-
This sketch is intended to help calibrate the VCOM display voltage.
9-
It should not be run frequently, as doing so may damage internal components.
10-
Use with caution.
8+
WARNING! - VCOM voltage is written in EEPROM, which means it can be set a limited number of
9+
times, so don't run this sketch repeteadly! VCOM should be set once and then left as is.
10+
Use with caution!
1111
1212
Want to learn more about Inkplate? Visit https://soldered.com/documentation/inkplate/
1313
Looking to get support? Write on our forums: https://forum.soldered.com/
@@ -26,24 +26,23 @@ Inkplate display(INKPLATE_3BIT); // Create an object on Inkplate library and als
2626

2727

2828
double currentVCOM; //Stores the current VCOM value stored on EEPROM
29-
const int EEPROMAddress=0;
29+
const int EEPROMAddress=0; //Should leave the address as it is for correct EEPROM reading later
3030
double vcomVoltage;
3131

3232
double readPanelVCOM();
3333
double getVCOMFromSerial(double *_vcom);
3434
uint8_t writeVCOMToEEPROM(double v);
3535
void displayTestImage();
36-
template<typename T>
37-
void writeReg(uint8_t reg, T data);
36+
void writeReg(uint8_t reg, float data);
3837
uint8_t readReg(uint8_t reg);
3938

4039
void setup() {
4140
Serial.begin(115200); //Start serial at 115200 baud
4241
EEPROM.begin(512); //Initialize EEPROM
4342
Wire.begin(); //Initialize I2C buss
4443
display.begin(); //Initialize the Inkplate
45-
display.einkOn();
46-
Serial.println("Enter VCOM value, it must be [-5, 0]");
44+
Serial.println("The optimal VCOM Voltage for your Inkplate's panel can sometimes be found written on the flat cable connector");
45+
Serial.println("Write VCOM voltage from epaper panel. \r\nDon't forget negative (-) sign!\r\nUse dot as the decimal point.\r\nFor example -1.23\n");
4746
displayTestImage();
4847
}
4948

@@ -133,8 +132,7 @@ uint8_t writeVCOMToEEPROM(double v){
133132
Serial.println("VCOM EEPROM PROGRAMMING OK");
134133
return 1;
135134
}
136-
template<typename T>
137-
void writeReg(uint8_t reg, T data){
135+
void writeReg(uint8_t reg, float data){
138136
Wire.beginTransmission(0x48);
139137
Wire.write(reg);
140138
Wire.write((uint8_t)data);

examples/Inkplate6/Diagnostics/Inkplate6_Set_VCOM/Inkplate6_Set_VCOM.ino

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
Don't have "Soldered Inkplate6" option? Follow our tutorial and add it:
66
https://soldered.com/learn/add-inkplate-6-board-definition-to-arduino-ide/
77
8-
This sketch is intended to help calibrate the VCOM display voltage.
9-
It should not be run frequently, as doing so may damage internal components.
10-
Use with caution.
8+
WARNING! - VCOM voltage is written in EEPROM, which means it can be set a limited number of
9+
times, so don't run this sketch repeteadly! VCOM should be set once and then left as is.
10+
Use with caution!
1111
1212
Want to learn more about Inkplate? Visit https://soldered.com/documentation/inkplate/
1313
Looking to get support? Write on our forums: https://forum.soldered.com/
@@ -26,24 +26,23 @@ Inkplate display(INKPLATE_3BIT); // Create an object on Inkplate library and als
2626

2727

2828
double currentVCOM; //Stores the current VCOM value stored on EEPROM
29-
const int EEPROMAddress=0;
29+
const int EEPROMAddress=0; //Should leave the address as it is for correct EEPROM reading later
3030
double vcomVoltage;
3131

3232
double readPanelVCOM();
3333
double getVCOMFromSerial(double *_vcom);
3434
uint8_t writeVCOMToEEPROM(double v);
3535
void displayTestImage();
36-
template<typename T>
37-
void writeReg(uint8_t reg, T data);
36+
void writeReg(uint8_t reg, float data);
3837
uint8_t readReg(uint8_t reg);
3938

4039
void setup() {
4140
Serial.begin(115200); //Start serial at 115200 baud
4241
EEPROM.begin(512); //Initialize EEPROM
4342
Wire.begin(); //Initialize I2C buss
4443
display.begin(); //Initialize the Inkplate
45-
display.einkOn();
46-
Serial.println("Enter VCOM value, it must be [-5, 0]");
44+
Serial.println("The optimal VCOM Voltage for your Inkplate's panel can sometimes be found written on the flat cable connector");
45+
Serial.println("Write VCOM voltage from epaper panel. \r\nDon't forget negative (-) sign!\r\nUse dot as the decimal point.\r\nFor example -1.23\n");
4746
displayTestImage();
4847
}
4948

@@ -133,8 +132,7 @@ uint8_t writeVCOMToEEPROM(double v){
133132
Serial.println("VCOM EEPROM PROGRAMMING OK");
134133
return 1;
135134
}
136-
template<typename T>
137-
void writeReg(uint8_t reg, T data){
135+
void writeReg(uint8_t reg, float data){
138136
Wire.beginTransmission(0x48);
139137
Wire.write(reg);
140138
Wire.write((uint8_t)data);

examples/Inkplate6FLICK/Diagnostics/Inkplate6FLICK_Set_VCOM/Inkplate6FLICK_Set_VCOM.ino

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
Don't have "Soldered Inkplate6FLICK" option? Follow our tutorial and add it:
66
https://soldered.com/learn/add-inkplate-6-board-definition-to-arduino-ide/
77
8-
This sketch is intended to help calibrate the VCOM display voltage.
9-
It should not be run frequently, as doing so may damage internal components.
10-
Use with caution.
8+
WARNING! - VCOM voltage is written in EEPROM, which means it can be set a limited number of
9+
times, so don't run this sketch repeteadly! VCOM should be set once and then left as is.
10+
Use with caution!
1111
1212
Want to learn more about Inkplate? Visit https://soldered.com/documentation/inkplate/
1313
Looking to get support? Write on our forums: https://forum.soldered.com/
@@ -27,24 +27,23 @@ Inkplate display(INKPLATE_3BIT); // Create an object on Inkplate library and als
2727

2828

2929
double currentVCOM; //Stores the current VCOM value stored on EEPROM
30-
const int EEPROMAddress=0;
30+
const int EEPROMAddress=0; //Should leave the address as it is for correct EEPROM reading later
3131
double vcomVoltage;
3232

3333
double readPanelVCOM();
3434
double getVCOMFromSerial(double *_vcom);
3535
uint8_t writeVCOMToEEPROM(double v);
3636
void displayTestImage();
37-
template<typename T>
38-
void writeReg(uint8_t reg, T data);
37+
void writeReg(uint8_t reg, float data);
3938
uint8_t readReg(uint8_t reg);
4039

4140
void setup() {
4241
Serial.begin(115200); //Start serial at 115200 baud
4342
EEPROM.begin(512); //Initialize EEPROM
4443
Wire.begin(); //Initialize I2C buss
4544
display.begin(); //Initialize the Inkplate
46-
display.einkOn();
47-
Serial.println("Enter VCOM value, it must be [-5, 0]");
45+
Serial.println("The optimal VCOM Voltage for your Inkplate's panel can sometimes be found written on the flat cable connector");
46+
Serial.println("Write VCOM voltage from epaper panel. \r\nDon't forget negative (-) sign!\r\nUse dot as the decimal point.\r\nFor example -1.23\n");
4847
displayTestImage();
4948
}
5049

@@ -134,8 +133,7 @@ uint8_t writeVCOMToEEPROM(double v){
134133
Serial.println("VCOM EEPROM PROGRAMMING OK");
135134
return 1;
136135
}
137-
template<typename T>
138-
void writeReg(uint8_t reg, T data){
136+
void writeReg(uint8_t reg, float data){
139137
Wire.beginTransmission(0x48);
140138
Wire.write(reg);
141139
Wire.write((uint8_t)data);

examples/Inkplate6PLUS/Diagnostics/Inkplate6PLUS_Set_VCOM/Inkplate6PLUS_Set_VCOM.ino

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
Don't have "Soldered Inkplate6PLUS" option? Follow our tutorial and add it:
66
https://soldered.com/learn/add-inkplate-6-board-definition-to-arduino-ide/
77
8-
This sketch is intended to help calibrate the VCOM display voltage.
9-
It should not be run frequently, as doing so may damage internal components.
10-
Use with caution.
8+
WARNING! - VCOM voltage is written in EEPROM, which means it can be set a limited number of
9+
times, so don't run this sketch repeteadly! VCOM should be set once and then left as is.
10+
Use with caution!
1111
1212
Want to learn more about Inkplate? Visit https://soldered.com/documentation/inkplate/
1313
Looking to get support? Write on our forums: https://forum.soldered.com/
@@ -26,24 +26,23 @@ Inkplate display(INKPLATE_3BIT); // Create an object on Inkplate library and als
2626

2727

2828
double currentVCOM; //Stores the current VCOM value stored on EEPROM
29-
const int EEPROMAddress=0;
29+
const int EEPROMAddress=0; //Should leave the address as it is for correct EEPROM reading later
3030
double vcomVoltage;
3131

3232
double readPanelVCOM();
3333
double getVCOMFromSerial(double *_vcom);
3434
uint8_t writeVCOMToEEPROM(double v);
3535
void displayTestImage();
36-
template<typename T>
37-
void writeReg(uint8_t reg, T data);
36+
void writeReg(uint8_t reg, float data);
3837
uint8_t readReg(uint8_t reg);
3938

4039
void setup() {
4140
Serial.begin(115200); //Start serial at 115200 baud
4241
EEPROM.begin(512); //Initialize EEPROM
4342
Wire.begin(); //Initialize I2C buss
4443
display.begin(); //Initialize the Inkplate
45-
display.einkOn();
46-
Serial.println("Enter VCOM value, it must be [-5, 0]");
44+
Serial.println("The optimal VCOM Voltage for your Inkplate's panel can sometimes be found written on the flat cable connector");
45+
Serial.println("Write VCOM voltage from epaper panel. \r\nDon't forget negative (-) sign!\r\nUse dot as the decimal point.\r\nFor example -1.23\n");
4746
displayTestImage();
4847
}
4948

@@ -133,8 +132,7 @@ uint8_t writeVCOMToEEPROM(double v){
133132
Serial.println("VCOM EEPROM PROGRAMMING OK");
134133
return 1;
135134
}
136-
template<typename T>
137-
void writeReg(uint8_t reg, T data){
135+
void writeReg(uint8_t reg, float data){
138136
Wire.beginTransmission(0x48);
139137
Wire.write(reg);
140138
Wire.write((uint8_t)data);

0 commit comments

Comments
 (0)