-
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
Compatibility with Arduino nano 33 IoT #53
Comments
Ciao Jasiunas, I'm sorry I don't own a board like yours, seems that it
doesn't need software serial because you can use different UART ( notice CAPS) interfaces,
much better explained here :
https://stackoverflow.com/questions/57175348/softwareserial-for-arduino-nano-33-iot/57541921#57541921
Let us know your progress.
Sergio.
Il mar 16 mar 2021, 19:54 Žygimantas Jasiūnas ***@***.***> ha
scritto:
… I was trying to connect PZEM004 to Arduino nano 33 IoT board, and this
library is using SofwareSerial.h,
I tried to dig deeper, and Nano 33 IoT does not use SoftwareSerial
anymore, so I'm not sure how to make
PZEM004 compatible with Nano 33 IoT board, could not find anything in the
internet about this issue.
Maybe someone has an idea how to solve this?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#53>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABW4XQ7DGBDIZDG4ZXQRFC3TD6SPBANCNFSM4ZJEFLVA>
.
|
It was complaining about the Usb Serial conflict in the CPP file, I commented line 54 in CPP.
And passing Serial to PZEM by using this line:
Now code compiles with no problem, but... when I install this code to Arduino nano 33 IoT, the board simply crashes, and I need to Update: If I don't comment HardwareSerial Serial I get this error now:
|
Update: I followed suggestions of this thread: #43 Any advice how could I debug it? |
Unfortunately I don't have a Nano 33 IoT. Could you try with the new version v1.1.1 of the library to see if you still face the same issues. |
For anyone using the same processor's family (Cortex-M0 32-bit SAMD21) the library PZEM-004T-V30-SAMD21 works. I tested with MKR WAN 1310. Thanks to @zygisjas |
I was trying to connect PZEM004 to Arduino nano 33 IoT board, and this library is using SofwareSerial.h,
I tried to dig deeper, and Nano 33 IoT does not use SoftwareSerial anymore, so I'm not sure how to make
PZEM004 compatible with Nano 33 IoT board, could not find anything in the internet about this issue.
Maybe someone has an idea how to solve this?
This is from arduino official site:
Serial ports on the Arduino NANO 33 IoT
The USB connector of the board is directly connected to the USB host pins of the SAMD21. This routing enables you to use the Arduino NANO 33 IoT as a client USB peripheral (acting as a mouse or a keyboard connected to the computer) or as a USB host device so that devices like a mouse, keyboard, or an Android phone can be connected to the Arduino NANO 33 IoT. This port can also be used as a virtual serial port using the Serial object in the Arduino programming language. The RX0 and TX1 pins are a second serial port available as Serial1
So I've tried to simply write the code like this:
But getting error output in aruino IDE:
error: no matching function for call to 'PZEM004Tv30::PZEM004Tv30(Uart&)'
PZEM004Tv30 pzem(Serial1);
Documents\Arduino\libraries\PZEM-004T-v30/PZEM004Tv30.h:65:5: note: candidate: PZEM004Tv30::PZEM004Tv30(arduino::HardwareSerial*, uint8_t)
PZEM004Tv30(HardwareSerial* port, uint8_t addr=PZEM_DEFAULT_ADDR);
^~~~~~~~~~~
Documents\Arduino\libraries\PZEM-004T-v30/PZEM004Tv30.h:59:7: note: candidate: constexpr PZEM004Tv30::PZEM004Tv30(const PZEM004Tv30&)
class PZEM004Tv30
^~~~~~~~~~~
exit status 1
no matching function for call to 'PZEM004Tv30::PZEM004Tv30(Uart&)'
The text was updated successfully, but these errors were encountered: