Title: How to read multiple lines · Issue #7 · HirdayGupta/Java-Arduino-Communication-Library · GitHub
Open Graph Title: How to read multiple lines · Issue #7 · HirdayGupta/Java-Arduino-Communication-Library
X Title: How to read multiple lines · Issue #7 · HirdayGupta/Java-Arduino-Communication-Library
Description: Hello, I am trying to read 2 lines sent from the arduino my code is below. I am trying to create a function when the word ABLINK is received it prints out something....same with when ABO is read. Only the first IF statement works. How ca...
Open Graph Description: Hello, I am trying to read 2 lines sent from the arduino my code is below. I am trying to create a function when the word ABLINK is received it prints out something....same with when ABO is read. O...
X Description: Hello, I am trying to read 2 lines sent from the arduino my code is below. I am trying to create a function when the word ABLINK is received it prints out something....same with when ABO is read. O...
Opengraph URL: https://github.com/HirdayGupta/Java-Arduino-Communication-Library/issues/7
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"How to read multiple lines","articleBody":"Hello,\r\n\r\nI am trying to read 2 lines sent from the arduino my code is below. I am trying to create a function when the word ABLINK is received it prints out something....same with when ABO is read. Only the first IF statement works. How can I make the second one work? I am stumped. Thanks for the help!\r\n\r\n``` C++\r\nif(n == 39) {\r\n Serial.println(\"ABLINK\");\r\n for(int i = 0; i \u003c 10; i++) {\r\n digitalWrite(13, HIGH);\r\n delay(1000);\r\n digitalWrite(13, LOW);\r\n delay(150);\r\n }\r\n delay(1000);\r\n Serial.println(\"ABO\");\r\n}\r\n```\r\n\r\nAnd my Java code is below:\r\n\r\n``` java\r\nString line = arduino.serialRead('6');\r\nif(line.contains(\"ABLINK\")) {\r\n System.out.println(\"ALL LEDS BLINKING\");\r\n} else {\r\n AnsiConsole.systemInstall();\r\n System.out.println(\"ERROR!!\");\r\n} \r\nString line2 = arduino.serialRead('4');\r\nif(line2.contains(\"ABO\")) {\r\n System.out.println(\"ALL LEDS BLINKING OFF\");\r\n} else {\r\n System.out.println(\"ERROR!! line=\"+ line +\"\u003c\");\r\n} \r\n```","author":{"url":"https://github.com/PilotinControl25","@type":"Person","name":"PilotinControl25"},"datePublished":"2018-08-09T23:01:44.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/7/Java-Arduino-Communication-Library/issues/7"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:59750a02-3e51-4137-d4ee-d3e9a985c287 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9D66:C953:3D4C9F:514192:698E52FA |
| html-safe-nonce | 4a49315bd51b4504508ac6c1c0fac965a802a35f9ea79bfae41741ff71ab776c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RDY2OkM5NTM6M0Q0QzlGOjUxNDE5Mjo2OThFNTJGQSIsInZpc2l0b3JfaWQiOiI0MDgyNTY1OTMzNzg4MjQ5NTUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 8599b873df8dcc2636fe3dcf27f676484529ea85bb1172f8b445dd0a768739aa |
| hovercard-subject-tag | issue:349320665 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/HirdayGupta/Java-Arduino-Communication-Library/7/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b961fc79defe6a3c0302859cc42131e1f0bfe5834496f975eaa607669312b57a/HirdayGupta/Java-Arduino-Communication-Library/issues/7 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b961fc79defe6a3c0302859cc42131e1f0bfe5834496f975eaa607669312b57a/HirdayGupta/Java-Arduino-Communication-Library/issues/7 |
| og:image:alt | Hello, I am trying to read 2 lines sent from the arduino my code is below. I am trying to create a function when the word ABLINK is received it prints out something....same with when ABO is read. O... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | PilotinControl25 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 0e08b85f0035d49bc4c22868f70a4d30fb8c2a777936895c37e78df095242ddc |
| turbo-cache-control | no-preview |
| go-import | github.com/HirdayGupta/Java-Arduino-Communication-Library git https://github.com/HirdayGupta/Java-Arduino-Communication-Library.git |
| octolytics-dimension-user_id | 18088721 |
| octolytics-dimension-user_login | HirdayGupta |
| octolytics-dimension-repository_id | 72743686 |
| octolytics-dimension-repository_nwo | HirdayGupta/Java-Arduino-Communication-Library |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 72743686 |
| octolytics-dimension-repository_network_root_nwo | HirdayGupta/Java-Arduino-Communication-Library |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9416d07f3607b074b276ccc81546278f89608a08 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width