Day 13: Continuing with project; Combining the two parts (PT. 2)

Project:

We are starting with the button this time, because the button wasn’t working yesterday. After many trials we started to eyeball the code more closely.
light sensor code button Vs. project_combination_code project_combination_code2 project_combination_code3
I had to insert:

  • “int switchPin = 6;” Which is identifying the button at digital pin 6
  • “digitalWrite(switchPin , HIGH);” to tell that the button when touched means activate

We believe it works now, the light sensor detects values and the system is aware when the button is pressed. Below is the code in ardgiblocks;
project_combination_blocks
project_combination_blocks2

I think the only thing that will have to be further looked at is the serial inputs and what the lilypad can pick up. The values will be important and will have to be evaluated when we can go out and test them.