#include <LiquidCrystal_I2C.h>
#include <Wire.h>
int bodyMass=60;
int bodyHeight=67;
LiquidCrystal_I2C lcd(0x27,16,2);
void setup() {
Wire.begin();
Serial.begin(9600);
lcd.init();
lcd.backlight();
}
void loop() {
float BMI=bodyMass/bodyHeight;
// byte err,addr;
// int devices=0;
// for (addr = 1; addr < 127; addr++)
// {
// Wire.beginTransmission(addr);
// err = Wire.endTransmission();
// if (!err)
// {
// Serial.print("Address 0x");
// Serial.println(addr, HEX);
// devices++;
// }
// else if (err == 4)
// {
// Serial.print("Error at address 0x");
// Serial.println(addr, HEX);
// }
// }
// if (!devices)
// {
// Serial.println("Please connect your I2C device");
// }
// else{
lcd.clear();
lcd.setCursor(0,0);
lcd.print("BMI is:");
lcd.setCursor(0,1);
lcd.print(BMI);
// }
delay(10);
}