Hello ,
I want ot make 2 Arduino “talk” with serial connection
the first one “Server” -
#include <SoftwareSerail.h>
SoftwareSerial Device(3,4);
void setup()
{
Device.begin(4800);
Serial.begin(4800);
}
void loop()
{
for (int i=0;i<254;i++)
{
Serial.print(cahr(i));
Device.print(char(i));
Device.print(char(i));
delay (150);
}
delay (2000);
}
when I look at the monitor I can see all the chars begin print.
now the server is connected via rs232-ttl to another Ardiono(client) to Pins 3,4
which have this code :
#include <SoftwareSerail.h>
SoftwareSerial Device(3,4);
void setup()
{
Device.begin(4800);
Serial.begin(4800);
}
void loop()
{
Device.listen();
while (Device.available() > 0 )
{
char InByte = Device.read();
if (InByte == 10 )
{
Serail.println("");
}
else
{
Serial.print(InByte);
}
}
}
I can see the data , but it’s in gibrish
ּ4«ז³f,cֶf0±ֶYֻ.cײe0ƒ¦3ֳ$ƒhA‹ֶֻ,cֶֻ,cֶ²ׁv׃,ƒ³f.›&™–,cֶּ0ֻ2kµµµµ²mµµµ’µ0†ֻ,c3–,c–Mc3˜*#˜dPM
Yֻ,cֶe,±ֶֻ,‹V˜ֹG“mּ1›f,cֻ,‹f3˜6c¦³ֳµ[mmµµµ[mmµµMֶּ*£ײ0¨M
Yֻ,cֶ–,cֶe,ֵV˜ֹP›f1ֵֶ3–0FjCƒ3››™–,cֶּׁf•2kר[mmµµµµ,ֶeESלj¦CYֽ8ƒ63«,cֶ–1ƒF3–,“vבµµµµ;µֻ,cֶe,±ֶֻ,c¦³ֳ$ƒh0ֵF³ֻ0»ֶ5ֻ,cֶYֽ0ƒf•2kר«µ[mmµµµmµµµ«mµµµµ–Mƒז3׃,e4Sל4S±Yֻ,cֶe,±ֶֺES4©Mcfּ4sf–Vֶֻ,³3›,S&³…[mmµµµ«mµµµµµµG;#v5jCƒ31ƒ6f«,ֶֻ1ƒF3–,“–˜µµµ«µ,ֶֻ,cֶ²ׁv´«,ֶּ,ƒֶ3–0ƒֶf,ֱֶ3ּ,«ֶf–0ƒֶf,ƒֶ3ּ,»–˜’G;ֽf2‹&™™,ƒֶ3˜,ƒvf,ֱּ,ƒֶc[mmµµµµ«µµµmµµµµ5Mֻ,ƒ3•5k²¨Gmf1¡&,cֶe,‹f3ּ6c¦³fmµµµµµµµ5,±ֶ0ֶ™f
Yeּ±ֶֻ,cֶe*k¨Rfּׁז³f,±ֶֻ,‹f3ּ6c¦³ֳµµµ[µ,ּ,k
0³—ֶֽ5–,cֶY›0ƒfe25µ[mm5µ[mm
waht could be the problem ?
do I need to overcome the rs232-ttl device ? and send the data directly?
Thanks ,