{"id":1302,"date":"2015-12-08T07:19:57","date_gmt":"2015-12-08T07:19:57","guid":{"rendered":"http:\/\/www.richa1.com\/RichardAlbritton\/?p=1302"},"modified":"2017-12-09T04:07:27","modified_gmt":"2017-12-09T04:07:27","slug":"weather-cloud-project-update","status":"publish","type":"post","link":"https:\/\/www.richa1.com\/RichardAlbritton\/weather-cloud-project-update\/","title":{"rendered":"Weather Cloud Project Update"},"content":{"rendered":"<p>I have ported the code over to the Particle Photon and am working on some new lighting and sounds to represent data being sent to the device.<\/p>\n<p>Thanks to James Bruce and his\u00a0<strong><a href=\"http:\/\/www.makeuseof.com\/tag\/build-cloud-lamp-sound-reactive-lightning\/\" target=\"_blank\">How to Build a Cloud Lamp with Sound Reactive Lightning<\/a><\/strong> tutorial, I think I have found a cool Thunder animation.<!--more--><\/p>\n<pre class=\"lang:arduino decode:true \">void rolling(){  \/\/ a simple method where we go through every LED with 1\/10 chance\r\n  \/\/ of being turned on, up to 10 times, with a random delay wbetween each time\r\n  for(int r=0;r&lt;random(2,10);r++){\r\n    \/\/iterate through every LED\r\n    for(int i=0;i&lt;NUM_LEDS;i++){\r\n      if(random(0,100)&gt;90){\r\n        leds[i] = CHSV( 0, 0, 255); \r\n\r\n      }\r\n      else{\r\n        \/\/dont need reset as we're blacking out other LEDs her \r\n        leds[i] = CHSV(0,0,0);\r\n      }\r\n    }\r\n    FastLED.show();\r\n    delay(random(5,100));\r\n    reset();\r\n    \r\n  }\r\n}\r\n\r\nvoid crack(){\r\n   \/\/turn everything white briefly\r\n   for(int i=0;i&lt;NUM_LEDS;i++) {\r\n      leds[i] = CHSV( 0, 0, 255);  \r\n   }\r\n   FastLED.show();\r\n   delay(random(10,100));\r\n   reset();\r\n}\r\n\r\nvoid thunderburst(){\r\n\r\n  \/\/ this thunder works by lighting two random lengths\r\n  \/\/ of the strand from 10-20 pixels. \r\n  int rs1 = random(0,NUM_LEDS\/2);\r\n  int rl1 = random(10,20);\r\n  int rs2 = random(rs1+rl1,NUM_LEDS);\r\n  int rl2 = random(10,20);\r\n  \r\n  \/\/repeat this chosen strands a few times, adds a bit of realism\r\n  for(int r = 0;r&lt;random(3,6);r++){\r\n    \r\n    for(int i=0;i&lt; rl1; i++){\r\n      leds[i+rs1] = CHSV( 0, 0, 255);\r\n    }\r\n    \r\n    if(rs2+rl2 &lt; NUM_LEDS){\r\n      for(int i=0;i&lt; rl2; i++){\r\n        leds[i+rs2] = CHSV( 0, 0, 255);\r\n      }\r\n    }\r\n    \r\n    FastLED.show();\r\n    \/\/stay illuminated for a set time\r\n    delay(random(10,50));\r\n    \r\n    reset();\r\n    delay(random(10,50));\r\n  }\r\n  \r\n}<\/pre>\n<p>I may also use the Acid Mode.<\/p>\n<pre class=\"lang:arduino decode:true \">void acid_cloud(){\r\n    \/\/ a modification of the rolling lightning which adds random colour. trippy. \r\n    \/\/iterate through every LED\r\n    for(int i=0;i&lt;NUM_LEDS;i++){\r\n      if(random(0,100)&gt;90){\r\n        leds[i] = CHSV( random(0,255), 255, 255); \r\n\r\n      }\r\n      else{\r\n        leds[i] = CHSV(0,0,0);\r\n      }\r\n    }\r\n    FastLED.show();\r\n    delay(random(5,100));\r\n    reset();\r\n    \r\n  \/\/}\r\n}<\/pre>\n<p>&nbsp;<\/p>\n<p>I am making a very big cloud for my friend that is funding this venture. It has Bluetooth audio for regular music, the 16MB Adafruit FX Audio board, a 24W amp, and 360 NeoPixels.<\/p>\n<div class=\"sharedaddy sd-sharing-enabled\"><div class=\"robots-nocontent sd-block sd-social sd-social-icon-text sd-sharing\"><h3 class=\"sd-title\">Share this:<\/h3><div class=\"sd-content\"><ul><li class=\"share-print\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"\" class=\"share-print sd-button share-icon\" href=\"https:\/\/www.richa1.com\/RichardAlbritton\/weather-cloud-project-update\/\" target=\"_blank\" title=\"Click to print\"><span>Print<\/span><\/a><\/li><li class=\"share-email\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"\" class=\"share-email sd-button share-icon\" href=\"https:\/\/www.richa1.com\/RichardAlbritton\/weather-cloud-project-update\/?share=email\" target=\"_blank\" title=\"Click to email this to a friend\"><span>Email<\/span><\/a><\/li><li class=\"share-facebook\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-facebook-1302\" class=\"share-facebook sd-button share-icon\" href=\"https:\/\/www.richa1.com\/RichardAlbritton\/weather-cloud-project-update\/?share=facebook\" target=\"_blank\" title=\"Click to share on Facebook\"><span>Facebook<\/span><\/a><\/li><li class=\"share-twitter\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-twitter-1302\" class=\"share-twitter sd-button share-icon\" href=\"https:\/\/www.richa1.com\/RichardAlbritton\/weather-cloud-project-update\/?share=twitter\" target=\"_blank\" title=\"Click to share on Twitter\"><span>Twitter<\/span><\/a><\/li><li class=\"share-end\"><\/li><\/ul><\/div><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>I have ported the code over to the Particle Photon and am working on some new lighting and sounds to represent data being sent to the device. Thanks to James Bruce and his\u00a0How to Build a Cloud Lamp with Sound Reactive Lightning tutorial, I think I have found a cool Thunder animation.<\/p>\n<div class=\"sharedaddy sd-sharing-enabled\"><div class=\"robots-nocontent sd-block sd-social sd-social-icon-text sd-sharing\"><h3 class=\"sd-title\">Share this:<\/h3><div class=\"sd-content\"><ul><li class=\"share-print\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"\" class=\"share-print sd-button share-icon\" href=\"https:\/\/www.richa1.com\/RichardAlbritton\/weather-cloud-project-update\/\" target=\"_blank\" title=\"Click to print\"><span>Print<\/span><\/a><\/li><li class=\"share-email\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"\" class=\"share-email sd-button share-icon\" href=\"https:\/\/www.richa1.com\/RichardAlbritton\/weather-cloud-project-update\/?share=email\" target=\"_blank\" title=\"Click to email this to a friend\"><span>Email<\/span><\/a><\/li><li class=\"share-facebook\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-facebook-1302\" class=\"share-facebook sd-button share-icon\" href=\"https:\/\/www.richa1.com\/RichardAlbritton\/weather-cloud-project-update\/?share=facebook\" target=\"_blank\" title=\"Click to share on Facebook\"><span>Facebook<\/span><\/a><\/li><li class=\"share-twitter\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-twitter-1302\" class=\"share-twitter sd-button share-icon\" href=\"https:\/\/www.richa1.com\/RichardAlbritton\/weather-cloud-project-update\/?share=twitter\" target=\"_blank\" title=\"Click to share on Twitter\"><span>Twitter<\/span><\/a><\/li><li class=\"share-end\"><\/li><\/ul><\/div><\/div><\/div>","protected":false},"author":1,"featured_media":1284,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true},"categories":[57,59,62,56],"tags":[23,84,72,97,71],"jetpack_featured_media_url":"https:\/\/www.richa1.com\/RichardAlbritton\/wp-content\/uploads\/2015\/11\/wpid-wp-1447260422301.jpg","jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p5AhH6-l0","_links":{"self":[{"href":"https:\/\/www.richa1.com\/RichardAlbritton\/wp-json\/wp\/v2\/posts\/1302"}],"collection":[{"href":"https:\/\/www.richa1.com\/RichardAlbritton\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.richa1.com\/RichardAlbritton\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.richa1.com\/RichardAlbritton\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.richa1.com\/RichardAlbritton\/wp-json\/wp\/v2\/comments?post=1302"}],"version-history":[{"count":5,"href":"https:\/\/www.richa1.com\/RichardAlbritton\/wp-json\/wp\/v2\/posts\/1302\/revisions"}],"predecessor-version":[{"id":1887,"href":"https:\/\/www.richa1.com\/RichardAlbritton\/wp-json\/wp\/v2\/posts\/1302\/revisions\/1887"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.richa1.com\/RichardAlbritton\/wp-json\/wp\/v2\/media\/1284"}],"wp:attachment":[{"href":"https:\/\/www.richa1.com\/RichardAlbritton\/wp-json\/wp\/v2\/media?parent=1302"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.richa1.com\/RichardAlbritton\/wp-json\/wp\/v2\/categories?post=1302"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.richa1.com\/RichardAlbritton\/wp-json\/wp\/v2\/tags?post=1302"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}