{"action":"created","issue":{"url":"https://api.github.com/repos/PureEngineering/LeptonModule/issues/9","labels_url":"https://api.github.com/repos/PureEngineering/LeptonModule/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/PureEngineering/LeptonModule/issues/9/comments","events_url":"https://api.github.com/repos/PureEngineering/LeptonModule/issues/9/events","html_url":"https://github.com/PureEngineering/LeptonModule/issues/9","id":53005503,"number":9,"title":"Lepton interface with Intel Galileo (Packet discontinous)","user":{"login":"subashnus","id":10192216,"avatar_url":"https://avatars.githubusercontent.com/u/10192216?v=3","gravatar_id":"","url":"https://api.github.com/users/subashnus","html_url":"https://github.com/subashnus","followers_url":"https://api.github.com/users/subashnus/followers","following_url":"https://api.github.com/users/subashnus/following{/other_user}","gists_url":"https://api.github.com/users/subashnus/gists{/gist_id}","starred_url":"https://api.github.com/users/subashnus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/subashnus/subscriptions","organizations_url":"https://api.github.com/users/subashnus/orgs","repos_url":"https://api.github.com/users/subashnus/repos","events_url":"https://api.github.com/users/subashnus/events{/privacy}","received_events_url":"https://api.github.com/users/subashnus/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2014-12-28T17:43:10Z","updated_at":"2015-02-24T00:54:50Z","closed_at":null,"body":"Hi,\r\n I have used the Arduino code given at https://github.com/PureEngineering/LeptonModule for Intel's Galileo board with small modification. The modification are as follows,\r\n\r\nvoid setup()\r\n{\r\n  Wire.begin();\r\n  Serial.begin(115200);\r\n  pinMode(10, OUTPUT);\r\n  SPI.begin();                                      Should be initialized then appropriate parameters has to be SET\r\n  SPI.setDataMode(SPI_MODE3);\r\n  SPI.setClockDivider(SPI_CLOCK_DIV2);\r\n  Serial.println(\"setup complete\");\r\n}\r\nunsigned int lepton_image[60][82];   Declared to plot the image\r\nvoid read_lepton_frame(void)\r\n{\r\n  int i;\r\n  for (int frame_number = 0; frame_number < 60; frame_number++)\r\n  {\r\n  for (i = 0; i < (VOSPI_FRAME_SIZE / 2); i++)\r\n  {\r\n    digitalWrite(10, LOW);\r\n    lepton_frame_packet[2 * i] = SPI.transfer(0x00);\r\n    lepton_frame_packet[2 * i + 1] = SPI.transfer(0x00);\r\nlepton_image[frame_number][i] = (lepton_frame_packet[2*i] << 8 | lepton_frame_packet[2*i+1]);   \r\n    digitalWrite(10, HIGH);\r\n  }\r\n  lepton_image_index[frame_number]=lepton_frame_packet[0];         Trying to get the index of each packet in a frame\r\n  }\r\n}\r\nvoid loop()\r\n{\r\n  int i;\r\n  int frame_number;\r\n  while (1)\r\n  {\r\n    lepton_sync();\r\n    read_lepton_frame();\r\n  for (int frame_number = 0; frame_number < 60; frame_number++)\r\n  {\r\n      Serial.println(lepton_image_index[frame_number]&0x0f);     printing the Packet index to verify the data capture is in sync\r\n  }\r\n  }\r\n}\r\n\r\nI am basically trying to capture the packet index of each packet in a frame and saving it in an array to render the Thermal  image. The code complies and gets downloaded into the Galileo baord and when i watch the serial port the packet index is not continuous it is discontinuous like,\r\n\r\n 0 0 0 0 0 12 13  0 0 0 0 1 2 0 0 0  instead of 1 2 3 4 5 6 7 8 ...... 60.\r\n\r\ni tried changing the SPI clock speed by varying the the parameter in SPI.setClockDivider as well as the delay time of 185ms for establishing the sync (as given in the datasheet).\r\nNo matter what i do the packets are discontinuous. It will be really helpful if anybody aware of the issue i am facing.\r\nIf anybody is successful is getting the thermal image using the code given for Arduino , Kinldy let me know the modifications that i need to do.\r\n\r\n\r\nThanks,\r\nSubash"},"comment":{"url":"https://api.github.com/repos/PureEngineering/LeptonModule/issues/comments/75676808","html_url":"https://github.com/PureEngineering/LeptonModule/issues/9#issuecomment-75676808","issue_url":"https://api.github.com/repos/PureEngineering/LeptonModule/issues/9","id":75676808,"user":{"login":"pale1805","id":11168639,"avatar_url":"https://avatars.githubusercontent.com/u/11168639?v=3","gravatar_id":"","url":"https://api.github.com/users/pale1805","html_url":"https://github.com/pale1805","followers_url":"https://api.github.com/users/pale1805/followers","following_url":"https://api.github.com/users/pale1805/following{/other_user}","gists_url":"https://api.github.com/users/pale1805/gists{/gist_id}","starred_url":"https://api.github.com/users/pale1805/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pale1805/subscriptions","organizations_url":"https://api.github.com/users/pale1805/orgs","repos_url":"https://api.github.com/users/pale1805/repos","events_url":"https://api.github.com/users/pale1805/events{/privacy}","received_events_url":"https://api.github.com/users/pale1805/received_events","type":"User","site_admin":false},"created_at":"2015-02-24T00:54:50Z","updated_at":"2015-02-24T00:54:50Z","body":"Hello Everyone!\r\n\r\nI am trying to connect the Flir Lepton Ir camera to an Intel Galileo but I cannot get the code on the pure engineering webpage or the one on this forum to work! Could anyone please help me? Does anyone have the complete functional code? Thanks!!"}}