Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CS5460 Arduino library #2106

Merged
merged 6 commits into from Sep 14, 2020
Merged

CS5460 Arduino library #2106

merged 6 commits into from Sep 14, 2020

Conversation

kmihaylov
Copy link
Contributor

This PR adds CS5460 library from this author: https://github.com/xxzl0130/CS5460
CS5460 IC is widely found in socket power meters. It can calculate RMS values and is used for electrical measurements voltage, current, power factor, energy, etc.
The provided sample is tested, however due to the dangerous voltage (my test board measures 230VAC) I couldn't provide quality video.

Please note that CS5460 requires calibration, use of (internal) filters, reset line use is more than recommended.

The component is build with the default MISO pin set to 12 (default on ESP-12F).

@slaff slaff self-assigned this Sep 13, 2020
@slaff slaff added this to the 4.2.0 milestone Sep 13, 2020
Copy link
Contributor

@slaff slaff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR looks good to me. Please, check the comment that I have posted.

#ifndef __CS5460_H__
#define __CS5460_H__

-#include <arduino.h>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you try to replace <arduino.h> with <Arduino.h> and see if the library compiles and works?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for updating it!

@slaff slaff removed the 3 - Review label Sep 14, 2020
@slaff slaff merged commit a889336 into SmingHub:develop Sep 14, 2020
@kmihaylov kmihaylov deleted the feature/cs5460 branch September 15, 2020 09:19
@mikee47
Copy link
Contributor

mikee47 commented Oct 11, 2020

@kmihaylov Just noticed there's no README for this library, would you add one please? This is all we get on the doc. page:
https://sming.readthedocs.io/en/latest/_inc/Sming/Libraries/CS5460/index.html

See https://sming.readthedocs.io/en/latest/contribute/documentation.html#readme-files for further details.

@kmihaylov
Copy link
Contributor Author

kmihaylov commented Oct 12, 2020 via email

@mikee47 mikee47 mentioned this pull request Oct 17, 2020
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.

None yet

4 participants