This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Wire.h> | |
void setup() { | |
Wire.begin(); | |
Serial.begin(115200); | |
Serial.println("\nI2C Scanner"); | |
} | |
void loop() { | |
byte error, address; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
""" | |
Created on Fri Dec 6 23:27:32 2019 | |
@author: jaordonez | |
""" | |
numeros = 1 + 2 * 3/ 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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 | |
//------------------------------------------------------------------ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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 | |
//------------------------------------------------------------------ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <ESP8266WiFi.h> | |
#include <AmazonIOTClient.h> | |
#include "ESP8266AWSImplementations.h" | |
Esp8266HttpClient httpClient; | |
Esp8266DateTimeProvider dateTimeProvider; | |
AmazonIOTClient iotClient; | |
ActionError actionError; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int LED = 2; | |
void setup() { | |
pinMode(LED, OUTPUT); | |
} | |
void loop() { | |
delay(200); | |
digitalWrite(LED, LOW); | |
delay(200); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/**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: |
NewerOlder