{"action":"created","issue":{"url":"https://api.github.com/repos/reaper7/SDM_Energy_Meter/issues/25","repository_url":"https://api.github.com/repos/reaper7/SDM_Energy_Meter","labels_url":"https://api.github.com/repos/reaper7/SDM_Energy_Meter/issues/25/labels{/name}","comments_url":"https://api.github.com/repos/reaper7/SDM_Energy_Meter/issues/25/comments","events_url":"https://api.github.com/repos/reaper7/SDM_Energy_Meter/issues/25/events","html_url":"https://github.com/reaper7/SDM_Energy_Meter/issues/25","id":355122063,"node_id":"MDU6SXNzdWUzNTUxMjIwNjM=","number":25,"title":"ESP32 and serial2","user":{"login":"helianto","id":16461925,"node_id":"MDQ6VXNlcjE2NDYxOTI1","avatar_url":"https://avatars2.githubusercontent.com/u/16461925?v=4","gravatar_id":"","url":"https://api.github.com/users/helianto","html_url":"https://github.com/helianto","followers_url":"https://api.github.com/users/helianto/followers","following_url":"https://api.github.com/users/helianto/following{/other_user}","gists_url":"https://api.github.com/users/helianto/gists{/gist_id}","starred_url":"https://api.github.com/users/helianto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/helianto/subscriptions","organizations_url":"https://api.github.com/users/helianto/orgs","repos_url":"https://api.github.com/users/helianto/repos","events_url":"https://api.github.com/users/helianto/events{/privacy}","received_events_url":"https://api.github.com/users/helianto/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2018-08-29T11:45:07Z","updated_at":"2018-08-30T10:41:01Z","closed_at":null,"author_association":"NONE","body":"I am trying to configure the script to use with esp32 (two hardware uart) i want to use serial0 to usb, serial1 to modbus, the source file compile with default hardware configuration, but if i create serial two:\r\n\r\nFirst the source: \r\n```\r\nHardwareSerial Serial1(1);\r\n\r\n\r\n#define RXD2 16\r\n#define TXD2 17\r\n\r\n\r\n#include <SDM.h>                                                                //import SDM library\r\n\r\n\r\n\r\nSDM sdm(Serial1, 4800, NOT_A_PIN, SERIAL_8N1, false);                            //HARDWARE SERIAL\r\n\r\nvoid setup() {\r\n  Serial.begin(115200);                                                         //initialize serial\r\n   Serial1.begin(4800, SERIAL_8N1, RXD2, TXD2);\r\n  sdm.begin();                                                                  //initialize SDM communication\r\n  \r\n\r\n  Serial.println(\"Serial Txd is on pin: \"+String(TX));\r\nSerial.println(\"Serial Rxd is on pin: \"+String(RX));\r\n}\r\n\r\nvoid loop() {\r\n```\r\n\r\nthe error:\r\n\r\nC:\\Users\\javier\\AppData\\Local\\Temp\\arduino_build_587964/arduino.ar(HardwareSerial.cpp.o):(.bss.Serial1+0x0): multiple definition of `Serial1'\r\n\r\nsketch\\sdm_simple120c.ino.cpp.o:(.bss.Serial1+0x0): first defined here\r\n\r\ncollect2.exe: error: ld returned 1 exit status\r\n\r\nexit status 1\r\nError compilando para la tarjeta ESP32 Dev Module.\r\n"},"comment":{"url":"https://api.github.com/repos/reaper7/SDM_Energy_Meter/issues/comments/417274418","html_url":"https://github.com/reaper7/SDM_Energy_Meter/issues/25#issuecomment-417274418","issue_url":"https://api.github.com/repos/reaper7/SDM_Energy_Meter/issues/25","id":417274418,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNzI3NDQxOA==","user":{"login":"helianto","id":16461925,"node_id":"MDQ6VXNlcjE2NDYxOTI1","avatar_url":"https://avatars2.githubusercontent.com/u/16461925?v=4","gravatar_id":"","url":"https://api.github.com/users/helianto","html_url":"https://github.com/helianto","followers_url":"https://api.github.com/users/helianto/followers","following_url":"https://api.github.com/users/helianto/following{/other_user}","gists_url":"https://api.github.com/users/helianto/gists{/gist_id}","starred_url":"https://api.github.com/users/helianto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/helianto/subscriptions","organizations_url":"https://api.github.com/users/helianto/orgs","repos_url":"https://api.github.com/users/helianto/repos","events_url":"https://api.github.com/users/helianto/events{/privacy}","received_events_url":"https://api.github.com/users/helianto/received_events","type":"User","site_admin":false},"created_at":"2018-08-30T10:41:01Z","updated_at":"2018-08-30T10:41:01Z","author_association":"NONE","body":"Of course, I will do it, only, please, and when you have time, look at the instructions I have sent in case there should be a change in the library to \"read\" the values ​​of the records ..."}}
{"actor":{"display_login":"helianto"}}