Re: error when create function

Hy

Sketch uses 4166 bytes (12%) of program storage space. Maximum is 32256 bytes. Global variables use 101 bytes (4%) of dynamic memory, leaving 1947 bytes for local variables. Maximum is 2048 bytes.

how i can fix this

MOHAMMEDIBRAHIM: Hy

Sketch uses 4166 bytes (12%) of program storage space. Maximum is 32256 bytes. Global variables use 101 bytes (4%) of dynamic memory, leaving 1947 bytes for local variables. Maximum is 2048 bytes.

how i can fix this

Fix what?

@MOHAMMEDIBRAHIM Please don't send private messages to ask people to help you, use the forum instead.

On top of that you didn't provide any information, you didn't even explain what the problem is you're facing.

Pieter

PieterP: @MOHAMMEDIBRAHIM Please don't send private messages to ask people to help you, use the forum instead.

On top of that you didn't provide any information, you didn't even explain what the problem is you're facing.

Pieter

*He hijacked someone else's thread! *

:(

.

spycatcher2k:
Hi - please post your FULL arduino code!

this the code

// Interfacing Arduino with DHT11 humidity and temperature sensor

// include LCD library code
#include <LiquidCrystal.h>
// include DHT library code
#include “DHT.h”

#define DHTPIN 8 // DHT11 data pin is connected to Arduino pin 8

// LCD module connections (RS, E, D4, D5, D6, D7)
LiquidCrystal lcd(7, 6, 5, 4, 3, 2);

#define DHTTYPE DHT11 // DHT11 sensor is used
DHT dht(DHTPIN, DHTTYPE); // Initialize DHT library

char temperature = "Temp = 00.0 C ";
char humidity = "RH = 00.0 % ";
void setup() {
// set up the LCD’s number of columns and rows
lcd.begin(16, 2);
dht.begin();
}

void loop() {
delay(1000); // wait 1s between readings
// Read humidity
byte RH = dht.readHumidity();
//Read temperature in degree Celsius
byte Temp = dht.readTemperature();

// Check if any reads failed and exit early (to try again)
if (isnan(RH) || isnan(Temp)) {
lcd.clear();
lcd.setCursor(5, 0);
lcd.print(“Error”);
return;
}

temperature[7] = Temp / 10 + 48;
temperature[8] = Temp % 10 + 48;
temperature[11] = 223;
humidity[7] = RH / 10 + 48;
humidity[8] = RH % 10 + 48;
lcd.setCursor(0, 0);
lcd.print(temperature);
lcd.setCursor(0, 1);
lcd.print(humidity);
}

@MOHAMMEDIBRAHIM
I do not welcome you sending private message. Not only I deleted it but will definitely not provide a single advice

You are on you own for this

You've already told us that the code compiles, so what is your problem?

TolpuddleSartre: You've already told us that the code compiles, so what is your problem?

His problem is that he's a troll, not worth our time.

TolpuddleSartre: You've already told us that the code compiles, so what is your problem?

this the error code :

Sketch uses 4166 bytes (12%) of program storage space. Maximum is 32256 bytes. Global variables use 101 bytes (4%) of dynamic memory, leaving 1947 bytes for local variables. Maximum is 2048 bytes.

The clue here is that in your "error code", the word "error" never appears. Not once. Ever.

(deleted)

spycatcher2k: Are you pressing compile instead of upload?

Don't feed the troll.

:)

Wondering how OP chose who to PM?- I got one too. Randomly picked members from other threads?