0

How to convert this JS code to Java, if bytes in array "response[]" are unsigned?

  int i;
  byte crc = 0;
  for (i = 1; i < 8; i++) crc+=response[i];
  crc = 255 - crc;
  crc++;
  • 1
    looks like it is java `int i;` – Scary Wombat Jul 07 '17 at 05:48
  • 1
    it is code for arduino.https://github.com/jehy/arduino-esp8266-mh-z19-serial/blob/master/arduino-esp8266-mh-z19-serial-no-lcd.ino – Andrey Andreev Jul 07 '17 at 06:06
  • Welcome to Stack Overflow! We are a question-and-answer site, not a coders-for-hire service. Please narrow your question down to a specific coding question that would be on-topic for this site. See: [Why is "Can someone help me?" not an actual question?](http://meta.stackoverflow.com/q/284236) and [How to ask a good question when I'm not sure what I'm looking for?](https://meta.stackoverflow.com/questions/262527/how-to-ask-a-good-question-when-im-not-sure-what-im-looking-for) – Joe C Jul 07 '17 at 07:06

0 Answers0