kaworu

I am new, and I do not know what my mistake is, it marks me as an error,

exit status 1
request for member 'write' in 'dc', which is of non-class type 'int'

control_carro.ino (612 Bytes)

A person who is new needs to read the locked posts at the top of the forum, and anything that they link to. Then the new person would know to use code tags and to post code inline.

A better title may help also.

This line is not valid

dc.write(pinVal);

What are you trying to do?

...R

PS. Using your username as the title of your post does not make sense. The title should give some idea what you need help with.

PPS. for the future you should post the full error message which will have the line number.

Just guessing.
I think dc is meant to be a pin number.
Like this

int dc = 4; // pin 4

Because in setup() it's made an OUTPUT.

So in loop() {

digitalWrite(dc, pinVal); // write the pinValue to the dc pin (pin4)

Leo..

Hi,
Welcome to the forum.

Please read the first post in any forum entitled how to use this forum.
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: