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 <ESP8266WebServer.h> | |
#include <ESP8266SSDP.h> | |
const char* ssid = "************"; | |
const char* password = "***********"; | |
ESP8266WebServer HTTP(80); | |
void setup() { |
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 <ESP8266mDNS.h> | |
#include <WiFiUdp.h> | |
#include <ArduinoOTA.h> | |
// Replace with your network credentials | |
const char* ssid = "YOUR_SSID"; | |
const char* password = "YOUR_PASSWORD"; | |
void setup() { |
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 <ESP8266WiFiMesh.h> | |
String exampleMeshName("MeshNode_"); | |
unsigned int requestNumber = 0; | |
unsigned int responseNumber = 0; | |
String manageRequest(const String &request, ESP8266WiFiMesh &meshInstance); | |
transmission_status_t manageResponse(const String &response, ESP8266WiFiMesh &meshInstance); |
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
void setup() { | |
pinMode(A0,INPUT); | |
Serial.begin(9600); | |
} | |
void loop() { | |
Serial.println(analogRead(A0)); | |
delay(100); | |
} |
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
void setup() { | |
pinMode(2,INPUT); | |
Serial.begin(9600); | |
} | |
void loop() { | |
if(digitalRead(2)==LOW){ | |
Serial.println("0"); | |
} | |
else{ |
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
from twilio.rest import Client | |
# Your Account Sid and Auth Token from twilio.com/console | |
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' | |
auth_token = 'your_auth_token' | |
client = Client(account_sid, auth_token) | |
message = client.messages \ | |
.create( |
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
from twilio.rest import Client | |
# Your Account Sid and Auth Token from twilio.com/console | |
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' | |
auth_token = 'your_auth_token' | |
client = Client(account_sid, auth_token) | |
message = client.messages \ |
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
import time | |
import Adafruit_SSD1306 | |
from PIL import Image | |
# Raspberry Pi pin configuration: | |
RST = 24 | |
disp = Adafruit_SSD1306.SSD1306_128_64(rst=RST) |
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
import time | |
import Adafruit_ADXL345 | |
accel = Adafruit_ADXL345.ADXL345() | |
print('Printing X, Y, Z axis values, press Ctrl-C to quit...') | |
while True: | |
# Read the X, Y, Z axis acceleration values and print them. | |
x, y, z = accel.read() | |
print('X={0}, Y={1}, Z={2}'.format(x, y, z)) |
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
import Adafruit_DHT | |
from time import sleep | |
sensor = Adafruit_DHT.DHT11 | |
pin = 4 | |
while(1): | |
humidity, temperature = Adafruit_DHT.read_retry(sensor, pin) | |
if humidity is not None and temperature is not None: | |
print('Temp={0:0.1f}* Humidity={1:0.1f}%'.format(temperature, humidity)) | |
else: |