Arduino with Isis Proteus

Hello,

I have to display the temperature and the humidity with Arduino, Processing and to do a simulation with Isis Proteus. I'm not going to talk about Processing.

My Arduino code :

int temperature;

void setup()
  {
    Serial.begin(9600);
  }

void loop()
  {
  
    temperature = analogRead(A1);
    Serial.println(temperature);
    delay(1000);
  }

My temperature is done, now I want to code the humidity.
Can you help me to add a code for the humidity and the simulation ?

My simulation :

What I have to add for the humidity captor ?

My Isis Proteus file : https://www.zeta-uploader.com/1514178855

Best regards,

Can you help me to add a code for the humidity?

What sensor are you using to read the humidity?

and the simulation ?

Absolutely not.

PaulS:
What sensor are you using to read the humidity?

'k, I'm using the DHT11 temperature-humidity sensor.

Otosaka:
'k, I'm using the DHT11 temperature-humidity sensor.

So, why are you using analogRead()? That is NOT how to read that sensor. There are a variety of libraries that can read both temperature and humidity from that. Use one, and simply call the correct method.

PaulS:
So, why are you using analogRead()? That is NOT how to read that sensor. There are a variety of libraries that can read both temperature and humidity from that. Use one, and simply call the correct method.

I'm using analogRead() for the simulation as you can see in the screenshot of my simulation, the temperature is in the analogRead(A1) :slight_smile:

Now, I'm not going to do a simulation but with a real sensor, that's why my code is false. I'm trying to do something, I will update this post, thanks for you help !