Skip to content

Commit bdb57d9

Browse files
committed
2 parents b65a4a3 + 59df0df commit bdb57d9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

ldc500/ldc500.ino

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
44
Main Functions:
55
* ENABLE/DISABLE Laser -> Pin 13 + LED
6-
* SET Laser Current -> Pin 11
6+
* SET Laser Current -> Pin 11 (Changed to 31 kHz
77
* GET Laser Current -> A0
88
LDC205C -> k=50mA/V
99
@@ -36,6 +36,10 @@ boolean stringComplete = false; // whether the string is complete
3636
void setup() {
3737
pinMode(laserREM, OUTPUT);
3838
pinMode(laserMod, OUTPUT);
39+
// Change PWM Frequency for Timer2.
40+
// Copied the relevant part from here:
41+
// http://playground.arduino.cc/Code/PwmFrequency
42+
TCCR2B = TCCR2B & 0b11111000 | 0x01;
3943
Serial.begin(115200);
4044
// reserve 200 bytes for the inputString:
4145
inputString.reserve(200);

0 commit comments

Comments
 (0)