-
Notifications
You must be signed in to change notification settings - Fork 118
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
Seeeduino Xiao #72
Comments
Hey, Sorry I don't have a Seeeduino so can't test it for you. However besides potential problems with SoftwareSerial, I see no reason why it should not work. |
I have problems with the Seeeduino.
If you want you can connect with desktopremoto, and we can create a
suitable class for SeeeduinoXiao as well.
With the SoftwareSerial I get the following error with the following
program:
#include <PZEM004Tv30.h>
#include <SoftwareSerial.h>
SoftwareSerial pzemSWSerial(6, 7);
PZEM004Tv30 pzem;
void setup() {
SerialUSB.begin(115200);
pzem = PZEM004Tv30(pzemSWSerial);
while (!SerialUSB) { delay(100); }
SerialUSB.println("start");
}
void loop() {
}
C:\Users\maria_dchxf68\Desktop\Measurement_PZEM-004T\Measurement_PZEM-004T.ino:
In function 'void setup()':
Measurement_PZEM-004T:17:36: error: no matching function for call to
'PZEM004Tv30::PZEM004Tv30(SoftwareSerial&)'
pzem = PZEM004Tv30(pzemSWSerial);
^
In file included from
C:\Users\maria_dchxf68\Desktop\Measurement_PZEM-004T\Measurement_PZEM-004T.ino:1:0:
C:\Users\maria_dchxf68\OneDrive\Documenti\Arduino\libraries\PZEM004Tv30-1.1.2\src/PZEM004Tv30.h:93:5:
note: candidate: PZEM004Tv30::PZEM004Tv30()
PZEM004Tv30(){};
^~~~~~~~~~~
C:\Users\maria_dchxf68\OneDrive\Documenti\Arduino\libraries\PZEM004Tv30-1.1.2\src/PZEM004Tv30.h:93:5:
note: candidate expects 0 arguments, 1 provided
C:\Users\maria_dchxf68\OneDrive\Documenti\Arduino\libraries\PZEM004Tv30-1.1.2\src/PZEM004Tv30.h:90:5:
note: candidate: PZEM004Tv30::PZEM004Tv30(HardwareSerial*, uint8_t)
PZEM004Tv30(HardwareSerial* port, uint8_t addr=PZEM_DEFAULT_ADDR) :
PZEM004Tv30(*port, addr) {};
^~~~~~~~~~~
C:\Users\maria_dchxf68\OneDrive\Documenti\Arduino\libraries\PZEM004Tv30-1.1.2\src/PZEM004Tv30.h:90:5:
note: no known conversion for argument 1 from 'SoftwareSerial' to
'HardwareSerial*'
C:\Users\maria_dchxf68\OneDrive\Documenti\Arduino\libraries\PZEM004Tv30-1.1.2\src/PZEM004Tv30.h:86:5:
note: candidate: PZEM004Tv30::PZEM004Tv30(HardwareSerial&, uint8_t)
PZEM004Tv30(HardwareSerial& port, uint8_t addr=PZEM_DEFAULT_ADDR);
^~~~~~~~~~~
C:\Users\maria_dchxf68\OneDrive\Documenti\Arduino\libraries\PZEM004Tv30-1.1.2\src/PZEM004Tv30.h:86:5:
note: no known conversion for argument 1 from 'SoftwareSerial' to
'HardwareSerial&'
In file included from
C:\Users\maria_dchxf68\Desktop\Measurement_PZEM-004T\Measurement_PZEM-004T.ino:1:0:
C:\Users\maria_dchxf68\OneDrive\Documenti\Arduino\libraries\PZEM004Tv30-1.1.2\src/PZEM004Tv30.h:63:7:
note: candidate: constexpr PZEM004Tv30::PZEM004Tv30(const PZEM004Tv30&)
class PZEM004Tv30
^~~~~~~~~~~
C:\Users\maria_dchxf68\OneDrive\Documenti\Arduino\libraries\PZEM004Tv30-1.1.2\src/PZEM004Tv30.h:63:7:
note: no known conversion for argument 1 from 'SoftwareSerial' to 'const
PZEM004Tv30&'
exit status 1
no matching function for call to
'PZEM004Tv30::PZEM004Tv30(SoftwareSerial&)'
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
Il giorno sab 24 lug 2021 alle ore 10:01 Jakub Mandula <
***@***.***> ha scritto:
… Hey, Sorry I don't have a Seeeduino so can't test it for you. However
besides potential problems with SoftwareSerial, I see no reason why it
should not work.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#72 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHY67FJZ3OAKILKAHEEHZW3TZJXMPANCNFSM5A36AL7A>
.
|
Hi. `SoftwareSerial pzemSWSerial(PZEM_RX_PIN, PZEM_TX_PIN); void setup() { |
Don't work. I'm error here:
Il giorno dom 25 lug 2021 alle ore 13:40 sergiocntr <
***@***.***> ha scritto:
… Hi.
Try the basic example :
`SoftwareSerial pzemSWSerial(PZEM_RX_PIN, PZEM_TX_PIN);
* PZEM004Tv30 pzem(pzemSWSerial);*
void setup() {
/* Debugging serial */
Serial.begin(115200);
}`
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#72 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHY67FLQRSR4XUBLWN25HE3TZPZ3TANCNFSM5A36AL7A>
.
|
a) this line inside setup() is not needed and broke your sketch: b) your declaration miss the argument: This is the good one: Fix this two issues in your sketch. |
I'm try all....
don't work.
tanck's for your time.
Il giorno dom 25 lug 2021 alle ore 16:28 sergiocntr <
***@***.***> ha scritto:
… a) this line inside setup() is not needed and broke your sketch:
pzem = PZEM004Tv30(pzemSWSerial);
b) your declaration miss the argument:
PZEM004Tv30 pzem;
This is the good one:
PZEM004Tv30 pzem(pzemSWSerial);
Fix this two issues in your sketch.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#72 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHY67FOJWKUN5YIZJOF5MD3TZQNQNANCNFSM5A36AL7A>
.
|
I think what might be the problem is the way we conditionally enable SoftwareSerial in the library only on some platforms (AVR and ESP8266). See here: PZEM-004T-v30/src/PZEM004Tv30.h Lines 49 to 52 in b27887e
So perhaps try force enabling the Software serial by defining #define PZEM004_SOFTSERIAL
#include <PZEM004Tv30.h>
#include <SoftwareSerial.h>
SoftwareSerial pzemSWSerial(6, 7);
PZEM004Tv30 pzem(pzemSWSerial);
void setup() {
SerialUSB.begin(115200);
while (!SerialUSB) {
delay(100);
}
SerialUSB.println("start");
}
void loop() {
} |
I'm try this too....
But I muss buy a new board, while seeeduino work with 3.3V, e I muss have
5V.
Tank's for all
Diego
Il giorno dom 25 lug 2021 alle ore 20:30 Jakub Mandula <
***@***.***> ha scritto:
… I think what might be the problem is the way we conditionally enable
SoftwareSerial in the library only on some platforms (AVR and ESP8266).
See here:
https://github.com/mandulaj/PZEM-004T-v30/blob/b27887e2118f67bda1bb100e6c82a859dafda1c9/src/PZEM004Tv30.h#L49-L52
So perhaps try force enabling the Software serial by defining
PZEM004_SOFTSERIAL manually.
#define PZEM004_SOFTSERIAL
#include <PZEM004Tv30.h>
#include <SoftwareSerial.h>
SoftwareSerial pzemSWSerial(6, 7);
PZEM004Tv30 pzem(pzemSWSerial);
void setup() {
SerialUSB.begin(115200);
while (!SerialUSB) {
delay(100);
}
SerialUSB.println("start");
}
void loop() {
}
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#72 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHY67FPZBNQ7OAUYGV32VYDTZRJ5DANCNFSM5A36AL7A>
.
|
I've tried every options suggested here and no luck :( |
How can use your library in Seeeduino Xiao (SAMD proccessor)?
The text was updated successfully, but these errors were encountered: