Hi, I have been having trouble with using RS485's to perform a master - slave serial communication. I am trying to get the value of a potentiometer to display on an lcd screen. the potentiometer is hooked up to the master, and the lcd screen is hooked up to the slave. When i look at the serial monitor for the master, i can see the potentiometer readings, but they aren't being translated to the slave. I am very knew to programming, so if there is any additional information you would need to help me out just let me know. Slave and master codes are both attached
I'm using 2 arduino's and 2 RS485's. I have the RS485's connected to their respective arudino's with 'DI -> TX' 'RX -> RO' 'DE&RE -> 8' and I have the 'a' & 'b' ports of the rs485's connected
I've managed to get it to somewhat work since posting in this forum, but now the screen says 'PWM FROM MASTER 48' and won't change with the rotation of the potentiometer. I started the program with the potentiometer at '1023', but it still shows '48'.
Again, if there's any additional information you might need, just ask.
I'm using an arduino uno as the master, and an arduino mega as the slave. I've attached the wiring setup, but i've switched the arduino nano with my mega. Do you have a suggestion on what i should change that line of code to?
And sorry for not adding a link the the RS485's i just don't know what that means
And sorry for not adding a link the the RS485's i just don't know what that means
It means you should add a link to the schematics of the hardware you're using! I know of at least a dozen boards that provide a RS485 to TTL interface and the differences between them may matter.
Do you have a suggestion on what i should change that line of code to?
I guess
int pwmval = Serial.parseIn();
might do the job but I cannot find an exact specification of your expectations in the existing posts.