Search found 2 matches
- Thu Oct 10, 2019 7:01 pm
- Forum: ESP8266 boards
- Topic: Door sensor with ESP8266
- Replies: 3
- Views: 2507
Re: Door sensor with ESP8266
I found the problem. It was code and the wiring. I've changed it to Pin5 which is GPIO1 and the code is this. import os import urequests import machine import time from time import sleep from machine import Pin def connect(): import network ssid = "" password = "" station = network.WLAN(network.STA_...
- Thu Oct 10, 2019 5:49 pm
- Forum: ESP8266 boards
- Topic: Door sensor with ESP8266
- Replies: 3
- Views: 2507
Door sensor with ESP8266
Hello! I'm new to programming esp boards but I'dont know if problem is with my wiring or the code. I've connected sensor to the GND and D02 and when the doors are closed it should open link and go to deep sleep. Instead it stays open all the time. Here is the code: import os import urequests import ...