Wednesday, September 10, 2014

Arduino Project 1


Introduction:
It's time to put what we've learned together into a (basic) project. Here's what we've worked on so far:

  • Connecting the Arduino to a computer
  • The Arduino IDE and uploading sketches
  • Using jumper wires with a solderless breadboard
  • Safely powering LEDs with Arduino
  • Using pins on Arduino as digital outputs and digital inputs
  • Using a momentary push button switch to indicate a logic state
  • Various Arduino commands and syntax, including
  • defining and assigning variables
  • pinMode()
  • digitalWrite()
  • digitalRead()
  • if()
  • else()
  • delay() 
At this point, you don't need to be an expert on all of the above-mentioned topics, but you should at least have a basic recollection of what we did and how they work. Go back and revisit our previous activities if necessary before continuing with this project.

Click through the break to begin this project:

Tuesday, September 9, 2014

A Toggle Button

Copy and past the code below the line of asterisks:

**********************************************

Friday, September 5, 2014

Working with Inputs (Introduction)


Image used under CC0 licence


Copy and paste the code that follows the line of asterisks:

*************************************************

// Define some variables for later use ...
//    - "const int" is used for values that won't chance in our sketch
//    - we're going to make a constant integer called "ledPin" and assign it to the pin the LED is connected to

const int ledPin = 8; // substitute whatever pin you're using for 8

//    - now make a constant integer called "buttonPin" and assign it to the pin the button (or switch) will be connected to

const int buttonPin = 5; // susbtitute whatever pin you're using for 5

//    - "int" is used for values that will change in our sketch
//    - we're going to make a integer variable called "buttonState" that we'll use to measure the button's state

int buttonState;

// Intialize the pins in the setup:

void setup()
{
  pinMode(ledPin,OUTPUT); 
  pinMode(buttonPin,INPUT_PULLUP);
}

// Put the code to be run over and over in the loop:

void loop()
{
  buttonState = digitalRead(buttonPin); // we're "reading" the voltage on in the input pin and assigning it to our variable called buttonState
  // Since we did a digital read, there are only two possible values now for buttonState -- it's either HIGH or LOW
  
  if(buttonState == HIGH)
  {
    digitalWrite(ledPin,HIGH);
  }

  else
  {
    digitalWrite(ledPin,LOW);
  }


}

Sunday, May 18, 2014

Making 3D Images

Photo by Marc Di Luzio, cc license.
As we studied light, optics, and human vision, we discussed a relatively simple way to make your own red cyan anaglyphs at home. A little searching online easily brings up many guides on how to do this process. The following guide is a good one, since it is thorough and requires only freely available software. The image editor it uses is a free alternative to Photoshop called gimp (the GNU Image Manipulation Program). Many other alternate programs (including Photoshop itself) can be substituted.

The guide can be found here:
http://graphicssoft.about.com/od/gimp/ht/3danaglyph.-UkA.htm

Have fun, be creative, and let's make some cool 3D images to share!


Wednesday, February 19, 2014

Science Fair Details

The registration deadline for the science and engineering fair at SC4 is right around the corner. We are going to again use SC4's documentation as a basis for our projects here at Yale.

Take a look at page 9 from the science fair booklet. It shows the proper layout of the finished project. Additional detail can be found in the complete booklet.

For students wishing to enter the fair at SC4, I've copied the instructions below:

Here's what you need to do:
1) Complete your fair project! Do a great job, keeping in mind what we are judging you on. See the grading rubric in the booklet to remind yourself of the requirements, or email me at jgibbons@sc4.edu<mailto:jgibbons@sc4.edu> to get a copy.
2) Participate in your own school fair. If your school doesn't host a fair that's ok. Please contact me to let me know.
3) Register for the County Fair using the new web form here www.sc4.edu/science-fair<http://www.sc4.edu/science-fair> . If you are working as a group the registration form will allow you to sign up using one form for the group.
4) Send in your $10 registration fee per participate. Each member of the group needs to pay a registration fee since that is what we use for your shirts and pins, etc...Make checks payable to St. Clair County Community College. Mail your payment to:
SC4 Business Office
Attn: Science Fair
Room 220 Main Building
323 Erie St.
P.O. Box 5015
Port Huron, MI 48061-5015


5) Go to the SC4 College Center building on March 6th between 3:30 and 6 pm to set up your project. This is the same location it has been for many years now.
6) Check the website (I hope) for an update on which participants are invited back to the fair for a second round of judging. This judging determines the Grand Awards and the Best of Show awards. The top Blue Ribbon winners will receive a call to arrange for an appointment on Saturday morning to help the judges understand their work. This is required to be considered for a Grand or Best of Show Award.
7) All participants are invited back to the open exhibit time between 12-2pm on Sunday, March 9th. The Awards ceremony will be held at 2 pm in the Fine Arts Theater.
8) After the ceremony participants are encouraged to remove their projects from the College Center. Everything needs to be picked up by 5 pm on Sunday.