Sunday, 24 March 2024

ESP01 ESP8266 Program Upload using USB to UART/ESP8266 Adapter Programmer

Requirements

ESP01

USB to UART/ESP8266 Adapter Programmer 

Push Switch


ESP01 Setup

1. Connect switch button to below pins of "USB to UART/ESP8266 Adapter Programmer".

2. Insert ESP01 to "USB to UART/ESP8266 Adapter Programmer" like below.

3. Insert USB to Computer / Laptop by pressing the Push Switch Button.


Configure Auduino IDE

1. Open Arduino IDE.

2. Go to File > Preferences.


3. Put below url in "Additional board manager URLs" (Use comma (,) for multiple URLs) > OK.


http://arduino.esp8266.com/stable/package_esp8266com_index.json


4. Go to Tools > Board > Board Manager.



5. Install Board - Search with "esp8266" and install the board "esp8266 by esp8266 community".


6. Choose Board - Tools > Board > esp8266 > Generic ESP8266 Module.



7.  Choose correct COM port - Tools > Port > Select your COM port.


8. Upload you code by clicking the upload button.




Friday, 17 November 2023

Linux wait for process to complete

Replace "sleep 10" with your program.


#!/bin/bash

spinner() {

 PID=$!

 echo "Please Wait..."

 while [ -d /proc/$PID ]; do

  text='/-\|'

  delay=".5"

 for i in $(seq 0 3) ; do

  printf "\r[ ${text:$i:1} ]"

  sleep ${delay}

  done

 done

 }


 mainprogram()

 {

  sleep 10

 }


 mainprogram &

 spinner

 echo ""

ESP01 ESP8266 Program Upload using USB to UART/ESP8266 Adapter Programmer

Requirements ESP01 USB to UART/ESP8266 Adapter Programmer  Push Switch ESP01 Setup 1. Connect switch button to below pins of "USB to UA...