1

Topic: user setup and loop

it would make it easier to update screen design if
setup() included userSetup() call and Loop() included userLoop() call
then you can use another tab for your code with userSetup() and userLoop() in it.
This way you can change the design of the screens and simply copy paste the code into you code and it automatically links in to your code.

2

Re: user setup and loop

It is good idea. But for beginners it will be hard. You can do it yourself.

3 (edited by chrismolloy 2020-03-10 23:34:42)

Re: user setup and loop

Maybe you could make it optional.
I may revise a form a lot of times until I like it.  That means editing that file numerous times.

Is there any work being done on this app?

4

Re: user setup and loop

When you change something in the editor, you only need to copy what is between the #pragma pack directives into your code.

5

Re: user setup and loop

kinda true unless you have linked output pins to buttons.

resulting code below the #pragma pack(pop)

#define PIN_FANSWITCH D4
#define PIN_HUMIDIFIERSWITCH D4
#define PIN_HEATERSWITCH D4


void setup()
{
  RemoteXY_Init ();
 
  pinMode (PIN_FANSWITCH, OUTPUT);
  pinMode (PIN_HUMIDIFIERSWITCH, OUTPUT);
  pinMode (PIN_HEATERSWITCH, OUTPUT);
 
  // TODO you setup code
 

void loop()
{
  RemoteXY_Handler ();
 
  digitalWrite(PIN_FANSWITCH, (RemoteXY.fanSwitch==0)?LOW:HIGH);
  digitalWrite(PIN_HUMIDIFIERSWITCH, (RemoteXY.humidifierSwitch==0)?LOW:HIGH);
  digitalWrite(PIN_HEATERSWITCH, (RemoteXY.heaterSwitch==0)?LOW:HIGH);
 
  // TODO you loop code
  // use the RemoteXY structure for data transfer