Thursday, May 17, 2018

RESET VIA MILLIS



int led = 9;

void setup() {  
  pinMode(led, OUTPUT);   
  Serial.begin(9600);//initialize the serial port

}
void(* resetFunc) (void) = 0;

void loop() {
  static uint32_t prevTime;
  uint32_t curTime = millis();

  if ( curTime - prevTime >= 1*60*1000UL )
  {
    prevTime = curTime;
    resetFunc();
  }
  }

No comments:

Post a Comment

cara menyetting modul ADAM 4055

untuk merubah setting modul adam 4055 1. pasang power supply dan kabel data rs485 2. jumper terminal init ke terminal (b) GND