vb.net - Parse comma-separated values in vb -
vb.net - Parse comma-separated values in vb -
i having arduino , getting info serially in comma-separated values. want segregate info , set text box, question how can parse info in vb info displayed on text box every 1s
int count1; int count2; int count3; int count4; int count5; float sensor_out1; float sensor_out2; float sensor_out3; float sensor_out4; float sensor_out5; void takereading() { count1 = analogread(a1); count2=analogread(a2); count3=analogread(a3); count4=analogread(a4); count5=analogread(a5); sensor_out1= 0.0336666666667*count1 - 17.10; sensor_out2= 0.0336666666667*count2 - 17.10; sensor_out3= 0.0336666666667*count3 - 17.10; sensor_out4 = 0.0336666666667*count4 - 17.10; sensor_out5= 0.0336666666667*count5 - 17.10; } void setup() { serial.begin(9600); } void loop() { takereading(); serial.print(sensor_out1); serial.print(","); serial.print(sensor_out2); serial.print(","); serial.print(sensor_out3); serial.print(","); serial.print(sensor_out4); serial.print(","); serial.println(sensor_out5); delay(1000); }
to parse comma separated value
, aka csv
, can utilize split
method.
dim csvvalues string = "1,2,3,4,5,6,7,8,9" dim arrayofvalues() string = csvvalues.split(","c) 'c after final quote forces string char datatype
vb.net parsing
Comments
Post a Comment