Skip to content

Instantly share code, notes, and snippets.

/*
* IRremoteESP8266: IRServer - demonstrates sending IR codes controlled from a webserver
*
* An IR LED circuit *MUST* be connected to the ESP on a pin
* as specified by kIrLed below.
*
* TL;DR: The IR LED needs to be driven by a transistor for a good result.
*
* Suggested circuit:
* https://github.com/crankyoldgit/IRremoteESP8266/wiki#ir-sending
#include "ESP8266WiFi.h"
#include<ESP8266HTTPClient.h>
#include "DHT.h"
const char* ssid = "XXXXX";
const char* password = "XXXXXXX";
char server[] = "<<Your trial server URL>>";
char appKey[] = "<<Your Application keys>>";
author: mongoose-os
description: A Mongoose OS app skeleton
version: 1.0
libs_version: ${mos.version}
modules_version: ${mos.version}
mongoose_os_version: ${mos.version}
# Optional. List of tags for online search.
tags:
// Load Mongoose OS API
load('api_timer.js');
load('api_uart.js');
load('api_sys.js');
load('api_gpio.js');
// Uart number used for this example
let uartNo = 0;
// Accumulated Rx data, will be echoed back to Tx
let rxAcc = "";
let pin=16;
int id=99;
#include <SoftwareSerial.h>
String a;
SoftwareSerial sw(2, 3); // RX, TX
void setup() {
Serial.begin(115200);
Serial.println("Interfacing arduino with nodemcu");
sw.begin(115200);
}
(x, y) = np.where(mask == 255)
(topx, topy) = (np.min(x), np.min(y))
(bottomx, bottomy) = (np.max(x), np.max(y))
Cropped = gray[topx:bottomx+1, topy:bottomy+1]
# find contours in the edged image, keep only the largest
# ones, and initialize our screen contour
cnts = cv2.findContours(edged.copy(), cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE)
cnts = imutils.grab_contours(cnts)
cnts = sorted(cnts, key = cv2.contourArea, reverse = True)[:10]
screenCnt = None
# loop over our contours
for c in cnts:
# approximate the contour
peri = cv2.arcLength(c, True)
img = cv2.imread('4.jpg',cv2.IMREAD_COLOR)
img = cv2.resize(img, (620,480) )
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
gray = cv2.bilateralFilter(gray, 11, 17, 17)
edged = cv2.Canny(gray, 30, 200)
import cv2
import imutils
import numpy as np
import pytesseract
from PIL import Image
img = cv2.imread('4.jpg',cv2.IMREAD_COLOR)
img = cv2.resize(img, (620,480) )
/*
===========================================
Copyright (c) 2018 Stefan Kremser
github.com/spacehuhn
===========================================
*/
// ===== Settings ===== //
const uint8_t channels[] = {1, 6, 11}; // used Wi-Fi channels (available: 1-14)
const bool wpa2 = false; // WPA2 networks