{"action":"created","issue":{"url":"https://api.github.com/repos/lancaster-university/microbit-dal/issues/149","repository_url":"https://api.github.com/repos/lancaster-university/microbit-dal","labels_url":"https://api.github.com/repos/lancaster-university/microbit-dal/issues/149/labels{/name}","comments_url":"https://api.github.com/repos/lancaster-university/microbit-dal/issues/149/comments","events_url":"https://api.github.com/repos/lancaster-university/microbit-dal/issues/149/events","html_url":"https://github.com/lancaster-university/microbit-dal/issues/149","id":156833239,"number":149,"title":"Question: Serial Access","user":{"login":"Steve136","id":9158335,"avatar_url":"https://avatars.githubusercontent.com/u/9158335?v=3","gravatar_id":"","url":"https://api.github.com/users/Steve136","html_url":"https://github.com/Steve136","followers_url":"https://api.github.com/users/Steve136/followers","following_url":"https://api.github.com/users/Steve136/following{/other_user}","gists_url":"https://api.github.com/users/Steve136/gists{/gist_id}","starred_url":"https://api.github.com/users/Steve136/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Steve136/subscriptions","organizations_url":"https://api.github.com/users/Steve136/orgs","repos_url":"https://api.github.com/users/Steve136/repos","events_url":"https://api.github.com/users/Steve136/events{/privacy}","received_events_url":"https://api.github.com/users/Steve136/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-05-25T19:39:56Z","updated_at":"2016-05-27T09:06:52Z","closed_at":null,"body":"Hello, \r\n\r\nI am looking at integrating an ESP8266 module via Serial. I have made the connection and can send/receive data perfectly fine. \r\n\r\nIs it possible to use the PC Serial connection on USBRX, USBTX as well as Serial on two pins? \r\n\r\nWhen I try this, either one or the other works... but not both? \r\n\r\nThanks."},"comment":{"url":"https://api.github.com/repos/lancaster-university/microbit-dal/issues/comments/222097787","html_url":"https://github.com/lancaster-university/microbit-dal/issues/149#issuecomment-222097787","issue_url":"https://api.github.com/repos/lancaster-university/microbit-dal/issues/149","id":222097787,"user":{"login":"Steve136","id":9158335,"avatar_url":"https://avatars.githubusercontent.com/u/9158335?v=3","gravatar_id":"","url":"https://api.github.com/users/Steve136","html_url":"https://github.com/Steve136","followers_url":"https://api.github.com/users/Steve136/followers","following_url":"https://api.github.com/users/Steve136/following{/other_user}","gists_url":"https://api.github.com/users/Steve136/gists{/gist_id}","starred_url":"https://api.github.com/users/Steve136/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Steve136/subscriptions","organizations_url":"https://api.github.com/users/Steve136/orgs","repos_url":"https://api.github.com/users/Steve136/repos","events_url":"https://api.github.com/users/Steve136/events{/privacy}","received_events_url":"https://api.github.com/users/Steve136/received_events","type":"User","site_admin":false},"created_at":"2016-05-27T09:06:52Z","updated_at":"2016-05-27T09:06:52Z","body":"Thank you! That sounds exactly what I was looking for. I may be doing something wrong though?\r\n\r\nThe code below prints \"Microbit Started..\" fine but the program appears to halt on the SC.Send(\"AT\") and not go any further? It displays the \"OK\" message but It never shows the \"Redir\". The redirect does return MICROBIT_OK.\r\n\r\nAm I using this correctly? \r\n\r\n`#include \"MicroBit.h\"\r\n\r\nMicroBit uBit;\r\nMicroBitSerial SC(USBTX, USBRX);\r\n\r\nint main() {\r\n   uBit.init();\r\n   uBit.sleep(5000);\r\n   \r\n    while(1) {\r\n      SC.send(\"Microbit Started... \\r\\n\");\r\n\r\n      int ESPModule = SC.redirect(MICROBIT_PIN_P1, MICROBIT_PIN_P2);\r\n      if (ESPModule == MICROBIT_OK) {\r\n        uBit.display.scroll(\"OK\", 100);\r\n        SC.send(\"AT\");\r\n      }\r\n      \r\n      uBit.display.scroll(\"Redir\", 100);\r\n      uBit.sleep(1000);\r\n      \r\n      int USBSerial = SC.redirect(USBTX, USBRX);\r\n      if (USBSerial == MICROBIT_OK) {\r\n          uBit.display.scroll(\"OK\", 100);\r\n          SC.send(\"Hello PC!\\n\");\r\n      }\r\n      \r\n      SC.send(\"Finished.\");\r\n      uBit.sleep(10000);\r\n    }\r\n}`\r\n\r\nThank you"}}
{"actor":{"display_login":"Steve136"}}