Programming Arduino

This week was on Programming arduino, using for loops, if/ else statements, makeing logical components from physical commponents, and learning the general functions for arduino. For my assignment i decided to make a simple program that would run through a for loop ten times if 6 secconds had passed and the button was pushed. Here is the code for that program and a short video and description of how everything goes together. code I used a basic for loop set up and encased an if else in the for loop, and placed the for loop inside a bigger if else. The rig has one application to my final project: when the bot is full the green light turns on as an actuator influences an input so that this loop runs and when it is ready to go the read led is able to turn on because another input was influenced by either a weight sensor or pressure plate or something of that category and function. Here is an alternate code for a led that is delayed after being pressed.  alt code  alt code This is the external or physical set up for the system. You can add red led or vibration motor and you will get an alarm when you press button 2(the one farthest from the camera.). setup Here is the end result: a stable light turning into a incremental/ buildup light.