Statistics: Posted by ankitsingh0012 — Wed May 04, 2022 7:18 pm
Statistics: Posted by carlojoe — Mon Mar 14, 2022 11:21 am
Code:
-- start of relevant code
conn = nil
-- This code defines the variable "conn" as a command to create a client.
-- Documentation for net.createConnection can be found here. https://nodemcu.readthedocs.io/en/dev/en/modules/net/#netcreateconnection
-- The format of the variable & parameters are: net.createConnection(type, secure); i.e. Type = TCP
conn=net.createConnection(net.TCP, 0)
-- This code attempts to connect to the IFTTT Maker channel on port 80.
-- Documentation for the :dns function can be found here: https://nodemcu.readthedocs.io/en/dev/en/modules/net/#netsocketdns
-- If a connection can be made, then the connection function below will be executed, and the IP address printed.
conn:dns("maker.ifttt.com",function(conn,ip)
-- When connected to computer wifi, "ip" returns true and executes block. When connected to home wifi "ip" returns false and the block is not executed.
if (ip) then
print("We can connect to " .. ip)
conn:connect(80,ip)
else
dofile("3_delay.lua")
end
end)
-- end of relevant code
Statistics: Posted by carlojoe — Sat Mar 05, 2022 1:31 pm
Statistics: Posted by kali00 — Sat Feb 05, 2022 7:09 pm
Statistics: Posted by ab_d — Tue Jul 20, 2021 2:14 pm
Statistics: Posted by Her Mary — Tue Jul 20, 2021 10:39 am
Statistics: Posted by Her Mary — Tue Jul 20, 2021 10:38 am
Statistics: Posted by ab_d — Mon Jul 19, 2021 3:40 pm
Statistics: Posted by halu — Fri Jun 04, 2021 5:37 am
Statistics: Posted by zzf — Thu Apr 29, 2021 5:57 pm
Statistics: Posted by jerremyhamston — Wed Feb 17, 2021 2:45 pm
Statistics: Posted by lindaperryly — Tue Feb 02, 2021 6:58 pm
Statistics: Posted by Mauro.Felix — Sat Jan 23, 2021 11:31 pm
Statistics: Posted by Her Mary — Wed Nov 25, 2020 11:52 am
Statistics: Posted by idhe — Fri Nov 13, 2020 9:32 pm
Statistics: Posted by handoi — Fri Oct 02, 2020 4:03 pm
Statistics: Posted by Guest — Sat Mar 28, 2020 8:53 pm
Statistics: Posted by Deous — Thu Mar 19, 2020 7:32 am
Code:
Install Git For Windows
Install Python 3.x (ESP-IDF makes a note that their may be issues with 3.x and to use 2.7)
Install CMake For Windows
When the installer asks for Install Options, select ‘Add CMake to the system PATH for the current user’.
Download Ninja
Extract the executable file to the bin folder within CMake.
As CMake is now in the PATH environment variable, you won’t have to add another PATH.
Download the Toolchain
ESP-IDF https://dl.espressif.com/dl/xtensa-esp32-elf-gcc8_2_0-esp-2019r2-win32.zip
ESP8266 https://dl.espressif.com/dl/xtensa-lx106-elf-win32-1.22.0-100-ge567ec7-5.2.0.zip
Create a folder called esp32 (or esp8266)
Extract xtensa-esp32-elf (or xtensa-lx106-elf) folder into it.
Download the SDK
Open PowerShell and navigate to the esp32/esp8266 folder.
Run
git clone --recursive https://github.com/espressif/esp-idf.git
git clone --recursive https://github.com/espressif/ESP8266_RTOS_SDK.git
The folder structure will look like this
esp32 esp8266
|-- esp-idf |-- ESP8266_RTOS_SDK
└-- xtensa-esp32-elf └-- xtensa-lx106-elf
Install the Python dependencies
pip install -r "path\to\esp32\esp-idf\requirements.txt"
Statistics: Posted by mriksman — Mon Mar 16, 2020 1:25 pm
Statistics: Posted by Deous — Mon Mar 16, 2020 11:28 am
Statistics: Posted by mriksman — Mon Mar 16, 2020 5:38 am
Statistics: Posted by Deous — Mon Mar 16, 2020 4:47 am
Statistics: Posted by mriksman — Sun Mar 15, 2020 1:07 pm
Statistics: Posted by mriksman — Fri Mar 13, 2020 11:41 pm
Statistics: Posted by Deous — Fri Mar 13, 2020 11:31 pm
Statistics: Posted by Guest — Fri Mar 13, 2020 10:04 pm
Statistics: Posted by Deous — Tue Mar 03, 2020 11:33 pm
Statistics: Posted by Guest — Tue Feb 11, 2020 4:41 am
Statistics: Posted by Guest — Sat Feb 08, 2020 10:28 pm