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
//Author: Vivekanand Dhakane | |
//updated on: 10 June 2020 | |
#include <Wire.h> | |
#include <avr/pgmspace.h> | |
#define OLED_I2c_ADDRESS 0x3C | |
// registers Addresses | |
#define COMMAND_REG 0x80 // B1000 0000 | |
#define DATA_REG 0x40 // B0100 0000 |
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 print_string(String string,byte x,byte y) | |
{ | |
for(int i=0; i< string.length();i++) | |
{ | |
char ch = string[i]; | |
byte x_cord = x+ i* Char_Horizontal_Columns_Required; | |
print_char(ch,x_cord,y); | |
} |
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 print_char(char ch, byte x_cord, byte y_cord) | |
{ | |
byte ascii_to_array_index = ch - First_char_ascii_code; | |
int char_start_in_array = ascii_to_array_index * No_of_bytes_Char + 1; | |
for (byte j = x_cord; j < x_cord + Char_Horizontal_Columns_Required; j++) | |
{ | |
for (byte i = y_cord; i < y_cord + Char_Verticle_Pages_Required; i++) | |
{ | |
setCursor(j, i); |
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
//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 |
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
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]); | |
} | |
} |
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
//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 |
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
//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 |
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
/*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" |
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
//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; |
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
//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 |
NewerOlder