Adding the color sensor detection triggers
Now that you have installed the sensors, you have to find a way to activate the scorpion as it would act and behave when feeling threatened. In this build, you will use red and yellow 3L beams to create a trigger in our code so that when something bumps into the scorpion from the front, it will go into attack mode by lunging its tail forward toward the enemy. Through the use of pins and rubber bands, you can create a trigger mechanism that will push the red and yellow pieces forward to activate the color sensor.
When nothing is pressing on these elements, the rubber bands will pull them back to their original starting position.
You will need the following pieces:
- Two yellow 3L beams
- Two red 3L beams
- Two black 3x7 angular beams
- Two blue connector pins
- Two tan axle pins
- Two gray axle pins
- Two gray bush stops
- Two gray connector pins with bush stops
In the following screenshot, you can see how...