Feedback

Please leave feedback and comments. I am always interested to hear how people get on using these LScripts!

Monday 3 September 2018

Arduino Project FX v1.0e [PublicRelease]



This is an early binary release of my arduino FX engine stripped to allow realtime effects seen on my youtube videos. A more extensive version is to come soon but until then this will give a taste of the engine running limited up to 600 leds.

  It requires an Arduino MEGA 2560 Rev 3 (ATmega2560), an SSD1306 0.96' I2C 128x32 OLED, three buttons to interface and 33ohm resistors for data protection.

  You can always find the latest version at
  http://www.stephenculley.co.uk/

This is free software; you can redistribute it and/or modify it under the terms of the CC BY-NC-SA 3.0 license.

Please see the included documents for further information.

Commercial use of this software requires you to buy a license that will allow commercial use. This includes all classes,  modified or not, as a tool to sell products.


Download

Documentation (PDF)
Binary for Arduino ATmega2560 (Zip)


Version

  v1.0e

    - SSD1306 I2C 128x32 OLED display (must be connected)
    - 3 button interface
    - Stack based processing
    - Accurate timing
    - Shared Memory engine
    - Cached / Delayed write EEPROM
    - Patch connected Buffer and Output
    - Simultaneous multiple signal pin out (Output)
    - Compatible with WS2811, WS2812, WS2812B
    - 27 FX Presets
    - 6 FX Plugins (currently unavailable)
    - Early implementation of FX plugins
    - Cycle Mode
    - Preset Mode
    - User customisation
    - Maximum LED limit of 600 nodes
    - 20 frames per second target playback
    - Colour / Hue selection
    - Menu engine
    - LED for information


Project FX (magic) is designed to be a simple stand alone self contained engine for running a christmas tree or trees with user editable presets. It is designed to run at a target of 20 frame per second tho this can be configured by presets.

It uses a stack engine (FX) to create complex effects that in next release will have Custom Mode and editor for creation of of effects by user and saved and reloaded allowing creation of many effects in real time as you edit. The presets already built in use this this stack to create effects and this will be built upon over time.

This uses a custom buffer, patch and output system and allows complex output configurations tho for this release it is currently configured as a single output for a stand alone tree use.


Source Code

  The source will become available once it has been documented and all goal features are ready and stable.


Parts List
 
  1) Arduino MEGA 2560 Rev 3 (ATmega2560)
  2) SSD1306 0.96' I2C 128x32 OLED
  3) 3 x Push buttons
  4) 33ohm resistors
  5) 100ohm resistors (optional protection)


Sunday 29 July 2018

Changes in Web Hosting

Due to changes in my web hosting my blog is currently undergoing updates. If files go offline you can still access all LScripts on my Google Drive until a permanent solution is in place. 

https://drive.google.com/open?id=1cR_q2GVUAJHumic1-A3eXV16acQnVTWs

Thursday 12 April 2018

LScript - Modeler_Compound


LScript (Modeler) to offset points based on total offset by compounding across selected points.

Compatible with Newtek LightWave 9.6 and above.

// LScript Modeler - www.StephenCulley.co.uk
//
// web   address: http://www.stephenculley.co.uk
// email address: email@stephenculley.co.uk

/*  
    LScript Modeler - Compound

    Modeler_Compound.ls

*/

@version 2.2
@warnings
@script modeler
@name *Compound

    // Title
    sTitle = "*Compound";

    // Version
    sVersion = "v1.0";
    
    ctrl_c0, ctrl_c1, ctrl_c2, ctrl_c3;

main
{

    // Store
    bAxisX = recall("bAxisX",true);
    bAxisY = recall("bAxisY",false);
    bAxisZ = recall("bAxisZ",false);
    fDistance = recall("fDistance",0.0);

    reqbegin(sTitle + " " + sVersion);

    // Reset
    ctrl_res0 = ctlbutton("Reset",50,"button_reset"); // Button Reset
    ctlsep();

    // Control
    ctrl_c0 = ctlcheckbox("X", bAxisX);
    ctrl_c1 = ctlcheckbox("Y", bAxisY);
    ctrl_c2 = ctlcheckbox("Z", bAxisZ);
    ctrl_c3 = ctldistance("Distance",fDistance);

    // Developer
    ctlsep();
    ctrl_dev0 = ctltext("","developer: Stephen Culley","http://www.stephenculley.co.uk");

    return if !reqpost();

    bAxisX = getvalue(ctrl_c0); // X
    bAxisY = getvalue(ctrl_c1); // Y
    bAxisZ = getvalue(ctrl_c2); // Z
    fDistance = getvalue(ctrl_c3); // Distance

    // Store
    store("bAxisX",bAxisX); // X
    store("bAxisY",bAxisY); // Y
    store("bAxisZ",bAxisZ); // Z
    store("fDistance",fDistance); // Distance

    // Selection - Point (DIRECT)
    selmode(DIRECT);
    iPointCount = pointcount();
    if(iPointCount <= 1) error("None or not enough points selected.");

    undogroupbegin(); // Undo

    moninit(iPointCount,"Processing...");  // Progress Monitor

    vStep = <fDistance / (iPointCount - 1),fDistance / (iPointCount - 1),fDistance / (iPointCount - 1)>; 
    vCompound = <0.0,0.0,0.0>; // Compound

    editbegin();

        for(iCurrentPoint = 1; iCurrentPoint <= iPointCount; iCurrentPoint++)
          {
          vPoint = pointinfo(points[iCurrentPoint]);
          if(bAxisX) vPoint.x = vPoint.x + vCompound.x; // X
          if(bAxisY) vPoint.y = vPoint.y + vCompound.y; // Y
          if(bAxisZ) vPoint.z = vPoint.z + vCompound.z; // Z
          pointmove(points[iCurrentPoint],vPoint); // Move point           

          // Compound
          vCompound += vStep;

          monstep(); // Progress Monitor
          }

    editend();

    undogroupend(); // Undo
}

