0

I am new to the RFID Scene and Serial communication as well.

So I am trying to use the RC522 RFID module and I wrote in block 22 - 0x36 which is 6. I want to write a code where I take whatever is in block 22 - 0x36, convert it into a float - 6.00 and then do some addition or deduction for example 6.00-2.5 = 3.5 and then I want to rewrite the value of 3.5 into that same sector but of course, convert it back to HEX ASCII - 33 2e 35. I've tried quite hard to find the solution online but couldn't. So is this possible to do?

Thanks.

  • yes, it is possible to do ... do you have any real questions? – jsotola May 19 at 18:47
  • 1
    why do you need to convert to hex? ... 0x36, 54, '6', 0b00110110 are all the same data ... the only difference is the human readable form ... it is like uno, one, ichi, eins all being the same thing – jsotola May 19 at 18:51
  • can you provide a simple code then? I am having a problem with substracting the byte buffer with some number. – tsotniuspious May 19 at 19:47
  • It is unclear to me, what exactly you have and what you want to do with it. Do you have a character buffer with hex in ASCII format? And then you wanto to make some float calculation to it? Please provide the code, that you already have. That would greatly help, since here the types of the variables are really important – chrisl May 19 at 19:53
  • @tsotniuspious, no ... you provide the code that you are having problems with and someone will check it over and provide advice – jsotola May 19 at 22:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.