+ 2
Is anybody who know about arduino and c++ communication by serial
if yes you can also contact me by my email dimpap5555@gmail.com
6 odpowiedzi
+ 3
have a look at the serial call/response example in the Arduino IDE. It includes a Processing sketch to be used with the Processing IDE on the computer side. Don't miss the basic flow control concept included in the example as it isa core concept ofdata exchange.
https://www.arduino.cc/en/Tutorial/SerialCallResponseASCII
+ 1
Yes, I am anybody that know about arudino, you have to ALT F4 to make it work.
0
Me a little bit :p maybe i can help you? exactly what are you need to know?
0
send and receive data thats all
0
First you open the serial port using Serial.begin(), to send data use Serial.write(data);, to receive data use these construction:
if (Serial.available() > 0) { // when serial port is avaible to read do:
incomingByte = Serial.read(); // read the incoming byte
Serial.println(incomingByte, DEC);
}
Example
//first program
void setup() {
Serial.begin(115200); // opens serial port in bps
while (!Serial); // wait for serial port to connect.
}
void loop(){
Serial.write(10); // send value 10
Serial.write(“hello”); // send string hello
delay(5000); // wait 5 second
}
//second program
void setup() {
Serial.begin(115200); //the same port
while (!Serial);
}
int incomingByte;
void loop(){
if (Serial.available() > 0) {
incomingByte = Serial.read(); // read the incoming byte
Serial.println(incomingByte, DEC);
}
}
If you would like to send bigger data then byte you should create a function to take Hightbyte and lowByte and send it.
To find out more about c/c++ and arduino you can look here:
https://www.arduino.cc/en/reference/serial
0
well this is not what i look for i look for Serial Communication Computer and Arduino Communication