Hi,
I've got an Interface Panel with two setpoints. "sp_Amps_Lo" and "sp_Amps_Hi".
How do I send two or more values by clicking on one button? Is it possible?
I got it working with one value !btn_SetAmps [sp_Amps_Lo.Value]\r
Grete Software. Will certainly buy a license.
Regards,
-- Daniel
Interface Panel
I figured it out. Got Blink 2.0 from GitHub.
!btn_SetAmpsLo [sp_Amps_Lo.Value]\r
!btn_SetAmpsHi [sp_Amps_Hi.Value]\r
!btn_SetAmpsLo [sp_Amps_Lo.Value]\r
!btn_SetAmpsHi [sp_Amps_Hi.Value]\r
Code: Select all
#include "MegunoLink.h"
#include "CommandHandler.h"
CommandHandler<> SerialCommandHandler;
void cmd_SetAmpsLo(CommandParameter &Parameters)
{
sp_Amps_Lo = Parameters.NextParameterAsDouble();
}
void cmd_SetAmpsHi(CommandParameter &Parameters)
{
sp_Amps_Hi = Parameters.NextParameterAsDouble();
}
void setup()
{
SerialCommandHandler.AddCommand(F("btn_SetAmpsLo"), cmd_SetAmpsLo);
SerialCommandHandler.AddCommand(F("btn_SetAmpsHi"), cmd_SetAmpsHi);
}
void loop()
{
SerialCommandHandler.Process();
delay(250);
}