Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • This looks like what I want, thanks a lot! I have two questions. One, What does calling byte dehex(char c); at the beginning do? Two char *hin =input.c_str() is giving me an invalid conversion error from const char* to char* how should I fix that? Commented May 15, 2017 at 12:25
  • 1
    @ATE-ENGE, see edit 2 Commented May 15, 2017 at 15:08
  • Ok! that all seems to be working now. I seem to not be getting the same input and output though. If you could give me your thoughts on what might be going wrong. As an Example, the input 010307E40001C549 should return me (as ASCII \code) \01\03\07\E4\00\01\C5I or (as U8) [1,3,7,228,0,1,197,73] Instead I'm getting (as ASCII) \100~@\EE or (as U8) [16,48,126,64,238] Updated code is posted above Commented May 15, 2017 at 16:13
  • 1
    How do you know the input the Arduino gets is 010307E40001C549, and the output the Arduino sends [1,3,7,228,0,1,197,73]? Or is that what you sent to the Arduino, and received from it somewhere? Do you have a way for the Arduino to display debugging output? (All of that is info I'd need as basis for what to do next) Commented May 15, 2017 at 18:03
  • Got it working, the counting was off in two different places. I have working code posted above now. If you see any improvements though, I'd like to know :D Commented May 15, 2017 at 18:31