help with programing

help me with a code i want to compare number ( i need 1000 number) with serial if it same to make something

example 077895, 21547,4568..... compare with what receved from serial of SIM800 (+CLIP)

Are you trying to learn? Or wanting to pay someone to help you?
If the later… you will want to post this in the gigs & collabs sections…

If the former…

The idea behind it is…

  • You can only get one character at a time via incoming serial data…
  • So you want to collect the data as it comes in, and save it to a character array. or ‘cstring’… not a String (with a capital “S”)… as this is buggy and can lead to errors/crashes over time.
  • Once you have your incoming data saved… you can than ‘parse’ it… and cast/convert it to an INT

  • At that point you can do your conditional checking.

What does your comment of: "( i need 1000 number) " mean?

Are you saying you need to check your incoming serial data (number) against 1000 hard-coded values?

If so… then I would look into saving those into an array and loop through doing a compare against your incoming serial ‘value’ you just parsed above.