Umm Coding
So long time no blog, but grad school visits + spring break + thesis === NO SLEEP! Ok yea and no work on ANYTHING except my thesis :(.
Luckily, I am not behind on what is due for this week. So on Tuesday I finished up challenge 5 & 6. 6 should have been insanely easy but it wasn't because I had pulled an all nighter earlier and my brain wasn't working! I CANNOT code on no sleep :(. Here are some pictures of my code :).
Challenge 5 code is below:
So the nice thing with using light sensors instead of trigger sensors, is that you don't need to code in a wait time at all. So all done with challenge 5 :).
block test-t1 is how I got challenge 7.2 to work. Basically I did a nested if statement that allows you to check if it should add to count or subtract from count. test-ed2 is what I wrote for challenge 7.1 (the easy part!). Basically the net count was very simple. I am on challenge 7.3 now. I have created and built my lego car (woooot lots of fun) and just need to code challenge 7.3 which should be no problem. I'll post pics of my car and the code from challenge 7.3 on tuesday!
Luckily, I am not behind on what is due for this week. So on Tuesday I finished up challenge 5 & 6. 6 should have been insanely easy but it wasn't because I had pulled an all nighter earlier and my brain wasn't working! I CANNOT code on no sleep :(. Here are some pictures of my code :).
Challenge 5 code is below:
So the nice thing with using light sensors instead of trigger sensors, is that you don't need to code in a wait time at all. So all done with challenge 5 :).
Here is the bread board connected with 2 different switches. I used this for testing challenge 6. I was able to make the multiple threads using this code below:
So I just modified Robbie's code to include a second edge and if either edge is triggered then my bread board flashed -- SIMPLE. Ok I lied -- I had no problems with challenge 6 it was challenge 7.2 (described below) that took about 30 minutes longer than it should!
Comments
Post a Comment