INTRODUCTION:
SPECIFICATIONS:
CODE:
#include <LiquidCrystal.h>
#include <BlynkSimpleStream.h>
#include <SimpleTimer.h>
#define BLYNK_PRINT Serial
LiquidCrystal lcd(6, 7, 5, 4, 3, 2);
float volt = 0;
int analogPin = 0;
int raw = 0;
int Vin = 5;
float R1 = 1000;
float R2 = 0;
float buffer = 0;
byte omega[8] =
{
0b00000,
0b01110,
0b10001,
0b10001,
0b01010,
0b01010,
0b11011,
0b00000
};
char auth[] = "74287f4901e3471aa0ba6d11402fd363";
SimpleTimer timer;
void showVal() {
volt= (analogRead(A1)*55)/1023.0;
lcd.setCursor(9, 0);
lcd.print(volt);
raw= analogRead(analogPin);
if(raw){
R2= R1 * ((1023/raw)-1);
lcd.setCursor(4, 1);
lcd.print(R2);
lcd.print("");
}
}
void sendMulti() {
Blynk.virtualWrite(V0, volt);
Blynk.virtualWrite(V1, R2);
}
void setup() {
lcd.begin(16, 2);
lcd.print("VOLTAGE: ");
lcd.setCursor(15, 0);
lcd.print("V");
lcd.setCursor(0, 1);
lcd.print("R2: ");
lcd.createChar(1, omega);
lcd.setCursor(11,1);
lcd.write(1);
Debug console
Serial.begin(9600);
Blynk will work through Serial
Do not read or write this serial manually in your sketch
Serial.begin(9600);
Blynk.begin(Serial, auth);
timer.setInterval(1000L, showVal);
timer.setInterval(1000L, sendMulti);
}
void loop() {
Blynk.run();
timer.run();
}
#include <LiquidCrystal.h>
#include <BlynkSimpleStream.h>
#include <SimpleTimer.h>
#define BLYNK_PRINT Serial
LiquidCrystal lcd(6, 7, 5, 4, 3, 2);
float volt = 0;
int analogPin = 0;
int raw = 0;
int Vin = 5;
float R1 = 1000;
float R2 = 0;
float buffer = 0;
byte omega[8] =
{
0b00000,
0b01110,
0b10001,
0b10001,
0b01010,
0b01010,
0b11011,
0b00000
};
char auth[] = "74287f4901e3471aa0ba6d11402fd363";
SimpleTimer timer;
void showVal() {
volt= (analogRead(A1)*55)/1023.0;
lcd.setCursor(9, 0);
lcd.print(volt);
raw= analogRead(analogPin);
if(raw){
R2= R1 * ((1023/raw)-1);
lcd.setCursor(4, 1);
lcd.print(R2);
lcd.print("");
}
}
void sendMulti() {
Blynk.virtualWrite(V0, volt);
Blynk.virtualWrite(V1, R2);
}
void setup() {
lcd.begin(16, 2);
lcd.print("VOLTAGE: ");
lcd.setCursor(15, 0);
lcd.print("V");
lcd.setCursor(0, 1);
lcd.print("R2: ");
lcd.createChar(1, omega);
lcd.setCursor(11,1);
lcd.write(1);
// // Debug console
Serial.begin(9600);
// // Blynk will work through Serial
// // Do not read or write this serial manually in your sketch
Serial.begin(9600);
Blynk.begin(Serial, auth);
timer.setInterval(1000L, showVal);
timer.setInterval(1000L, sendMulti);
}
void loop() {
Blynk.run();
timer.run();
}
-->