Arduino ESP 8266 Скачать руководство пользователя страница 11

ESP8266 Quickstart Guide 

 

11 

 

Solution example to SOS: 

// S: ... 

// O: --- 

// S: ... 

// Please note for Ardudino 8266: DigitalWrite HIGH -> LED off; DigitalWrite LOW -> LED on;  

 

const byte ledPin = LED_BUILTIN; // specify which pin is connected to the LED (here built-in LED) 

const unsigned int delayTime = 300;  // specify delay time 

 

void setup() { 

pinMode(ledPin, OUTPUT); // set mode of ledPin to OUTPUT 

 

void loop() { 

    flash(delayTime); flash(delayTime); flash(delayTime); // S (three short pulses) -> see flash function below 

    delay(3*delayTime);                         // pause between letters 

    flash(3*delayTime); flash(3*delayTime); flash(3*delayTime); // O (three long pulses) 

    delay(3*delayTime);                       // pause between letters 

    flash(delayTime); flash(delayTime); flash(delayTime); // S (three short pulses) 

 

    digitalWrite(ledPin,HIGH); // turn off LED 

    delay(7*delayTime);                     // pause between words 

 

void flash(int flashDuration) 

  digitalWrite(ledPin,LOW);  // turn on LED 

  delay(flashDuration); // pause – keep LED on 

  digitalWrite(ledPin,HIGH); // turn off LED 

  delay(flashDuration); // keep LED turned off 

Содержание ESP 8266

Страница 1: ...from www arduino cc 3 Check if Windows automatically installs CP2112 USB UART driver Else download driver from https tinyurl com CP2112driver NOTE for MAC users Go to the Appendix at the back for help...

Страница 2: ...rt Guide 2 6 Include ESP8266 Board libraries Tools Board Board Manager Type ESP8266 and click on the found module to install 7 Select board NodeMCU 0 9 Tools Board NodeMCU 0 9 scroll down to find it C...

Страница 3: ...ESP8266 Quickstart Guide 3 8 Select port yours may be a different number COM X Tools Port COM 9 Set upload speed to 11500 or 9600 Tools Upload Speed 115200 or 9600 Ready for the first program...

Страница 4: ...rt 3 Morse code 12 Alter the blink program to Morse SOS Save the Blink program with name Morse_SOS_yourname 13 A few tips All timings are defined as multiples of one dot length A dash is three times t...

Страница 5: ...formation on our B Sc programme Go to www fotonik dtu dk on Network Technology and IT please visit Check out our education profile courses and research areas For questions feel free to contact B Sc He...

Страница 6: ...x Screenshots for MAC users Go to https tinyurl com CP2112driver and download the OSX driver See screenshot below After downloading open unzip the zip file and double click on the SiLabs USB Driver Di...

Страница 7: ...ESP8266 Quickstart Guide 7 After successfull installation you should see something like this After driver installation in Arduino IDE go to tho Tools Board manager and click on Boards Manager...

Страница 8: ...ESP8266 Quickstart Guide 8 In Boards Manager search for esp8266 and install this board Now go to Arduino IDE and open Tools Board menu You should now find NodeMCU Select NodeMCU 0 9 ESP...

Страница 9: ...ESP8266 Quickstart Guide 9 Finally to select the correct port go to Tools Port and select the one named something like SLAB_USBtoUART Now you can open the Blink sketch...

Страница 10: ...ESP8266 Quickstart Guide 10...

Страница 11: ...Time flash delayTime flash delayTime S three short pulses see flash function below delay 3 delayTime pause between letters flash 3 delayTime flash 3 delayTime flash 3 delayTime O three long pulses del...

Отзывы: