Using DHT11 temp. and humidity sensor to measure & display the temp and humidity using an LCD without using any external libraries

I am not supposed to use any external libraries for any of the components and the libraries used should be user generated/defined. So far i can only display the temp and humidity using downloaded/external libraries:

`#include "LiquidCrystal.h"
LiquidCrystal lcd(8,7,6,5,4,3);
int sensorPin = 0;
 
void setup()
{
  Serial.begin(9600);
  lcd.begin(16,2);
}
 
void loop()
{
 
 int reading = analogRead(sensorPin);

 // measure the 5v with a meter for an accurate value
 //In particular if your Arduino is USB powered

 float voltage = reading * 4.68;
 voltage /= 1024.0;
 
 // now print out the temperature

 float temperatureC = (voltage - 0.5) * 100;
 Serial.print(temperatureC);
 Serial.println(" degrees C");

   lcd.setCursor(0,0);
   lcd.print("Temperature Value ");
   lcd.setCursor(0,1);
   lcd.print(" degrees C");
   lcd.setCursor(11,1);
   lcd.print(temperatureC);
 
 delay(100);
}

May you help out. Thanks!

Is that some kind of homework or why is there a requirement to not use a library?

How should the help look like? Should we write a full code for you?

Wow...
We must have the exact parts make/model and a link to their online specs (if possible.)

It is possible to do as the prof asked, but external parts line LCD and sensors have "requirements" that must be provided by the microcontroller... these timing and electrical requirements are usually the stuff done by library code.

Correct me if I misrepresent what I think you are using:

It's an assignment, but i have no idea how to do it without external libraries

I have all the hardware. The coding part is the issue.

I think the request is legitimate...
Many instructors these days are steering students to online to secure assistance... it is the new world we live in. Plus, TA and some profs are just plain lazy. Whatever the specifics, asking for help & direction is a long way from "give me a code..." that I often see.

Ray

Have you got the data sheets for the components ?

No nothing

Could you help with direction, as i said earlier i have no idea how to do this

Then I suggest that you get them

Are you allowed to "borrow" code from existing libraries, or at least look at it ?

Not the ???
We need specifics, like what Arduino model.

You need to look at the links I used, are your parts the same? You need to find and link specific datasheets for the parts. The datasheets are absolutely the most valuable component as they indicate electric and timing parameters that the (your) software must provide.

Added: here is what I think is your DHT11:
DHT11 Manual Datasheet by Adafruit Industries LLC | Digi-Key Electronics (digikey.com)

Correct?

We should be allowed to borrow code

The look at the code in the appropriate libraries, but you did say

Yes that's the DHT11 i have. The arduino is UNOR3 and the LCD is an i2C

Can you briefly provide how much prior instruction you have with Arduino?
1 class, 2 classes, a year?
How many projects have you completed? Level of complexity, that is, just classwork or more complex and independent effort?

This is my first project. i have had few classes

Were I approaching this, I would start with a fully working example to verify that the libraries, the Uno, and the wiring are all working.
That means continue your code until you get temperature and humidity readings using libraries.
Post fully working code.

Create your own code for each peripheral one at a time, verifying it works properly.

I would write the main code using existing libraries, get that working properly, then replace each library with your own code one at a time.

Why would an instructor give an assignment of this difficulty as a first project to inexperienced students????

Are you absolutely certain the prof gave the assignment to not use libraries? Pretty aggressive assignment... but do-able with serious effort.