Been working on this for weeks and dont know what the faults are

This is meanth to be a DTH11 sensor that measures temp and humidity and can open or close a window in a greenhouse with a 12v dc actuator
but i cant get the code without faults

Arduino: 1.8.13 Hourly Build 2020/03/16 09:33 (Windows 10), Board:“Arduino Uno”

C:\Users\Tim\OneDrive\Documenten\vocht_en_temp_meting\vocht_en_temp_meting.ino:8:0: warning: “relayPin” redefined

#define relay1Pin 7

C:\Users\Tim\OneDrive\Documenten\vocht_en_temp_meting\vocht_en_temp_meting.ino:7:0: note: this is the location of the previous definition

#define relay2Pin 6

C:\Users\Tim\OneDrive\Documenten\vocht_en_temp_meting\vocht_en_temp_meting.ino: In function ‘void setup()’:

vocht_en_temp_meting:26:17: error: expected primary-expression before ‘,’ token

pinMode(RELAY1,OUTPUT);

^

vocht_en_temp_meting:27:17: error: too few arguments to function ‘void pinMode(uint8_t, uint8_t)’

pinMode(RELAY2)OUTPUT):

^

In file included from sketch\vocht_en_temp_meting.ino.cpp:1:0:

C:\Users\Tim\Downloads\arduino-nightly-windows\arduino-nightly\hardware\arduino\avr\cores\arduino/Arduino.h:134:6: note: declared here

void pinMode(uint8_t pin, uint8_t mode);

^~~~~~~

C:\Users\Tim\OneDrive\Documenten\vocht_en_temp_meting\vocht_en_temp_meting.ino: In function ‘void loop()’:

vocht_en_temp_meting:33:10: error: expected primary-expression before ‘.’ token

if (DHT.tempValC>32){

^

vocht_en_temp_meting:34:24: error: expected primary-expression before ‘,’ token

digitalWrite(RELAY1,HIGH);

^

vocht_en_temp_meting:36:24: error: expected primary-expression before ‘,’ token

digitalWrite(RELAY1,LOW);

^

vocht_en_temp_meting:39:10: error: expected primary-expression before ‘.’ token

if (DHT.Humidity>80){

^

vocht_en_temp_meting:40:24: error: expected primary-expression before ‘,’ token

digitalWrite(RELAY1,HIGH):

^

vocht_en_temp_meting:42:26: error: expected primary-expression before ‘,’ token

digitalWrite(RELAY1,LOW);

^

vocht_en_temp_meting:45:11: error: expected primary-expression before ‘.’ token

if (DHT.tempValC<25) {

^

vocht_en_temp_meting:46:24: error: expected primary-expression before ‘,’ token

digitalWrite(RELAY2,HIGH);

^

vocht_en_temp_meting:48:26: error: expected primary-expression before ‘,’ token

digitalWrite(RELAY2,LOW);

^

exit status 1
expected primary-expression before ‘,’ token

Dit rapport zou meer informatie bevatten met
“Uitgebreide uitvoer weergeven tijden compilatie”
optie aan in Bestand → Voorkeuren.

I see lots of syntax errors.

Post your ENTIRE code and I will take a look at it.

Good You send the error report but please use code tags and, most important, use an IDE formatted code attached in code tags, up to the left in this window to supply the source of the error report.

Can't you see the two problems here?

   pinMode(RELAY2)OUTPUT):

jremington:
Can't you see the two problems here?

   pinMode(RELAY2)OUTPUT):

I see possibly 3. He defines relay1Pin as 7 and then uses RELAY1. Im also sure his nesting is out of whack and that's why he cant figure out the problems.

brackets { } , and semicolons ; are very important.
If there's one missing or extra you get those errors.

Maybe you could post your code

errors are the results of some problem. although it can be helpful to know about errors, there is no way we can help you solve the actual problem.

as for errors, I like this function

void pinMode(uint8_t pin, uint8_t mode);

Hi,
Welcome to the forum.

Please read the post at the start of any forum , entitled "How to use this Forum".
OR
http://forum.arduino.cc/index.php/topic,148850.0.html.
Then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.

Thanks.. Tom.. :slight_smile:

TomGeorge:
Then look down to item #7 about how to post your code.

Or serial output/ error messages.