Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

hocarm

🎯
Focusing
View GitHub Profile
View ESP8266_DHT22_Soil_RL_BT_auto_blynk.ino
/* Chương trình đọc nhiệt độ, độ ẩm từ cảm biến DHT
Thêm chức năng đọc cảm biến ánh sáng
Thêm chức năng đọc cảm biến độ ẩm đất
Thêm hiển thị LCD
Thêm chức năng điều khiển tưới tiêu bằng tay 2 bơm
HocARM NDTR BOT for ESP8266 by hocARM.org
// Kết nối
// DHT | ESP8266
//---------------------------
// VCC(1) | 3.3V
View I2C_Scanner.ino
#include <Wire.h>
void setup() {
Wire.begin();
Serial.begin(115200);
Serial.println("\nI2C Scanner");
}
void loop() {
byte error, address;
View demo.py
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri Dec 6 23:27:32 2019
@author: jaordonez
"""
numeros = 1 + 2 * 3/ 4
View NodeMCU_ESP8266_Thingspeak_2.ino
#include "ThingSpeak.h"
#include <ESP8266WiFi.h>
#include <DHT.h>
//---------------- Fill in your credentails ---------------------
char ssid[] = "xxx"; // your network SSID (name), tên wifi
char pass[] = "xxxxx"; // your network password, password
unsigned long myChannelNumber = 1; // Replace the 0 with your channel number, channel của bạn
const char * myWriteAPIKey = "xxxxx"; // Paste your ThingSpeak Write API Key between the quotes, write API key
//------------------------------------------------------------------
View NodeMCU_ESP8266_Thingspeak_1.ino
#include "ThingSpeak.h"
#include <ESP8266WiFi.h>
//---------------- Fill in your credentails ---------------------
char ssid[] = "xxx"; // your network SSID (name), tên wifi
char pass[] = "xxxxx"; // your network password, password
unsigned long myChannelNumber = 1; // Replace the 0 with your channel number, channel của bạn
const char * myWriteAPIKey = "xxxxx"; // Paste your ThingSpeak Write API Key between the quotes, write API key
//------------------------------------------------------------------
View AWS-ESP8266.ino
#include <ESP8266WiFi.h>
#include <AmazonIOTClient.h>
#include "ESP8266AWSImplementations.h"
Esp8266HttpClient httpClient;
Esp8266DateTimeProvider dateTimeProvider;
AmazonIOTClient iotClient;
ActionError actionError;
View smart_config_esp8266.ino
#include <ESP8266WiFi.h>
#include <WiFiUdp.h>
WiFiUDP Udp;
void setup() {
int cnt = 0;
//Khởi tạo baud 115200
Serial.begin(115200);
//Mode wifi là station
View ESP8266_MQTT_pubsub_mqttlen.ino
#include <ESP8266WiFi.h>
#include <PubSubClient.h>
const char* ssid = "wifi_name";
const char* password = "pass";
const char* mqttServer = "m12.cloudmqtt.com";
const int mqttPort = 10769;
const char* mqttUser = "your_username";
const char* mqttPassword = "your_password";
View esp32-blink.ino
View ESP8266_OLEDSPI.ino
/**The MIT License (MIT)
Copyright (c) 2016 by Rene-Martin Tudyka
Based on the SSD1306 OLED library Copyright (c) 2015 by Daniel Eichhorn (http://blog.squix.ch),
available at https://github.com/squix78/esp8266-oled-ssd1306
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions: