{"action":"created","issue":{"url":"https://api.github.com/repos/arduino/Arduino/issues/1044","labels_url":"https://api.github.com/repos/arduino/Arduino/issues/1044/labels{/name}","comments_url":"https://api.github.com/repos/arduino/Arduino/issues/1044/comments","events_url":"https://api.github.com/repos/arduino/Arduino/issues/1044/events","html_url":"https://github.com/arduino/Arduino/issues/1044","id":8397804,"number":1044,"title":"serial.find stops serial.read() to work [imported]","user":{"login":"cmaglie","id":423515,"avatar_url":"https://avatars.githubusercontent.com/u/423515?v=3","gravatar_id":"","url":"https://api.github.com/users/cmaglie","html_url":"https://github.com/cmaglie","followers_url":"https://api.github.com/users/cmaglie/followers","following_url":"https://api.github.com/users/cmaglie/following{/other_user}","gists_url":"https://api.github.com/users/cmaglie/gists{/gist_id}","starred_url":"https://api.github.com/users/cmaglie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmaglie/subscriptions","organizations_url":"https://api.github.com/users/cmaglie/orgs","repos_url":"https://api.github.com/users/cmaglie/repos","events_url":"https://api.github.com/users/cmaglie/events{/privacy}","received_events_url":"https://api.github.com/users/cmaglie/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"cmaglie","id":423515,"avatar_url":"https://avatars.githubusercontent.com/u/423515?v=3","gravatar_id":"","url":"https://api.github.com/users/cmaglie","html_url":"https://github.com/cmaglie","followers_url":"https://api.github.com/users/cmaglie/followers","following_url":"https://api.github.com/users/cmaglie/following{/other_user}","gists_url":"https://api.github.com/users/cmaglie/gists{/gist_id}","starred_url":"https://api.github.com/users/cmaglie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmaglie/subscriptions","organizations_url":"https://api.github.com/users/cmaglie/orgs","repos_url":"https://api.github.com/users/cmaglie/repos","events_url":"https://api.github.com/users/cmaglie/events{/privacy}","received_events_url":"https://api.github.com/users/cmaglie/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2012-11-15T19:02:58Z","updated_at":"2015-12-10T16:41:42Z","closed_at":null,"body":"This is [Issue 1044](http://code.google.com/p/arduino/issues/detail?id=1044) moved from a Google Code project.\nAdded by 2012-09-17T09:27:26.000Z by [x1angw...@gmail.com](http://code.google.com/u/101906961841219629081/).\nPlease review that bug for more context and additional comments, but update this bug.\n\n\nOriginal labels: Type-Defect, Priority-Medium, Component-Core\n\n### Original description\n\n**What steps will reproduce the problem?**\n1. Using serial.read() to store different inputs in a unsigned char array as soon as serial.available()>0 leads to misreads (elements in the array bigger than [0]  still filled with 0). As I found out it takes some time until all elements of the input are available (serial.available() returns 1 at the beginning, some Milliseconds later 3 ...). Therefore I would like to use serial.find to assure that all the elements of the input are stored in the buffer.\n\n2.Define a while loop or if clause with serial.find(a char determing the end of the serial input) to avoid the misreads by waiting until all elements are in the buffer\n\n3. In the while loop: unsigned char array array[8]=serial.read();\n\n\n\n**What is the expected output? What do you see instead?**\nExpected: array filled with the values send via HTerm\nInstead:First element in the unsigned array is =255, every other is still 0\n\n**What version of the Arduino software are you using? On what operating**\n**system?  Which Arduino board are you using?**\n\nUsing 1.01 on Windows 7 (32bit) and Arduino Uno\n\n**Please provide any additional information below.**\n\nThank you in advance for your feedback!\n"},"comment":{"url":"https://api.github.com/repos/arduino/Arduino/issues/comments/163682463","html_url":"https://github.com/arduino/Arduino/issues/1044#issuecomment-163682463","issue_url":"https://api.github.com/repos/arduino/Arduino/issues/1044","id":163682463,"user":{"login":"PaulStoffregen","id":965463,"avatar_url":"https://avatars.githubusercontent.com/u/965463?v=3","gravatar_id":"","url":"https://api.github.com/users/PaulStoffregen","html_url":"https://github.com/PaulStoffregen","followers_url":"https://api.github.com/users/PaulStoffregen/followers","following_url":"https://api.github.com/users/PaulStoffregen/following{/other_user}","gists_url":"https://api.github.com/users/PaulStoffregen/gists{/gist_id}","starred_url":"https://api.github.com/users/PaulStoffregen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PaulStoffregen/subscriptions","organizations_url":"https://api.github.com/users/PaulStoffregen/orgs","repos_url":"https://api.github.com/users/PaulStoffregen/repos","events_url":"https://api.github.com/users/PaulStoffregen/events{/privacy}","received_events_url":"https://api.github.com/users/PaulStoffregen/received_events","type":"User","site_admin":false},"created_at":"2015-12-10T16:41:42Z","updated_at":"2015-12-10T16:41:42Z","body":"To have any realistic chance of someone investigating this problem, you really must provide a complete program that can be copied into Arduino and uploaded to a board to reproduce the problem.\r\n\r\nThe exact string to send from the serial monitor would also be needed, as well as any other steps.\r\n\r\nImagine if you're an Arduino developer.  Are you could to try to cobble together a test program from the imprecise description above?  And figure out the specific input?  Maybe.  But it's probably too much trouble and unlikely to work (recreate the problem).  Bug reports like this, which don't provide a ready-to-run test case almost never get investigated."}}