Closed DanielSSilva closed 6 years ago
This already exists in Powershell/.NET, you can for instance use
$value = "11010100"
$convertedbits = [convert]::toint32($value,2)
And send to the register on the device.
Oooh... I didn't know that. I'm sorry, and thank you!
Since this module communicates with hardware and hardware uses a lot of binary "communication", it could make it easier (and more readable) to understand the "low-level" code if we had a function that would convert our binary value to an int. For what I've searched, there is no powershell native function to do so. For example, if I see that a register needs the following value: 0001 1010 I can create as $value = 0x1A, or $value = 26. The suggestion would be something like : $value = Convert-FromBinary '0001 1010' Do you think that this would be useful?