This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to Split Array value Which send Phone

Hi everyone 

I want to sperate array data. For example phone send sifre[4] = {0x00, 0x01, 0x02, 0x03} and seperate my board 

how can i do it?

Parents
  • This doesn't make much sense. 

    Do you actually want to check led_state against your sifre array? Where does the data array come from? What kind of data type is led_state? If by data[4] you mean sifre[4], then sifre[4] is outside your data array's boundaries. You need to check sifre[3] to get the fourth byte in the array. 

Reply
  • This doesn't make much sense. 

    Do you actually want to check led_state against your sifre array? Where does the data array come from? What kind of data type is led_state? If by data[4] you mean sifre[4], then sifre[4] is outside your data array's boundaries. You need to check sifre[3] to get the fourth byte in the array. 

Children
  • Thanks Martin,

    I want to send a password to the development card from the mobile phone. for example, "1,2,3,4" if the incoming "1,2,3,4" is led_state on. how can i do it?

  • If you simply want to compare two arrays you can do it like suggested here for example: C program to compare two arrays.