button_reset
{
    setvalue(ctrl_c0,true); // X
    setvalue(ctrl_c1,false); // Y
    setvalue(ctrl_c2,false); // Z
    setvalue(ctrl_c3,0.0); // Distance
}
All scripts available at my Google Drive at
https://drive.google.com/open?id=1cR_q2GVUAJHumic1-A3eXV16acQnVTWs

Saturday 3 March 2018

LScript - Modeler_Converge


LScript (Modeler) to align points based on last or previous selected or average points.

Compatible with Newtek LightWave 9.6 and above.

// LScript Modeler - www.StephenCulley.co.uk
//
// web   address: http://www.stephenculley.co.uk
// email address: email@stephenculley.co.uk

/*  
    LScript Modeler - Converge

    Modeler_Converge.ls

*/

@version 2.2
@warnings
@script modeler
@name *Converge

    // Title
    sTitle = "*Converge";

    // Version
    sVersion = "v1.0";
    
    ctrl_c0, ctrl_c1, ctrl_c2, ctrl_c3;

main
{

    // Store
    bAxisX = recall("bAxisX",true);
    bAxisY = recall("bAxisY",false);
    bAxisZ = recall("bAxisZ",false);
    iSelected = recall("iSelected",1);

    reqbegin(sTitle + " " + sVersion);

    // Reset
    ctrl_res0 = ctlbutton("Reset",50,"button_reset"); // Button Reset
    ctlsep();

    // Control
    ctrl_c0 = ctlcheckbox("X", bAxisX);
    ctrl_c1 = ctlcheckbox("Y", bAxisY);
    ctrl_c2 = ctlcheckbox("Z", bAxisZ);
    ctrl_c3 = ctlchoice("Selected",iSelected,@"First","Last","Average"@);

    // Developer
    ctlsep();
    ctrl_dev0 = ctltext("","developer: Stephen Culley","http://www.stephenculley.co.uk");

    return if !reqpost();

    bAxisX = getvalue(ctrl_c0); // X
    bAxisY = getvalue(ctrl_c1); // Y
    bAxisZ = getvalue(ctrl_c2); // Z
    iSelected = getvalue(ctrl_c3); // Selected

    // Store
    store("bAxisX",bAxisX); // X
    store("bAxisY",bAxisY); // Y
    store("bAxisZ",bAxisZ); // Z
    store("iSelected",iSelected);

    // Selection - Point (DIRECT)
    selmode(DIRECT);
    iPointCount = pointcount();
    if(iPointCount <= 1) error("None or not enough points selected.");

    undogroupbegin(); // Undo

    moninit(iPointCount,"Processing...");  // Progress Monitor

    editbegin();

        if(iSelected == 1) vConvergePoint = pointinfo(points[1]); // First
        if(iSelected == 2) vConvergePoint = pointinfo(points[iPointCount]); // Last
        if(iSelected == 3) // Average
          {
          vConvergePoint = <0 .0="">;
          for(iCurrentPoint = 1; iCurrentPoint <= iPointCount; iCurrentPoint++)
            {
            vConvergePoint += pointinfo(points[iCurrentPoint]);  
            }
          // Resize by points
          vConvergePoint *= 1 / (iPointCount - 1);
          } 

        for(iCurrentPoint = 1; iCurrentPoint <= iPointCount; iCurrentPoint++)
          {
          vPoint = pointinfo(points[iCurrentPoint]);
          if(bAxisX) vPoint.x = vConvergePoint.x; // X
          if(bAxisY) vPoint.y = vConvergePoint.y; // Y
          if(bAxisZ) vPoint.z = vConvergePoint.z; // Z
          pointmove(points[iCurrentPoint],vPoint); // Move point           

          monstep(); // Progress Monitor
          }

    editend();

    undogroupend(); // Undo
}

button_reset
{
    setvalue(ctrl_c0,true); // X
    setvalue(ctrl_c1,false); // Y
    setvalue(ctrl_c2,false); // Z
    setvalue(ctrl_c3,1); // Selected
}
All scripts available at my Google Drive at
https://drive.google.com/open?id=1cR_q2GVUAJHumic1-A3eXV16acQnVTWs

Thursday 25 January 2018

Arduino Christmas Lights UPDATE - WS2811 / Arduino Mega2560

I have been working non stop on the code ready to be released, I have been able to optimise and improve efficiency and allowed me to get it ready for further features.

"Public Release 'falalalalala' (Mega 2560) v1.0b" is in its final testing and will be released shortly with a new demo video on youtube to come shortly.

Current features include in first release (Public Release 'falalalalala' (Mega 2560) v1.0b) :-

  • Customised effects.
  • Colour selections.
  • Consistent and time accurate effects for smoother playback at 20 frames per second.
  • Auto-save feature to update automatically when a user changes settings.
  • 128x32 OLED display.
  • 3 button interface.
  • Stack based effects tree (this is to get ready for further expansion)
Features coming :-

  • SD card access.
  • Scripting language.
  • Playback of text written effects.
  • Audio interaction and playback.
  • Custom effects created on board via stack.
I appreciate your time and patience as I wish to give everyone a magical experience and many happy Christmas trees and smiling faces.

Stephen