23 October 2023

Scaffolding: Project Review - Ender Lilies Flower Brush + Umbral Knight's Sword

 The Flower Brush controller uses two main components, the actual flower brush itself, and the knight sword. The controller works by using many proximity/motion sensors (cost determining), to substitute the inputs of a standard controller/keyboard. Ideally the flowers would light up as the input is read, though material costs might prohibit this. The sword is where horizontal movement and up and down inputs are handled. The sword itself is a 2 way switch, with the player needing to push it up or down in order to control up/down inputs. The handle for the sword is a potentiometer, turning it one way or the other will act as left/right inputs, with variable speeds based on how far it is set. 

The Circuit Playground is housed within a base that connects to the flowers and the sword, it would be encased entirely in the case. The flowers of the bush, if cost enabled would glow white normally, until "activated" where they would glow red for as long as the input was being held/used. If costs didn't allow for this they would be red all the time. 

The actual functionality still needs a bit of work, though if 10 different sensors are too much for the CPE, I could cut back to 8 if I cut out the start and select buttons, and I can cut it further to 2 or 3 proximity sensors that would require certain distances for each input.

Pseudo Code Below:

#Include Libraries

Setup any potential global variables


{

    Setup Code

}


{

    //The following code should be repeated //each time a different input is desired

    //so 8 times, even using the culled flowers, the code will stay as is, and should work


    If( Proximity sensor reading <= certain range)

    {

        Push down 'X' key 

        //'X' is a placeholder for each individual key

        (Delay)

    }


    else

    Push off 'X'


    //Next is the code for the movement inputs, which use the Sword and Sword handle as         switches/potentiometers to control input/movement of the character The game allows for     variable speed when going left and right, so I will try to include that with the potentiometer


    //Potentiometer/left+right first


    if(Analog read resist >= X)

    {

        //Nested statement for increased speed control on movement

        if(Analog read resist >= Y)

        {

            Left/right heavy input

        }


        else

        Left/right light input

    }


    //The code above is repeated and inverted for opposite input


    else

    no Left/right input


    //Next is the switch or the up down input


    if(Switch position == 1)

    {

        input up

    }


    if(Switch position == 2)

    {

        input down

    }

}



 


 

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.