illumination: use comPort for test output
This commit is contained in:
parent
54c34683c0
commit
225e208eae
1 changed files with 5 additions and 6 deletions
|
|
@ -98,13 +98,13 @@ void cc_test()
|
||||||
for (float v = 0; v <= 1; v+=0.02)
|
for (float v = 0; v <= 1; v+=0.02)
|
||||||
{
|
{
|
||||||
|
|
||||||
Serial.print(v);
|
comPort->print(v);
|
||||||
Serial.print(" ");
|
comPort->print(" ");
|
||||||
cc_set_value(v);
|
cc_set_value(v);
|
||||||
Serial.print(" ");
|
comPort->print(" ");
|
||||||
delay(2000);
|
delay(2000);
|
||||||
float current = multi_read(A0, 1000)/4095.0*3.3;
|
float current = multi_read(A0, 1000)/4095.0*3.3;
|
||||||
Serial.println(current*1000);
|
comPort->println(current*1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
cc_set_value(0);
|
cc_set_value(0);
|
||||||
|
|
@ -156,7 +156,7 @@ void cc_set_value(float val)
|
||||||
stepd = tdown;
|
stepd = tdown;
|
||||||
}
|
}
|
||||||
|
|
||||||
//step up
|
//step current
|
||||||
uint8_t steps_done =0;
|
uint8_t steps_done =0;
|
||||||
for (uint8_t i=16; i!=setting; i+=dir)
|
for (uint8_t i=16; i!=setting; i+=dir)
|
||||||
{
|
{
|
||||||
|
|
@ -166,7 +166,6 @@ void cc_set_value(float val)
|
||||||
delayMicroseconds(td);
|
delayMicroseconds(td);
|
||||||
steps_done++;
|
steps_done++;
|
||||||
}
|
}
|
||||||
Serial.print(steps_done);
|
|
||||||
#else
|
#else
|
||||||
comPort->println("CC LED not supported");
|
comPort->println("CC LED not supported");
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue