2021년 12월 25일 토요일

ESP-07 arduino pinmap

 


programming 

1. RESET, GPIO0  ==> GND

2. RESET  ==> OPEN

3. GPIO  ==> OPEN

4. arduino program download

5.Running stub...
Stub running...
Configuring flash size...
Auto-detected Flash size: 1MB
Compressed 265104 bytes to 195084...
Writing at 0x00000000... (8 %)
Writing at 0x00004000... (16 %)
Writing at 0x00008000... (25 %)
Writing at 0x0000c000... (33 %)
Writing at 0x00010000... (41 %)
Writing at 0x00014000... (50 %)
Writing at 0x00018000... (58 %)
Writing at 0x0001c000... (66 %)
Writing at 0x00020000... (75 %)
Writing at 0x00024000... (83 %)
Writing at 0x00028000... (91 %)
Writing at 0x0002c000... (100 %)
Wrote 265104 bytes (195084 compressed) at 0x00000000 in 17.4 seconds (effective 122.1 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...

6. Power Reset

Source ==================================================
/*
  ESP8266 BlinkWithoutDelay by Simon Peter
  Blink the blue LED on the ESP-01 module
  Based on the Arduino Blink without Delay example
  This example code is in the public domain

  The blue LED on the ESP-01 module is connected to GPIO1
  (which is also the TXD pin; so we cannot use Serial.print() at the same time)

  Note that this sketch uses LED_BUILTIN to find the pin with the internal LED
*/

#define LED_BUILTIN 5

int ledState = LOW;
unsigned long previousMillis = 0;
const long interval = 500;

int ledState1 = LOW;
unsigned long previousMillis1 = 0;
const long interval1 = 500;

void setup() {
  pinMode(LED_BUILTIN, OUTPUT);
  pinMode(4, OUTPUT);
}

void loop() {
  unsigned long currentMillis = millis();
  if (currentMillis - previousMillis >= interval) {
    previousMillis = currentMillis;
    if (ledState == LOW) {
      ledState = HIGH;  // Note that this switches the LED *off*
    } else {
      ledState = LOW;  // Note that this switches the LED *on*
    }
    digitalWrite(LED_BUILTIN, ledState);
    digitalWrite(4, ledState);
  }  
}

댓글 없음:

댓글 쓰기