WeMOS D1 mini: D1 read data

From OnnoWiki
Revision as of 11:52, 10 August 2022 by Onnowpurbo (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
/*
 * D1 read data
 * 
 *
 * 
 */

void setup() {
  pinMode(D1,INPUT);
  // initialize serial communications at 9600 bps
  Serial.begin(9600);
}

void loop() {
  in = digitalRead(D1); 
  Serial.println(in); 
  Serial.println("\n"); 
  delay(1000);
}