Wednesday, December 14, 2016

Reflection of class on Dec 13th
  Well, it’s really a wonderful guessing game that the unique red, green, blue light-emitting diode can blink in different color as the reflection to the guess made by players, that is, the red light will blink for 5 times in almost 1 second when players input a number higher than the default number provided randomly by procedure, the blue light will blink when the guess number lower than default, the green light will blink when the guess number is matching the default.
  It sounds so good, but actually it’s too difficult for me to design and program a corresponding procedure to let this guess game be interactive and interesting without any blemish. So I follow the steps in the example and type relative codes in Python 3 editor interface seriously with detailed annotation. You know, it’s not a simple and easy program.
  And before I began to program, I need to assemble a new physical circuit to make sure the 3 color light-emitting diode can work successfully when it receives the electrical signal from GPIO when the procedure transfers the pins. All the operations to the new circuit were similar with last circuit except the diode, there are four legs which represent different color of the light, that is, the longest leg connects toward the negative, two legs around the longest one represent red and green light, the shortest leg represents blue light. So, I had to pay attention to this item and insert four legs to the right holes of the solderless breadboard to make the circuit to an entire loop.
  To be honest, the example procedure was not so difficult to understand, I can completely make sense about every line of codes though I took almost 1 hour to do that. What I confused about was that I couldn’t run my procedure successfully after I typed in all the example codes, there was an error information appearing said that ‘EOL while scanning string literal’ when I pressed the F5. I checked all the codes about string and tried many times to figure it out but the error was still there so that I couldn’t see how the new diode work.

  I was so sad about this till the ending of the class because my classmates had run the procedure very well. Fortunately, I found I typed an extra quotation at the end of ‘intro’ string and the procedure worked perfectly after I deleted that. I think I need to be more prudent when I program the procedure next time.

1 comment:

  1. Wow! What a small error to keep the whole process from working. I am very impressed that you eventually found it and got everything working!

    ReplyDelete