I greet you all.
I must make a data acquisition system of measuring the temperature and atmospheric pressure.
I use this for data acquisition system, a sensor BMP080, a platform "Arduino Uno R3", a display LCD 1602 16X2 and the protocol of communications I2C.
Electronic layout is below.
I want to know how communication interface serial I2C on all electronic components,taking into account,as shown the electronic layout,with all the electronic components.
Can you explain me this phenomenon,from the perspective of the digital electronics,that digital behavior of electronic components,how to work a serial bus I2C,with all of the components?I mean,how can communicate those electronic components between them,how can achieve the data transfer in bits,where to store the data, on which the registry,when the electronic component can become a slave and other master?
In terms of digital,how can achieve all the stages of processing of data,based on the I2C communication protocol?
Sketch the used by me is:
#include <Wire.h>
#include <LCD.h>
#include <LiquidCrystal_I2C.h>
#include <Adafruit_BMP085.h>
Adafruit_BMP085 bmp;
#define I2C_ADDR 0x27
#define BACKLIGHT_PIN 3
#define En_pin 2
#define Rw_pin 1
#define Rs_pin 0
#define D4_pin 4
#define D5_pin 5
#define D6_pin 6
#define D7_pin 7
#define LED_OFF 1
#define LED_ON 0
LiquidCrystal_I2C lcd(I2C_ADDR,En_pin,Rw_pin,Rs_pin,D4_pin,D5_pin,D6_pin,D7_pin);
void setup()
{
lcd.begin (16,2);
lcd.setBacklightPin(BACKLIGHT_PIN,POSITIVE);
lcd.setBacklight(LED_ON);
if (!bmp.begin()) {
Serial.println("Could not find a valid BMP085 sensor, check wiring!");
while (1) {}
}
}
void loop()
{
float pressure = bmp.readSealevelPressure()/101.325;
pressure =pressure * 0.760;
lcd.clear();
lcd.backlight();
lcd.setCursor(1,0);
lcd.print("temp.= ");
lcd.print(bmp.readTemperature());
lcd.setCursor(14,0);
lcd.write(0b11011111);
lcd.print("C");
lcd.setCursor(1,1);
lcd.print("pres.= ");
lcd.print(pressure,0);
lcd.setCursor(11,1);
lcd.print(" mmHg ");
delay(500); //
}
Thank you very much for your help!