本文整理汇总了C++中Led::setMax方法的典型用法代码示例。如果您正苦于以下问题:C++ Led::setMax方法的具体用法?C++ Led::setMax怎么用?C++ Led::setMax使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Led
的用法示例。
在下文中一共展示了Led::setMax方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setup
// Setup function
void setup()
{
// connection to the salve computer in the garage
Serial1.begin(9600);
// register Particle variables
Particle.variable("rssi", rssi);
Particle.variable("temperature", temperature);
Particle.variable("humidity", humidity);
// register Particle functions
Particle.function("Door", funcDoor);
Particle.function("Restart", funcRestart);
// connect to the blynk server
//Blynk.begin("7cb12eb10dee49f98c61d3e7b34f7433");
//while (Blynk.connect() == false) {
// Wait until connected
//}
debug("STEJ Garage Control");
debug(String::format("Built: %s %s",__DATE__, __TIME__));
closeLed.setMax(brightness);
openLed.setMax(brightness);
openButton.attach(bePressed, onOpenPressed);
closeButton.attach(bePressed, onClosePressed);
screen.begin(0x73, true);
screen.setBrightness((brightness / 100.0) * 15);
screen.clearText();
screen << "Now is the time for a very long message to see if it works!";
//lcd.clear();
// Adds newline to every command
cmd.printLfCr();
cmd.attach(GC_DoorStatus, &onDoorStatus);
cmd.attach(GC_Temperature, &onTemperature);
cmd.sendCmd(GC_Acknowledge, F("Garage Control Master Started!"));
onFiveSeconds(); fiveSecondTimer.start();
fiveMinuteTimer.start();
onThirtySeconds(); thirtySecondTimer.start();
}