Problem withpointers
Posted: Wed May 18, 2016 11:49 am
Hi everyone!
I'm trying to make a project with Arduino IDE, but I can't make it works.
I have two variables:
And I want to make this association:
The code chrashes in the line *receivedbyserial = actualcharserial; and I don't know why...
Can you help me?
Thanks a lot!!
I'm trying to make a project with Arduino IDE, but I can't make it works.
I have two variables:
Code: Select all
char* receivedbyserial;
char actualcharserial;
And I want to make this association:
Code: Select all
if (Serial.available() > 0) {
actualcharserial = Serial.read();
*receivedbyserial = actualcharserial;
receivedbyserial++;
}
The code chrashes in the line *receivedbyserial = actualcharserial; and I don't know why...
Can you help me?
Thanks a lot!!