{"action":"created","issue":{"url":"https://api.github.com/repos/01org/corelibs-arduino101/issues/226","repository_url":"https://api.github.com/repos/01org/corelibs-arduino101","labels_url":"https://api.github.com/repos/01org/corelibs-arduino101/issues/226/labels{/name}","comments_url":"https://api.github.com/repos/01org/corelibs-arduino101/issues/226/comments","events_url":"https://api.github.com/repos/01org/corelibs-arduino101/issues/226/events","html_url":"https://github.com/01org/corelibs-arduino101/issues/226","id":163428810,"number":226,"title":"How to expand SRAM?","user":{"login":"tantra21","id":20245760,"avatar_url":"https://avatars.githubusercontent.com/u/20245760?v=3","gravatar_id":"","url":"https://api.github.com/users/tantra21","html_url":"https://github.com/tantra21","followers_url":"https://api.github.com/users/tantra21/followers","following_url":"https://api.github.com/users/tantra21/following{/other_user}","gists_url":"https://api.github.com/users/tantra21/gists{/gist_id}","starred_url":"https://api.github.com/users/tantra21/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tantra21/subscriptions","organizations_url":"https://api.github.com/users/tantra21/orgs","repos_url":"https://api.github.com/users/tantra21/repos","events_url":"https://api.github.com/users/tantra21/events{/privacy}","received_events_url":"https://api.github.com/users/tantra21/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/01org/corelibs-arduino101/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":{"login":"eriknyquist","id":6616775,"avatar_url":"https://avatars.githubusercontent.com/u/6616775?v=3","gravatar_id":"","url":"https://api.github.com/users/eriknyquist","html_url":"https://github.com/eriknyquist","followers_url":"https://api.github.com/users/eriknyquist/followers","following_url":"https://api.github.com/users/eriknyquist/following{/other_user}","gists_url":"https://api.github.com/users/eriknyquist/gists{/gist_id}","starred_url":"https://api.github.com/users/eriknyquist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eriknyquist/subscriptions","organizations_url":"https://api.github.com/users/eriknyquist/orgs","repos_url":"https://api.github.com/users/eriknyquist/repos","events_url":"https://api.github.com/users/eriknyquist/events{/privacy}","received_events_url":"https://api.github.com/users/eriknyquist/received_events","type":"User","site_admin":false},"assignees":[{"login":"eriknyquist","id":6616775,"avatar_url":"https://avatars.githubusercontent.com/u/6616775?v=3","gravatar_id":"","url":"https://api.github.com/users/eriknyquist","html_url":"https://github.com/eriknyquist","followers_url":"https://api.github.com/users/eriknyquist/followers","following_url":"https://api.github.com/users/eriknyquist/following{/other_user}","gists_url":"https://api.github.com/users/eriknyquist/gists{/gist_id}","starred_url":"https://api.github.com/users/eriknyquist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eriknyquist/subscriptions","organizations_url":"https://api.github.com/users/eriknyquist/orgs","repos_url":"https://api.github.com/users/eriknyquist/repos","events_url":"https://api.github.com/users/eriknyquist/events{/privacy}","received_events_url":"https://api.github.com/users/eriknyquist/received_events","type":"User","site_admin":false}],"milestone":null,"comments":2,"created_at":"2016-07-01T16:18:04Z","updated_at":"2016-07-01T17:34:25Z","closed_at":null,"body":"I am using the 101 to drive Neopixel LED array. Each LED requires 3 bytes of RAM, and there are overall 20000 LEDs that I am working with. I am using the Adafruit Neopixel library to drive these Neopixel LEDs.  I am able to allocate memory for 1024 LEDs at a time and the Arduino 101 then runs out of memory. \r\nTo solve this problem, I connected 1024 LEDs per GPIO pin on the Arduino 101 and I am allocating the memory for the LEDs connected to the individual GPIO pins during run time. This lets me work with 1024X14 (since there are 14 GPIOs) LEDs at a time, but every time I address LEDs connected to a particular GPIO pin I need to free the memory held by the LEDs connected to the a different GPIO pin, and reallocate this memory for the LEDs connected to the current GPIO pin. This causes the LEDs to flicker slightly. The program I am using is:\r\n                                                                                                 \r\nAdafruit_NeoPixel leds = Adafruit_NeoPixel();\r\n\r\nDepending on the LED that I want to talk to, I set the length of the array and the pin as follows:\r\n  \r\nleds.updateLength(1024);\r\nleds.updateType(NEO_GRB + NEO_KHZ800);\r\nleds.setPin(pin_number);\r\n\r\nThis allocates memory for 1024 leds connected to the pin specified in the setPin function. The update length function frees memory(if any) held by the neopixels and allocates the memory for neopixels connected to the pin specified in the setPin function.\r\n\r\n\r\nI wanted to know if it is possible to expand the SRAM or if there is any way I could drive 20000 LEDs using one Arduino 101 without the LEDs flickering?\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/01org/corelibs-arduino101/issues/comments/230005070","html_url":"https://github.com/01org/corelibs-arduino101/issues/226#issuecomment-230005070","issue_url":"https://api.github.com/repos/01org/corelibs-arduino101/issues/226","id":230005070,"user":{"login":"intel-larry","id":6580434,"avatar_url":"https://avatars.githubusercontent.com/u/6580434?v=3","gravatar_id":"","url":"https://api.github.com/users/intel-larry","html_url":"https://github.com/intel-larry","followers_url":"https://api.github.com/users/intel-larry/followers","following_url":"https://api.github.com/users/intel-larry/following{/other_user}","gists_url":"https://api.github.com/users/intel-larry/gists{/gist_id}","starred_url":"https://api.github.com/users/intel-larry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/intel-larry/subscriptions","organizations_url":"https://api.github.com/users/intel-larry/orgs","repos_url":"https://api.github.com/users/intel-larry/repos","events_url":"https://api.github.com/users/intel-larry/events{/privacy}","received_events_url":"https://api.github.com/users/intel-larry/received_events","type":"User","site_admin":false},"created_at":"2016-07-01T17:34:25Z","updated_at":"2016-07-01T17:34:25Z","body":"Hi,\r\n\r\nThere are limitations of course, with the Neopixel library. In particular, it uses the strategy of allocating all the LED memory on a per-led basis. The only way to use NeoPixel with larger strands than you have memory for is to spread them on multiple pins. This works, but you can run into problems of latency.\r\n\r\n20,0000 LED’s on a single strand is quite a lot. There are various alternate strategies for dealing with large strands on Arduino boards that work around the memory limitations.\r\n\r\nOne approach you might want to look at is multiple 101 boards – and using something like SPI or UART to synchronize them for your display. This is how large scale lighting systems for stage and night clubs etc, work. A common protocol is Vixen.\r\n\r\nVery large scale displays with this number of LED’s are usually driven by FPGA type devices.\r\n\r\nGood luck with your project!\r\n\r\n\r\n\r\nFrom: tantra21 <notifications@github.com>\r\nReply-To: 01org/corelibs-arduino101 <reply@reply.github.com>\r\nDate: Friday, July 1, 2016 at 9:18 AM\r\nTo: 01org/corelibs-arduino101 <corelibs-arduino101@noreply.github.com>\r\nSubject: [01org/corelibs-arduino101] How to expand SRAM? (#226)\r\n\r\n\r\nI am using the 101 to drive Neopixel LED array. Each LED requires 3 bytes of RAM, and there are overall 20000 LEDs that I am working with. I am using the Adafruit Neopixel library to drive these Neopixel LEDs. I am able to allocate memory for 1024 LEDs at a time and the Arduino 101 then runs out of memory.\r\nTo solve this problem, I connected 1024 LEDs per GPIO pin on the Arduino 101 and I am allocating the memory for the LEDs connected to the individual GPIO pins during run time. This lets me work with 1024X14 (since there are 14 GPIOs) LEDs at a time, but every time I address LEDs connected to a particular GPIO pin I need to free the memory held by the LEDs connected to the a different GPIO pin, and reallocate this memory for the LEDs connected to the current GPIO pin. This causes the LEDs to flicker slightly. The program I am using is:\r\n\r\nAdafruit_NeoPixel leds = Adafruit_NeoPixel();\r\n\r\nDepending on the LED that I want to talk to, I set the length of the array and the pin as follows:\r\n\r\nleds.updateLength(1024);\r\nleds.updateType(NEO_GRB + NEO_KHZ800);\r\nleds.setPin(pin_number);\r\n\r\nThis allocates memory for 1024 leds connected to the pin specified in the setPin function. The update length function frees memory(if any) held by the neopixels and allocates the memory for neopixels connected to the pin specified in the setPin function.\r\n\r\nI wanted to know if it is possible to expand the SRAM or if there is any way I could drive 20000 LEDs using one Arduino 101 without the LEDs flickering?\r\n\r\n—\r\nYou are receiving this because you are subscribed to this thread.\r\nReply to this email directly, view it on GitHub<https://github.com/01org/corelibs-arduino101/issues/226>, or mute the thread<https://github.com/notifications/unsubscribe/AGRo0kZIcmrTmqRmoP489vIAHaHb3MXxks5qRT29gaJpZM4JDSTD>.\r\n"}}
{"actor":{"display_login":"intel-larry"}}