ArduinoArduino Projects

how to split a string message and access the sensors values design and programming

split a string message


split a string message- In this tutorial, you will learn how to send multiple values in one message from Arduino to

 Visual Basic application and then how to break string message and separately view each value. We’re going to use comma in this project, “as the delimiter.To explain this, to receive message and then split the message using the split function, we will make an application in’s visual

This tutorial will help you to model advanced level projects that track multiple sensors. Read this post or watch video from start to finish at the end of this article to learn how to split a string and access the values of the sensors sent from the Arduino to the basic visual application. The languages used for programming are

  1. visual basic 2010 express edition and
  2. Arduino Uno IDE.

The programming of Arduino takes place in language. This tutorial will cover application design, a complete explanation of the circuit diagram, interfacing of the LDR and variable resistor, programming and testing of the  controller.

The Amazon Purchase links are given below:

Arduino Uno:
Mega 2560:
lm7805 Voltage Regulator:
330-ohm resistors pack:
female DC power jack socket:
470uf capacitors:
5×7 cm Vero board:
female headers:
connection wires:
Super Starter kit for Beginners:
Jumper Wires:
Bread Board:
12v Adaptor:
PCB plate:
Variable Supply:
Digital Multimeter:
Vero Board / stripboard:
Soldering iron kit: “best” You guys should definitely purchase this:
Solder wire:
Wire Stripper:
PCB small portable drill machine:


Please Note: these are affiliate links. I may make a commission if you buy the components through these links. I would appreciate your support in this way!

About the LDR:

split a string message

LDR stands for “LIGHT DEPENDENT RESISTOR.” LDR is essentially a resistor that changes its resistance with the amount of light falling on the LDR. The resistance decreases as the light intensity increases. While the resistance decreases with the decrease in light intensity. So we can say an LDR is a variable resistor whose light regulates the resistance.

LDR’s basic operating theory is the same as the normal resistor. The LDR also has no polarity, unlike other resistors, so it doesn’t matter how you link the LDR’s two arms. The variable resistor with another 10k resistor will be used in this project in order. So a voltage divider will be created by the LDR and the 10k resistor. The voltage at the middle of the LDR and 10k resistor will change as the light changes.

The voltage divider circuit output will be attached to the Arduino or Mega analog pin. Instead, using arduino programming, we read the LDR value and combine it with the variable resistor value and then send the entire message to the software request.Where the values are divided and displayed in the desired boxes.


split a string message Arduino Programming:

The textForSMS function of the String form will be used to create complete message consisting of the LDR and  comma separated variable resistor values. Then set another form integer parameter “ldr” and assigned it 

to the Arduino’s analog pin A1. Now we’re going to refer to the A1 analog pin as the ldr. From now on, the A1’s name will be ldr. Pin A2 was similarly defined and a name vresistor was assigned. Then I defined two ldata and vdata type integer variables.

Each Arduino and Mega Program has at least two functions that are the void stage and void loop functions, as you know my mates. Void means that no values are returned by these functions, while empty parenthesis means that no arguments are taken as input by these functions. I enabled serial communication using the Serial.begin() function to set the baud rate to 9600 to set the serial communication. That’s the speed of contact. Then I set the resistor ldr and variable as the output. Another thing about the void setup feature is that, when the arduino or super board is powered up, it only runs once.

We read both the “LDR and vresistor” sensors in the void loop and store the values in the ldata and vdata variables. Then we add both comma values as separators and store them in textForSMS function. Then we send this message to the computer application with the serial.println() function.

Finally, we remove the string and use 1000 milli second delay equal to one second.   The comma is used as the delineator for separating string message that is sent to the machine request.

split a string message Computer application designing and programming:

Watch Video Tutorial

Related Articles

One Comment

  1. This article is a shining example of the power of quality journalism to inform, educate, and inspire readers. The author’s writing is both substantive and engaging, and their commitment to presenting factual and balanced perspectives is truly commendable. What I love most about this article is its ability to tackle sensitive and controversial issues with nuance and sensitivity, providing readers with a deep and thorough understanding of important social and political issues. Overall, this article is a must-read for anyone looking to stay informed on important current events and social issues.

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button