Get your own customer support community

Recent activity

Subscribe to this feed
  • question

    zombieCat replied on January 06, 2009 02:35 to the question "MaxM Fade Speed Behaves Differently Than BlinkM" in ThingM:

    zombieCat
    Thanks Tod, I'll send you an email. BTW, my script has the #include "Wire.h" line (just didn't get it in the copy/paste).

    z
  • question

    zombieCat replied on January 06, 2009 01:53 to the question "MaxM Fade Speed Behaves Differently Than BlinkM" in ThingM:

    zombieCat
    Tod,
    Thanks for the reply. I originally had the 4-byte fade script line, but the datasheet sample for Set Fade Speed only shows two, so I changed it. I switched back to 4 bytes (actually, I copied your lines above), and I get the same 7-second static color and a 1-second fade. Washing it over white paper verifies that. I don't have reflash capability at this point. Here's the entire script:

    #include "BlinkM_funcs.h"

    void setup()
    {
    byte blinkm_addr = 0x09;
    byte script_id = 0;
    byte script_mode = 1;
    byte script_len = 4;
    byte script_reps = 0;
    byte fade_speed = 1;
    byte time_adjust = 0;

    blinkm_script_line script_lines[] = {
    {1, {'f',1,0,0}},
    {240, {'c',0xff,0x00,0x00}},
    {240, {'c',0x00,0xff,0x00}},
    {240, {'c',0x00,0x00,0xff}},
    };

    BlinkM_beginWithPower();
    BlinkM_setAddress( blinkm_addr );
    BlinkM_stopScript( blinkm_addr );
    BlinkM_setStartupParams(blinkm_addr, script_mode, script_id, script_reps, fade_speed, time_adjust);
    BlinkM_writeScript( blinkm_addr, script_id, script_len ,script_reps, script_lines );
    BlinkM_playScript( blinkm_addr, script_id, script_reps, 0 );
    }

    void loop(){}

    Thanks again,
    zombieCat
  • question

    zombieCat replied on January 05, 2009 06:46 to the question "fade speed -- what does it mean?" in ThingM:

    zombieCat
    I'm sure you know the answer to this by now, Fe2o3Fish, but I thought I'd add a reply in case someone else has this question. You set the number of ticks it takes for the script to run:

    { script_ticks, {'c', 0xff, 0x00, 0x00}}

    A tick is 1/30 of a second, so a script_tick value of 150 would make it fade over 5 seconds.

    As an aside, if you set the ticks above about 240 (I haven't taken the time to narrow it down exactly), the script lines seem to start stepping over one another and creating unexpected fade speeds.
  • question

    zombieCat asked a question in ThingM on January 05, 2009 06:10:

    zombieCat
    MaxM Fade Speed Behaves Differently Than BlinkM
    I finally got my hands on a MaxM (Christmas present). I sure like the light output and the external power connector. One thing I'm noticing is that the fade speed seems to work differently than on the BlinkM. I put the following script on both the MaxM and the BlinkM:

    int script_ticks = 240; // 8 seconds
    byte fade_speed = 1;

    blinkm_script_line script_lines[] = {
    { 1, {'f', fade_speed}},
    { script_ticks, {'c', 0xff, 0x00, 0x00}},
    { script_ticks, {'c', 0x00, 0xff, 0x00}},
    { script_ticks, {'c', 0x00, 0x00, 0xff}},
    };

    On the BlinkM, it slowly fades from one color to the next, over 8 seconds (which I want). On the MaxM, it stays on one color for 7 seconds and then fades to the next color in 1 second (which I don't want). I've tried the time adjust feature, and that doesn't seem to chage the behavior. Is there any way to make the MaxM fade over the entire script tick value rather than remaining static on the current color and then doing a 1-second fade to the next?

    Thanks,
    zombieCat
  • question

    zombieCat replied on December 03, 2008 21:54 to the question "Limiting Random Colors on a Standalone BlinkM" in ThingM:

    zombieCat
    Rusty,
    You might actually want to try the glue stick trick. Just grab a stick for a glue gun, cut about a half-inch section off of it, throw it in a vice and drill the end using a 3/8" drill bit, to a depth of about 1/8 of an inch. You'll have just enough glue left around the edge to slip over the LED. I think a 7/16 bit would actually be a bit better (didn't have one). With the 3/8, I ended up heating the bottom of the drilled-out stick with a lighter held under it--about 8 inches below for a second or two--to soften it just enough to make it a bit more plieable. It diffuses the light quite well, and it's as cheap as horse feet.
  • question

    zombieCat replied on December 03, 2008 15:07 to the question "Limiting Random Colors on a Standalone BlinkM" in ThingM:

    zombieCat
    Very good, thanks. I'll be using my MaxMs behind some frames on the wall, so they may actually work quite well with the natural color wash.
  • question

    zombieCat replied on December 03, 2008 07:44 to the question "Limiting Random Colors on a Standalone BlinkM" in ThingM:

    zombieCat
    Thanks for the info Tod. Several MaxMs are on my Christmas list :) I've never ventured int AVR-ISP programming, in fact I'm brand new to electronics (but not programming in general). I'll try my hand at reflashing after finishing some other projects.

    I'm having a lot of fun with these things, and I'm dreaming up all kinds of applications for them. Your support is outstanding as well.

    As it stands, my solution works quite well, because I actually like the hit of red at the beginning of each script--it's spaced out enough to be just right. Thanks again (and also to Fe2o3Fish for pointing out that I needed to pull my head out of my 4th point of contact and think about it in a different way).

    As a side note, do you have any suggestions for a good diffuser for the MaxMs (since they're too big for glue sticks)? I was thinking of a ping pong ball but would love to hear if you've used something particularly successfully.

    z
  • question

    zombieCat replied on December 03, 2008 05:03 to the question "Limiting Random Colors on a Standalone BlinkM" in ThingM:

    zombieCat
    OK, I tested it out and it works pretty well. I decided to stay away from the yellows, since they come out chartreuse, and I had to bump the green value WAY down (0x19, or 25). Since the amount of randomness is related to the previous amount of green, multiple high random values in a row were putting me in the chartreuse range. In case someone is interested, this script fades to full red and runs through a set of 25 random reds through orange-yellows and starts over infinitely (and it runs standalone, powered by 3 AA batteries):

    /*************************** BEGIN SCRIPT *********************************/
    #include "Wire.h"
    #include "BlinkM_funcs.h"

    void setup()
    {
    byte blinkm_addr = 0x10;
    byte script_id = 0;
    byte script_mode = 1;
    byte script_len = 27;
    byte script_rep = 0;
    byte fade_speed = 1;
    byte time_adjust = 0;
    byte script_speed = 450; // adjust the amount of time it takes for the script to run

    blinkm_script_line script_lines[] = {
    { 1, {'f', 1, 0x00, 0x00}}, // set fade speed speed to slowest
    { script_speed, {'c',0xff, 0x00, 0x00}}, // fade to bright red
    { script_speed, {'C',0x00, 0x19, 0x00}}, // fade to full red/partial-green
    { script_speed, {'C',0x00, 0x19, 0x00}}, // repeat 24 more times...
    { script_speed, {'C',0x00, 0x19, 0x00}},
    { script_speed, {'C',0x00, 0x19, 0x00}},
    { script_speed, {'C',0x00, 0x19, 0x00}},
    { script_speed, {'C',0x00, 0x19, 0x00}},
    { script_speed, {'C',0x00, 0x19, 0x00}},
    { script_speed, {'C',0x00, 0x19, 0x00}},
    { script_speed, {'C',0x00, 0x19, 0x00}},
    { script_speed, {'C',0x00, 0x19, 0x00}},
    { script_speed, {'C',0x00, 0x19, 0x00}},
    { script_speed, {'C',0x00, 0x19, 0x00}},
    { script_speed, {'C',0x00, 0x19, 0x00}},
    { script_speed, {'C',0x00, 0x19, 0x00}},
    { script_speed, {'C',0x00, 0x19, 0x00}},
    { script_speed, {'C',0x00, 0x19, 0x00}},
    { script_speed, {'C',0x00, 0x19, 0x00}},
    { script_speed, {'C',0x00, 0x19, 0x00}},
    { script_speed, {'C',0x00, 0x19, 0x00}},
    { script_speed, {'C',0x00, 0x19, 0x00}},
    { script_speed, {'C',0x00, 0x19, 0x00}},
    { script_speed, {'C',0x00, 0x19, 0x00}},
    { script_speed, {'C',0x00, 0x19, 0x00}},
    { script_speed, {'C',0x00, 0x19, 0x00}},
    { script_speed, {'C',0x00, 0x19, 0x00}},
    };

    BlinkM_beginWithPower();

    BlinkM_setAddress( blinkm_addr );

    BlinkM_stopScript( blinkm_addr);

    BlinkM_setStartupParams(blinkm_addr, script_mode, script_id, script_rep, fade_speed, time_adjust);

    BlinkM_writeScript( blinkm_addr, script_id, script_len ,script_rep, script_lines );

    BlinkM_playScript( blinkm_addr, script_id,script_rep,0 );
    }

    void loop()
    {

    }
    /***************************** END SCRIPT *******************************/
  • question

    zombieCat replied on December 03, 2008 04:18 to the question "Limiting Random Colors on a Standalone BlinkM" in ThingM:

    zombieCat
    Thanks for the reply Fe2o3Fish. The problem with doing that is that I end up with red-->random color-->red-->random color-->red, to infinity and beyond., when I want red-->random color-->random color-->random color, to infinity and beyond. I think the best I'm going to be able to do is:

    {script_speed, { 'c', 255, 0, 0}},
    {script_speed, { 'C', 0, 255, 0}}, ...40 or so times.

    Although not a fully random solution, I should be able to manage with it.
  • question

    zombieCat replied on December 02, 2008 07:25 to the question "How did you get LED strip to work?" in ThingM:

    zombieCat
    Matthew,
    r:0xff, g:0xff, b:0x00 is the definition for yellow. I've noticed that this value produced on the BlinkM (haven't tried the MaxM) is indeed a sickly green-yellow rather than true yellow. For an orange, try something along the lines of r:0xff, g:0x7F, b:0x00 (or even less green). I'm not too heavy on color theory, but reproducing web colors with BlinkMs is a black art at best and an exercise in futility at worst. (Sorry, I'm not slamming them--I love these things).

    Are you diffusing the light from the LEDs? That may help some. I saw a great suggestion from Tod that I use for my BlinkMs--a non-melted piece of glue gun glue on the LED makes a perfect diffuser. For the MaxM, maybe a ping pong ball with the bottom cut out?

    By the way, where did you pick up your LED strips?
  • question

    zombieCat asked a question in ThingM on December 02, 2008 06:59:

    zombieCat
    Limiting Random Colors on a Standalone BlinkM
    I'm trying to get a standalone BlinkM to run through a limited set of random colors. For example, I want only random colors from red to yellow. In some of the built-in scripts, I see that "random" colors (e.g. "old neon") aren't random, but a hard-coded list of specific colors.

    I wrote a sketch that first sets the color to red and then writes a script with the following call: { script_speed, {'H', 60 ,0x00,0x00}}. It seems that setting the first param to a low value limits the amount of change related to the last color, rather than the baseline (in this case red).

    I abandoned scripts in favor of the making calls to BlinkM_fadeToRGB() in the loop() function. This way I can generate a random number in each loop. The only problem is that this doesn't work for standalone applications. Adding calls to BlinkM_setStartupParams and BlinkM_playScript doesn't make sense, since there is no script being written (although I tried adding them in a desperate attempt to make it work).

    So, how would one go about writing a script for standalone applications where, for example, the red value would always be 255 and the green value would be a random number between 0 and 255 each time the script was repeated?

    Thanks,
    jeff
  • question

    zombieCat replied on November 25, 2008 00:30 to the question "Script isn't being saved to BlinkM" in ThingM:

    zombieCat
    OK, thanks to all for the input. I added the BlinkM_setStartupParams call and used Tod's modified BlinkM_funcs.h with the delay in the writeScript. Everything is working magically. By including both BlinkM_playScript and BlinkM_setStartupParams, the script runs on and off the board. One additional question--in this line:

    { 1, {'f', 20,0x00,0x00 }}

    ...what does the first number (1 in this case) control? I didn't see anything in the datasheet (maybe my skim reading was a bit too fast?).

    Thanks again, you all have been a great help. I love these things! Major kudos to ThingM for making them!
  • star

    zombieCat marked one of Will Pickering's replies in ThingM as useful. Will Pickering replied to the question "Script isn't being saved to BlinkM".

  • question

    zombieCat replied on November 24, 2008 15:34 to the question "Script isn't being saved to BlinkM" in ThingM:

    zombieCat
    Will,
    Thanks for the response. The correct script does not play when connected to the Arduino, and when it's disconnected, a previously uploaded script plays. As I look deeper over things, I'm not sure that it's the initial BlinMScriptWriter2 that's playing when disconnected--I think it may be a previously-uploaded script that's similar.

    I'll set up the startup params and see if that changes things (that was an easy one I should have caught). This brings up another question: For standalone applications, do I need to call both BlinkM_playScript and BlinkM_setStartupParams? If I'm understanding things correctly, calling BlinkM_playScript would ensure that the script runs when connected to the Arduino and calling BlinkM_setStartupParams would ensure that the script runs when disconnected--is that correct?

    Thanks again for the help.

    z
  • question

    zombieCat asked a question in ThingM on November 24, 2008 06:52:

    zombieCat
    Script isn't being saved to BlinkM
    I'm trying to run my BlinkM from a battery, and I'm having problems. I uploaded the BlinkMScriptWriter2, no problem. Now, when I try to upload a new script, it continues to run the BlinMScriptWriter2 script (after hooking it up to the battery--after upload, when it's still connected to my Arduino, it's just a steady white light). The script I'm uploading is an exact copy of the BlinMScriptWriter2 script, except I've changed the script array to that of the Thunderstorm script in blinkm_nonvol_data.h

    To clarify, I'm inserting the BlinkM into the Arduino, plugging the Arduino in, opening the Arduino software, compiling, uploading, closing the Arduino software, unplugging the Arduino, removing the BlinkM and hooking it up to a 5v power source. Here is the code I'm uploading:

    #include "Wire.h"
    #include "BlinkM_funcs.h"

    void setup()
    {
    byte blinkm_addr = 0x10;

    blinkm_script_line script_lines[] = {
    { 1, {'f', 1,0x00,0x00}}, // set color_step (fade speed)
    {100, {'h', 180,0xff,0x20}}, //
    { 20, {'H', 0,0x10,0x10}}, // randomize a bit
    {100, {'h', 175,0xff,0x20}}, // set dark blueish purple
    { 1, {'f', 200,0x00,0x00}}, // set fast fade speed
    { 2, {'h', 188,0x00,0xff}}, // white (no saturation)
    { 2, {'h', 178,0x00,0x00}}, // black (no brightness)
    { 4, {'h', 188,0x00,0xff}}, // white (no saturation)
    { 1, {'f', 30,0x00,0x00}}, //
    { 40, {'h', 172,0xff,0x10}}, //
    };
    byte script_id = 0; // can only write to script 0
    byte script_len = 10; // number of lines in script
    byte script_rep = 20;

    BlinkM_beginWithPower();

    // comment this out if you don't want to reset the address of your BlinkM
    BlinkM_setAddress( blinkm_addr );

    Serial.begin(19200);
    byte rc = BlinkM_checkAddress( blinkm_addr );
    if( rc == -1 )
    Serial.println("\r\nno response");
    else if( rc == 1 )
    Serial.println("\r\naddr mismatch");

    Serial.println("writing script...");

    BlinkM_writeScript( blinkm_addr, script_id, script_len ,script_rep,
    script_lines );

    BlinkM_playScript( blinkm_addr, 0,0,0 );
    }

    void loop()
    {

    }

    Any help would be appreciated.

    z