Serial Communication Mecanique
Sporting asleek and refined userinterface, AcquaVox is atop-quality emulation ofa world-class preamp.StradipadStradiPad is created to fulfill yourdemand for synthetic strings, synth padand acoustical string instruments tracksprocessing.
Serial communication software lets you trouble-shoot connection problems and log data from RS232, RS485, Modbus and TCP/IP instruments. Extract and capture data from the serial port. Quickly identify and correct communication errors. Control the state of the PC's serial port output lines and see the state of the serial port input lines. The Mercedes-Benz Vehicle Communication Software provides extensive vehicle-specific. Profinet-IO Serial Gateway The Anybus. Serial Applications The Anybus. The modern automobile may have as many as 70 electronic. This is the software for serial communication. Can communicate with a modem, a communication equipment, a measuring instrument.
Stage 1: ECHO ECHO
Parts Required:

MicroCode Studio allows you to receive and transmit serial data when the ICD process is executing. Serial data can be sent to a PICBasic HSERIN instruction using the ICD Serial In window. Serial data sent by a HSEROUT instruction is received and displayed using the ICD Serial Out window. It is essential that MicroCode.
- Computer
- USB cable
- Arduino UNO (or equivalent)
- Arduino IDE
Arduino Sketch
The above code was formatted using this siteSerial Communication Mecanique D
Instructions
Things to Try
STAGE 2: Delimiters
In the echo example in Stage 1 above, you would have noticed that when we used Serial.print(byteRead); that the values displayed one after another in a similar fashion to 12345678910.
You would have also noticed that Serial.println(byteRead); provided a line break between each value sent. And depending on the numbers sent, it could have looked like this:
12
34
56
78
91
0
Arduino Sketch
The above code was formatted using this site
Instructions
Arduino Sketch
The above code was formatted using this site
Instructions
1. Once the code has been uploaded to the Arduino, open the Serial Monitor once again and type the following sequence:

1+2= <enter>
You should get the following message sent back to Serial Monitor
1+2=3
Things to Try
1. Enter this sequence:10 <enter>
+ <enter>
10 <enter>
= <enter>
Result: 10+10=20
--------------------------------------------------------------------
2. Enter this sequence:
10 <enter>
20 <enter>
+5= <enter>
Result: 1020+5=1025
--------------------------------------------------------------------
3. Enter this sequence:
10+20+30= <enter>
Result: 10+2030=2040
I have specifically written this script to add two whole numbers together. If you start to introduce more complicated calculations, the results become unpredictable.
--------------------------------------------------------------------
4. Enter this sequence:
1.2+1.0= <enter>
Result: 12+10=22
Once again, I have only designed this script to handle whole numbers. Therefore, decimal points are ignored.
--------------------------------------------------------------------
5. Enter this sequence:
-5 + 10= <enter>
Result: 5+10=15
This script ignores the negative sign, and treats the -5 as a positive 5.

This is the last thing I want you to try before we go to the next stage:
6. Enter this sequence:
2147483646+1= <enter> Result: 2147483646+1=2147483647
2147483647+1= <enter> Result: 2147483647+1=-2147483648
Note that the maximum size of a 'long' number is 2147483647. If you add one to this number, the result is equal to the minimum size of a 'long' which is -2147483648.
STAGE 4: Sending doubles to Arduino : The double doubler
Up until now, I have tried to keep it simple using whole numbers, but there will come a time when you will want to send a fraction of a number through the Serial line.
IMPORTANT NOTE: When the Arduino sends a float or a double through the COM port using Serial.print() or Serial.println(), it will automatically send the number to 2 decimal places.
A number like 1.2345 will appear as 1.23, and a number like 1.9996 will appear as 2.00
To demonstrate this, we will get the Arduino to send these floats/doubles to the Serial Monitor.
Arduino Sketch
The above code was formatted using this site
When you open the Serial monitor (after you have uploaded the sketch above), you will notice the following output:
myDub1 (1.2345) :1.23
myDub2 (1.9996) :2.00
The blue text represents the string (or array of characters) being sent using lines 19 and 21.
The red text represents the actual double being sent using lines 20 and 22.
You will notice that myDub2 rounds to 2.00. This may or may not be what you want.
If you wish to increase the number of decimal places, then you will need to change lines 20 and 22 to the following:
20 Serial.println(myDub1,4);
22 Serial.println(myDub2,4);
The number 4 highlighted in red, indicates the number of decimal places you wish to send.
Try it ! And try changing this number to something bigger or smaller.
---------------------------------------------------------------------------------------------------
Ok - now that we understand this little Serial.print(double,decimals) trick, we will now get the Arduino to echo back a Double.
Serial Communication Mecanique De
Before we jump in, perhaps we should try and map out our strategy. For this we will choose a simple decimal to make it easier. So in this example, we will choose 0.1We will use the following 5 steps to echo the double back to the Serial Monitor:
Arduino Sketch
Things to Try
-----------------------------------------------------------------------
-----------------------------------------------------------------------
STAGE 5: Sending sensor data to the Serial Monitor
We know the Arduino is very good at copy-Cat games, how about getting the Arduino to send us some data from one of our sensors. We will use the Serial Monitor to view the sensor data.
Disconnect the USB cable, and hook up one of your favourite analog sensors to your Arduino. For simplicity, I am going to hook up a potentiometer as per the Fritzing sketch below.
Parts Required
- Arduino UNO (or equivalent)
- Computer with USB cable
- Breadboard
- Potentiometer
- 3 Wires
Arduino Fritzing Sketch
Once you have attached your sensor to the board, plug your USB cable into the Arduino, and upload the following sketch.
Arduino Sketch
Instructions
If you wish to continue with this tutorial (stage 6 and above), please follow this link: Serial Communication Stage 6 and above
If you like this page, please do me a favour and show your appreciation :
Visit my ArduinoBasics Google + page.
Follow me on Twitter by looking for ScottC @ArduinoBasics.
I can also be found on Pinterest and Instagram.
Have a look at my videos on my YouTube channel.
However, if you do not have a google profile..
Feel free to share this page with your friends in any way you see fit.