Skip to content

Instantly share code, notes, and snippets.

@vivekanandRdhakane
vivekanandRdhakane / CircuitBreaker.ino
Last active April 3, 2020 13:44
This code is for Circuit breaker
//Author: Vivekanand Dhakane
//Uploaded on: 2 March 2020
#include <ESP8266WiFi.h>
#define ctr 0 //D3 of NodeMCU
int count=0;
void setup() {
WiFi.disconnect();
WiFi.forceSleepBegin();
// initialize digital pin LED_BUILTIN as an output.
//Author: Vivekanand Dhakane
//Uploaded on: 4 April 2020
#include <Servo.h>
#define threshold 405
#define unpress_angle 70
#define press_angle 36
Servo myservo; // create servo object to control a servo
bool trig=true;
// ESP8266 Code for StokeMapak
// Author : Vivekanand Dhakane
// Updated on: 25/4/2020
#include "I2Cdev.h"
#include <ESP8266WiFi.h>
#include <WiFiUdp.h>
#include "MPU6050_6Axis_MotionApps20.h"
#if I2CDEV_IMPLEMENTATION == I2CDEV_ARDUINO_WIRE
#include "Wire.h"
//Processing Code for StokeMapak
//Auther: Vivekanand Dhakane
//Updated on: 25/4/20120
import controlP5.*;
import hypermedia.net.*;
ControlP5 cp5;
String textValue = "";
//Author: Vivekanand Dhakane
//Updated on: 28/4/2020
#include <ESP8266WiFi.h>
#define trigPin 0 //trig Pin to GPIO0
#define echoPin 2 //Echo Pin to GPIO2
int count;
////////////////
char ssid[] = "ShriRamNiwas"; // SSID of your AP
//Author: Vivekanand Dhakane
//Updated on: 28/4/2020
#include <ESP8266WiFi.h>
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#define highest_tank 91 // distance sensor reading in cm when tank is at lowest level
#define tank_offset 19 // distance sensor reading in cm when tank is Full
#define Total_tank_capacity 930 // Total Tank capacity in litres
int tank_fill_length = highest_tank - tank_offset;
/*Author: Vivekanand Dhakane
* updated on: 16 May 2020
*/
#include "FirebaseESP8266.h"
#include <ESP8266WiFi.h>
#define FIREBASE_HOST "data-logger-5684b.firebaseio.com" //Without http:// or https:// schemes
#define FIREBASE_AUTH "28fVOXd3EYLKAWCVMEcZ121NvSvRo5USOkssEcoi"
#define WIFI_SSID "Internet"
#define WIFI_PASSWORD "41450200"
//Author: Vivekanand Dhakane
//updated on: 10 June 2020
#include <Wire.h>
#define OLED_I2c_ADDRESS 0x3C
// registers Addresses
#define COMMAND_REG 0x80 // B1000 0000
#define DATA_REG 0x40 // B0100 0000
// commands
//Author: Vivekanand Dhakane
//updated on: 10 June 2020
#include <Wire.h>
#define OLED_I2c_ADDRESS 0x3C
// registers Addresses
#define COMMAND_REG 0x80 // B1000 0000
#define DATA_REG 0x40 // B0100 0000
// commands
@vivekanandRdhakane
vivekanandRdhakane / sending_data_to_display.ino
Last active June 20, 2020 08:18
code sniplet for displaying 16x16 matrix
for (int j = 0; j < Char_Horizontal_Columns_Required; j++) //#define Char_Horizontal_Columns_Required 16
{
for (int i = 0; i < Char_Verticle_Pages_Required; i++) //#define Char_Verticle_Pages_Required 2
{
setCursor(j,i);
writeData(data[j*Char_Verticle_Pages_Required+i]);
}
}