Sep. 20
Assignment Journal 02
I'm very excited that we start working on the programming part. It was easy to put the chip on the board, just need to know which pins are the one we need.

I started working on the blinking LED first. It's not difficult but I still spent a lot of time on it. The reason that it didn't work out is I didn't write "Do..Loop" in the code. That's why it was actually executing my code but I didn't know: it was finished already.


After I put the switch on, I got confused immediately. What I was trying to do was actually simple. I have two sets of LEDs and I want them to blink according to the switch. The first thing that confused me was that, unlike what we used to think, getpin(n)=1 actually means an open circuit. And I didn't put the switch in a complete circuit, either. So, when we put the switch on the board, we need to make sure it has a separate circuit than the one that goes through the chip.

So my code is pretty simple. When the switch is on, the yellow one will blink, otherwise the green ones will blink in turns. There are some parts in the code that can be modified, but at least now it works fine.

  see the chart chart
The yellow LED lights when I press the switch.(very kind Doron gave me this switch so it's easier for me to control. Thank you!)