Skip to content

Commit 77288bb

Browse files
committed
Some fixing. Strangely the CTL only shows good values if you set it by hand.
1 parent f3191b1 commit 77288bb

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

ldc500/ldc500.ino

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,9 @@ void setCurrent(float i) {
5050
}
5151

5252
float getVoltage() {
53-
int ctlOut = analogRead(A0);
53+
int ctlOut = analogRead(laserCTL);
5454
// Convert the analog reading (which goes from 0 - 1023) to a voltage (0 - 5V):
55-
Serial.println(analogRead(A0));
56-
return ctlOut*(5.0 / 1023.0); // voltage
55+
return ctlOut*0.0049; // voltage
5756
}
5857

5958
float getCurrent() {

0 commit comments

Comments
 (0)