techbase123 / micropython-modbus

Modbus Master library for MicroPython ESP32 devices. Based on pycom-modbus from pycom
https://www.instructables.com/id/ESP32-Modbus-Master-TCP/
GNU General Public License v3.0
70 stars 27 forks source link

ValueError: expecting a pin #5

Open yousaf2018 opened 2 years ago

yousaf2018 commented 2 years ago

ValueError: expecting a pin #5 issue

Kindly help me to solve the issue.

StarkMaximus333 commented 2 years ago

hey, use machine.Pin function before sending the arguments for init

Screenshot 2022-06-24 202135
hosamzolfonoon commented 1 year ago

Hello, after 20 hours, it is solved, just do following: 1 - put '#' at the begining of lines 26 and 27 2 - clean '#' from the begning of lines 28 and 29 3- correct indentation of lines 28 and 29 4- wire pzem with rx2 and tx2 (16,17) 5- in "uPZEM_004t" body codes, replace line 44 with "counter_grid=uPZEM(2,pins=[16,17])" Good Luck