3 temp sensor with voltage sensor

hello Guys im just recently learning arduino throughout internet then i want to make a system where i can monitor the 3 temp and voltage sensor using 1.3 inch I2C OLED. The Temp Sensor i have is DH11, DS1820, and DS18B20. Can Someone please help me :confused: :confused: :confused: :confused: :confused: :confused: :confused:

Have you tried a Google search? Believe me, you're not the first one to use this type of hardware.

First of all you have 5 separate tasks you need there, interfacing to 3 different temperature sensors,
measuring voltage (perhaps with a voltage divider), and driving a specific OLED display.

Attack each task separately in turn, only then combine the functionality - one step at a time, its the fastest
way!

You've not posted link to the datasheet or product page for your particular display - they vary, identifying
the specific one is vital.

MarkT:
one step at a time, its the fastest

Those of us with cupboards full of t-shirts realise that; trouble is it takes lots of t-shirts to realise that when someone with lots of t-shirts says that, they mean it :wink: (By which time you realised it yourself)

It's quite a paradox: it takes a certain maturity and wisdom to step back from the project at hand and work on the building blocks.

pylon:
Have you tried a Google search? Believe me, you're not the first one to use this type of hardware.

I already search for it many times im really a beginner at making personal codes hahah

MarkT:
First of all you have 5 separate tasks you need there, interfacing to 3 different temperature sensors,
measuring voltage (perhaps with a voltage divider), and driving a specific OLED display.

Attack each task separately in turn, only then combine the functionality - one step at a time, its the fastest
way!

You've not posted link to the datasheet or product page for your particular display - they vary, identifying
the specific one is vital.

//

i already searched a code sir a code for voltage and current sensor and a code for the 3 temperature sensor the thing is i dont know how to combine them into one because first the code that i search for voltage sensor is using a 0.96 inch OLED screen while the temperature sensor code was using 1.3 inch OLED. The only thing is i cannot combine them into one because im really a beginner sir HUHUUHUHUH

MarkT:
First of all you have 5 separate tasks you need there, interfacing to 3 different temperature sensors,
measuring voltage (perhaps with a voltage divider), and driving a specific OLED display.

Attack each task separately in turn, only then combine the functionality - one step at a time, its the fastest
way!

You’ve not posted link to the datasheet or product page for your particular display - they vary, identifying
the specific one is vital.

THIS IS THE TEMPERATURE CODE THAT I SEARCHED SIR,

#include <DallasTemperature.h>
#include <DHT.h>
#define DHTPIN 12
DHT dht(DHTPIN, DHT11);
#include β€œU8glib.h”
U8GLIB_SH1106_128X64 u8g(U8G_I2C_OPT_NO_ACK);

#define BUS 2
OneWire oneWire(BUS);
DallasTemperature s1(&oneWire); // KY001
DallasTemperature s2(&oneWire);

void kotobuki_zed(void)
{

float t = dht.readTemperature(); //DHT11 (Temperature)
float h = dht.readHumidity(); // DHT11 (Humidity)

u8g.setFont(u8g_font_unifont);
u8g.setPrintPos(0, 10);
u8g.print(β€œCOLD.T:”);
u8g.setPrintPos(65, 10);
u8g.print(s1.getTempCByIndex(0)); // (18B20 Prob & KY001)
u8g.setPrintPos(108, 10);
u8g.print(β€œC”);

u8g.setPrintPos(0, 25);
u8g.print(β€œHOT .T:”);
u8g.setPrintPos(65, 25);
u8g.print(s1.getTempCByIndex(1));
u8g.setPrintPos(108, 25);
u8g.print(β€œC”);

u8g.setPrintPos(0, 40);
u8g.print(β€œBASE.T:”);
u8g.setPrintPos(65, 40);
u8g.print(t);
u8g.setPrintPos(108, 40);
u8g.print(β€œC”);

u8g.setPrintPos(0, 55);
u8g.print(β€œHUMID :”);
u8g.setPrintPos(65, 55);
u8g.print(h);
u8g.setPrintPos(108, 55);
u8g.print("%");

}

void setup(void)
{
Serial.begin(9600);
s1.begin(); // sensor 1
s2.begin(); // sensor 2
dht.begin();
}

void loop(void)
{

s1.requestTemperatures(); //(Send the command to get temperatures)
s2.requestTemperatures();

// picture loop
u8g.firstPage();
do {
kotobuki_zed();
} while( u8g.nextPage() );
delay(500);
}

THIS IS THE SECOND CODE THAT IS SEARCH IT’S USING 0.96 INCH OLED

#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
Adafruit_SSD1306 display;

const int currentSensor = A0;
const int voltageSensor = A1;
float vOUT = 0.0;
float vIN = 0.0;
float R1 = 10000.0;
float R2 = 1500.0;
float Vdata = 0;
float V,I,I1;
float Cdata=0;
float value=0;

void setup(){

display.begin(SSD1306_SWITCHCAPVCC, 0x3C);
display.clearDisplay();
display.setTextColor(WHITE);
display.setTextSize(1);
display.display();

}
void loop(){
float vIN = 0.0;
for(int i = 0; i < 300; i++)
{
Cdata = Cdata + analogRead(currentSensor);
Vdata = Vdata + analogRead(voltageSensor);
delay(1);
}

Cdata=Cdata/300;
V=(((Cdata/1024.0)*5000)-500)*1000/65.9909;
I=(((V - 2500)/ Cdata)-53.69); // sensitivity of the ACS714 current module

Vdata=Vdata/300;
vOUT = (Vdata * 5.0) / 1024.0;
vIN = (vOUT / (R2/(R1+R2)));
display.setTextColor(WHITE);
display.setTextSize(2);
display.setCursor(50,0);
display.print(" WATTS");
display.setCursor(0,0);
display.setTextSize(2);
value=(I * vIN);
if (value<0){display.println(β€œ0.0”);}
else {display.println(value);}
display.setTextSize(2);
display.setCursor(50,25);
display.print(" AMPS");
display.setCursor(0,25);
display.setTextSize(2);
if (I<0) {display.println(β€œ0.0”);}
else {display.println(I);}
display.setTextSize(2);
display.setCursor(50,50);
display.print(" VOLTS");
display.setCursor(0,50);
display.setTextSize(2);
display.println(vIN);
display.display();
display.clearDisplay();
Cdata=0;
I=0;
V=0;
Vdata=0;
vIN=0;
value;
}

THIS IS THE OLED I HAVE 1.3 INCH OLED THIS IS THE LINK -

https://www.google.com/imgres?imgurl=https%3A%2F%2Fimages-na.ssl-images-amazon.com%2Fimages%2FI%2F610eZbQEe7L.AC_SL1001.jpg&imgrefurl=https%3A%2F%2Fwww.amazon.com%2FDiymall-Serial-128X64-Display-Arduino%2Fdp%2FB016HVG0MM&tbnid=Y1hDeVInobHStM&vet=12ahUKEwi-_svD-qjoAhULwIsBHUagBCwQMygDegUIARD3AQ…i&docid=GJ-ksFxCSRuodM&w=883&h=882&q=1.3%20INCH%20OLED&client=opera&ved=2ahUKEwi-_svD-qjoAhULwIsBHUagBCwQMygDegUIARD3AQ

THIS IS THE SENSORS I HAVE, I HAVE TWO DS18B20 THIS IS THE LINK -

https://www.google.com/imgres?imgurl=https%3A%2F%2Fwww.twinschip.com%2Fimage%2Fcache%2Fcatalog%2FProducts%20Twins%20Chip%20Store%202020%2FShield%20Modules%2FSensors%2FDS18B20%20%20TO-92%20Digital%20Temperature%20Sensor%20Twins%20Chip%201-550x550.jpg&imgrefurl=https%3A%2F%2Fwww.twinschip.com%2FDS18B20-TO-92-Digital-Temperature-Sensor&tbnid=pAKRfmGTCCNdzM&vet=12ahUKEwj71c7k-qjoAhUIfpQKHR1WDpMQMygEegUIARDOAg..i&docid=_crG4y5k6qD-7M&w=550&h=550&q=ds18b20&client=opera&ved=2ahUKEwj71c7k-qjoAhUIfpQKHR1WDpMQMygEegUIARDOAg

AND DH11 -

https://www.google.com/imgres?imgurl=https%3A%2F%2Fwww.olimex.com%2FProducts%2FComponents%2FSensors%2FSNS-DH11%2Fimages%2Fthumbs%2F310x230%2FSNS-DH11-1.jpg&imgrefurl=https%3A%2F%2Fwww.olimex.com%2FProducts%2FComponents%2FSensors%2FSNS-DH11%2F&tbnid=DMOFolcVdVOqJM&vet=12ahUKEwibnb6L-6joAhUJTZQKHQ_-AggQMygAegUIARDrAQ..i&docid=WZ3hGDnao5wjwM&w=310&h=230&q=DH11&client=opera&ved=2ahUKEwibnb6L-6joAhUJTZQKHQ_-AggQMygAegUIARDrAQ

I WANT TO COMBINE THE TWO CODES INTO ONE AND USE THE 1.3 INCH OLED AS THE SCREEN BUT I DONT KNOW HOW PLEASE HELP ME PLEASE :confused: :confused: :confused: :confused: :’( :’(

blomcrestlight:
Those of us with cupboards full of t-shirts realise that; trouble is it takes lots of t-shirts to realise that when someone with lots of t-shirts says that, they mean it :wink: (By which time you realised it yourself)

It's quite a paradox: it takes a certain maturity and wisdom to step back from the project at hand and work on the building blocks.

im very sorry bro i have no idea what do you mean, you see im just a newbie in arduino

im very sorry bro i have no idea what do you mean, you see im just a newbie in arduino

It means you should start with just one sensor. Find a code that reads the sensor and transmits the result to the controlling PC. Once you understood how that code works, you can try to add your display. Write the measurement result to that display. Once you understood (not just copied) that code too, you can add a second sensor. And so on.

Understanding means learning. Without learning you will stay being a newbie in Arduino...

In other words, start with basics. Get some simple projects working, which will teach you a great deal. In order to combine devices, you need to know how they work individually first.

Then, compare two of your projects and see how they differ. Alter things, see what happens. Experiment, it's is the best way to understand.