Skip to content

Add support for reading volt or ampere#3

Open
LinuxChristian wants to merge 1 commit intobjarnekvae:masterfrom
LinuxChristian:master
Open

Add support for reading volt or ampere#3
LinuxChristian wants to merge 1 commit intobjarnekvae:masterfrom
LinuxChristian:master

Conversation

@LinuxChristian
Copy link

@LinuxChristian LinuxChristian commented Jun 11, 2019

Hi,

Thanks for a great library!
I have made some extensions that I think might also help other users of the Python wrapper.

The Monarco supports reading either Volt or Ampere via the analog inputs. Switching between the two involves sending commands via the SDC to flip a resistor. This commit allows the user to control this when the library is initiated.

The default configuration is to measure Volt on both ain1 and ain2. The change should therefore not make any difference for existing users.

The commit has been tested against a controlled ampere and voltage source to make sure the measurements are correct even with the change.

This commit does not require any changes to the C library.

The Monarco supports reading either Volt or Ampere via the analog inputs. Switching between the two involves sending commands via the SDC to flip a resistor. This commit allows the user to control this when the library is initiated.
@bjarnekvae
Copy link
Owner

Thank you so much for this! Did not know that the Monarco also can measure current, I will merge this as soon as I have tested it on my setup :)

@LinuxChristian
Copy link
Author

Hi @bjarnekvae,

I just stumbled across this old very PR - completely forgot about it. I no longer use the Monarco and don't really remember what the change does.

You are welcome to just close this PR if you want. No reason to merge it for my sake.

@bjarnekvae
Copy link
Owner

Thank you for the heads up! I have also stopped using the Monarco HAT as I do not have any relevant projects at the moment. I will however keep this PR so when I need to use the Monarco again I can merge your code.

Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants