Thank you so much for the help.
The code runs fine for 6 scans, then it seems to overflow:
279 297 313 327 341 346 362 355 351 339
285 301 320 338 341 346 344 335 328 315
289 300 326 330 352 351 342 348 335 327
297 313 327 341 346 362 355 351 339 327
End
258 302 314 323 343 361 361 355 347 341
289 298 325 338 343 348 337 332 324 319
293 305 327 335 346 352 343 346 344 329
302 314 323 343 361 361 355 347 341 330
End
247 302 311 331 342 353 359 361 351 340
288 303 321 338 348 350 341 333 323 321
291 306 323 339 346 353 349 334 330 330
302 311 331 342 353 359 361 351 340 326
End
251 300 312 329 342 353 356 355 346 341
289 302 325 340 348 345 341 333 331 320
287 305 319 341 343 354 351 342 331 334
300 312 329 342 353 356 355 346 341 333
End
252 300 309 326 339 347 355 352 348 343
280 303 319 343 351 347 337 331 329 320
294 305 325 343 344 352 351 347 335 325
300 309 326 339 347 355 352 348 343 331
End
255 299 309 327 343 356 361 354 346 342
284 305 323 336 344 350 349 335 323 319
292 304 323 339 353 349 354 336 336 333
299 309 327 343 356 361 354 346 342 327
End
ArrayIndexOutOfBoundsException: Index 5 out of bounds for length 5
I don’t want to keep collecting all the data. What I want to do is each time a scan comes in, I write it to the screen, then wait for the next scan.