Skip to content

Instantly share code, notes, and snippets.

View iampaulidrobo's full-sized avatar
🎯
Focusing

Piyush Tailor iampaulidrobo

🎯
Focusing
View GitHub Profile
void setup() {
// initialize digital pin 13 as an output.node mcu pin d7
pinMode(13, OUTPUT);
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(13, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(13, LOW); // turn the LED off by making the voltage LOW
@iampaulidrobo
iampaulidrobo / gist:8e6135088957528ce952c71a40cecb48
Created January 7, 2018 17:26
Wifi home automation using esp8266
//Code by Piyush tailor
#include <ESP8266WiFi.h>
const char* ssid = "Baaa";
const char* password = "naaaaaaa";
int ledPin = 13; // GPIO13
WiFiServer server(80);
@iampaulidrobo
iampaulidrobo / gist:32a9bc03d9a2c429ff47158251dd9012
Created January 7, 2018 17:19
Adafruit MQTT,DATA visuals,Temperature
//Code by PIYUSH TAILOR
#include "config.h"
float tempC;
int reading;
int tempPin = 0;
/************************ Example Starts Here *******************************/
@iampaulidrobo
iampaulidrobo / gist:75b6811485bb984dbccc2d7a28346457
Created January 7, 2018 17:18
Adafruit MQTT ,esp8266,Motor speed
//Code by Piyush Tailor
#include "config.h"
/************************ Example Starts Here *******************************/
// this should correspond to a pin with PWM capability
#define Motor_sense 13
// set up the 'analog' feed
AdafruitIO_Feed *Motor = io.feed("Motor");
@iampaulidrobo
iampaulidrobo / gist:5eb164db6d0478596f427aa56eec133c
Created January 7, 2018 17:17
Adafruit MQTT,brightness control
// Code by Piyush Tailor
#include "config.h"
/************************ Example Starts Here *******************************/
// this should correspond to a pin with PWM capability
#define LED_PIN 5
// set up the 'analog' feed
AdafruitIO_Feed *analog = io.feed("analog");
@iampaulidrobo
iampaulidrobo / gist:df562b88b19827d384136217a6266d0b
Created January 7, 2018 17:16
Adafruit MQTT ,esp8266,One LED control
Code by Piyush Tailor
#include "config.h"
/************************ Example Starts Here *******************************/
// digital pin 5
#define LED_PIN 13
// set up the 'digital' feed
AdafruitIO_Feed *LED1 = io.feed("LED1");
@iampaulidrobo
iampaulidrobo / gist:386bed2e1789ca148a4c703ed41dc530
Created January 7, 2018 17:15
Adafruit MQTT connection using Node MCU
Code by Piyush Tailor
#include "config.h"
/************************ Example Starts Here *******************************/
// digital pin 5
#define LED_PIN 13
// set up the 'digital' feed
AdafruitIO_Feed *LED1 = io.feed("LED1");
//Code by Piyush Tailor
#include <ESP8266WiFi.h>;
#include <WiFiClient.h>;
#include <ThingSpeak.h>;
const char* ssid = "Baaa";
const char* password = "naaaaaaa";
int val;
int tempPin = A0;