Saturday, November 7, 2015

Week 1: My First Circuit Board


ETEC 597: Maker Spaces Log:  Star Date 20151107
 
1.   Week 1 Challenge is complete and working (please see my YouTube video at this link:  https://www.youtube.com/watch?v=cLL919L4Mpk )

2.    This project was a pretty simple configuration and coding project for a blinking light.  I found this project to be fun and engaging.  I recalled some of my coding knowledge. The only hiccup was having 2 USB cords laying by the computer and plugging in the wrong one and not get a response from the board (DUH)!
Code for this project

/*
   Blink
   Turns on an LED for one second, then off for one second, repeatedly.
    This example code is in the public domain.
   */
// Pin 13 has an LED connected on most Arduino boards.
// give it a name:
int led = 13;
// the seup routine runs once when you press reset:
void setup() {
  // initialize the digital pin as an output.
  pinMode(led, OUTPUT);
}
// the loop routine runs over and over again forever:
void loop() {
  digitalWrite(led, HIGH); //turn the LED on (High is the voltage level)
  delay(3000);            //wait for a second
  digitalWrite(led, LOW); //turn the LED off by making the voltage LOW
  delay(3000);            //wait for a second

 Here is a picture of my Week 1 Project

 

Electronic Drawing:

This is my Visio Drawing of my project.


Circuit Play

  1. What happens if you turn the LED around (reverse the wiring)?

  2. It does not work.  The light does not flash.

  1. What happens if you remove the positive lead from the breadboard? Does the circuit still work?
If you remove the positive lead, the board still works, which makes me question the purpose of the positive lead.

  1. What happens if you place the resistor to the positive side of the LED and simply used a wire to run back from the LED to ground? When you do this, you will need to change up the wiring a little so check this closely to make sure you have not shorted out the circuit.
  2. The Pin 13 Troubleshooting light still flashes off and on., if without the LED light.  Does this mean the board is in troubleshooting mode?  I will need to research this.

  1. What happens if you move the wire from port 13 to port 12 on the Arduino?
  2. The Pin 13 Troubleshooting light still flashes off and on., but the LED does not.  Probably because the board is not properly grounded. 
Code Play

  1. If you moved the wire from port 13 to port 12 on the Arduino, what do you need to change in the code?
int led = 12

  1. What happens if you change the two delay code lines from delay(1000) to delay(2000)? Take out a stop watch or timer of some sort and time the rate of blinking for each of these settings. How many times does the LED blink in a minute for each of these settings? What have you learned about the value that is placed between the parenthesis after delay()? What value (parameter) would you place in delay() if you wanted the LED to blink at a rate of once every 3 seconds? How about every half second?

The larger the number, the longer the light stays on, thereby creating the blinking effect.  Therefore, to create a blink every 3 seconds, the value in the delay code has to be delay(3000).  For a half second delay, delay(500).

  1. What happens if you place // before the words void setup()?
  2. What happens if you place // before the words void loop()?
// is for comments and does not act as active code.  When you start a line with //, it is just to make a note so that other coders will know what you are doing with your code.

  1. What happens if you remove the last curly brace “}” in the program?

The program will not run because it is not a completed program.

  1. What happens if you place a // before pinMode(13,HIGH) in setup()?

// is for comments and disables that part of the code.

  1. What happens if you changed HIGH to high on the pinMode(13,HIGH) line?

high (as opposed to HIGH) is not a recognize varirable and will not turn the LED on.  

  1. What happens if you change the word pinMode to pinmode in pinMode(13,HIGH)?

pinmode is not a recognized function and will not set the pin mode.

Final Reflection:

I really enjoyed this first project.  The steps it took to configure the project, includes paying detailed attention to the ports on the bread board and the circuit board may the whole project worthwhile when I finally got it to work. The coding brought back some coding memory that I had not used in a while.  It gave me confidence to continue on.  Can’t wait until the next project.

 
   

No comments:

Post a Comment