Basically what we need is a quick C++ (Arduino specifically) subscript that we can call that allows you to convert a character array that consists of up to 8 hex characters (so 4 bytes) into a long integer decimal number and also an ability to convert a long integer decimal number back into an up to 8 character array.
We have some existing code that works that we can send to you to see what we are trying to achieve here that returns the right values but it is crude and does not allow it to be pulled easily as subscript(s) and it's not cleanly written. Basically the code just needs to be cleaned up and made easier to pull as a subscript(s) to have it do these conversions. It's just not well written code at present and we would like someone who does this regularly to polish it off some.
It should populate a char array with a set of hex values, reading the actual values (so as an example, 0001E848 put into each element of the array). Then convert that into an unsigned long (so 125000 also as an example).
We would be able to modify that number as a standard long integer if needed (not part of this but the example just randomizes it slightly to test it) and then it passes the resulting decimal number back to this or a separate subscript.
The subscript would then convert that number back to the same data type as before, a char array so that we can then pass those values along to other functions (also not part of this).
That's it. Don't leave memory open, don't use Strings or memory leaking approaches, please just keep this clean and well written.
7 freelancere byder i gennemsnit $25 på dette job
Efficient use of memory and freeing memory blocks that aren't in use is my big concern in the project . As an Embedded systems developer and C programmer , I have to take the most efficient method to write a program .