Directions: Create 3 rabbits, Convert an Image, and play a game for at least 10. minutes. When done answer the following Exit Questions on a half-sheet of paper.
Convert an Image into ASCII Art:
Find an image on the internet and upload it to the site. It will automatically convert it into ASCII http://picascii.com/
You will select among several code tutorials and code (program a computer) for an hour. You may stick with one tutorial or switch out. The purpose is to code for an hour and expose you to the creativity and fun that computer science and programming can be! You will be graded based on participation and completion of reflection questions.
Objective: Code using a tutorial for one hour.
Hour of Code Tutorials
MineCraft: Use coding blocks to travel through a Minecraft world.
Star Wars: Use Javascript to program droids and create a Star Wars game
Flappy Bird: Create a clone of flappy bird using coding blocks.
1. What does the number next to each of the notes above mean? 2. Follow the model above and write a new note. 3. Examine the code above and explain what you would need to do in order to play three notes. 4. Look at the above code and write the code needed to place the melody into a loop
Connect the wires as shown to complete a circuit with the Piezo buzzer.
The negative wire should go to the digital ground pin while the positive wire should go to digital pin number 8 and positive should be in ground. If that does not work, place the positive wire in the 5v power pin.
To code the Piezo buzzer you will need to create a tab or file that your main Arduino code can access. You should call this new tab pitches.h
To create a new tab click on the arrow located all the way to the right and select New Tab.
Name this tab pitches.h and insert the new code. Use the code located here to cut and paste into a pitches.h tab
Figure out how to adjust the delay between each note.
Can you play a recognizable tune? (Note: delete everything in your pitches.h file and insert all the following code into the Arduino Main sketch). You do not need any resistors and make sure your positive wire is in pin 13 and your negative wire is in pin 3.
Directions:
Visit the following web address and complete the questions. You just need the answers.
A. Arduino DigitalWrite Function
1. What is the name of the function?
2. What does it describe (ie: What does it do?)
3. How do you write it (ie: What is it’s Syntax?)
4. What is it’s parameters (ie: What information can you put inside of it?)
5. When would you use the function?
6. Create an example digitalwrite function
B. Arduino AnalogWrite Function
1. What is the name of the function?
2. What does it describe (ie: What does it do? HINT: Read the first two sentences)
3. How do you write it (ie: What is it’s Syntax?)
4. What is it’s parameters (ie: What information can you put inside of it?)
5. When would you use the function?
6. Create an example analogwrite function.
C. Arduino PinMode Function
1. What is the name of the function?
2. What does it describe (ie: What does it do?)
3. How do you write it (ie: What is it’s Syntax?)
4. What is it’s parameters (ie: What information can you put inside of it?)
5. When would you use the function?
6. Create an example pinMode function.
D. Arduino digitalRead Function
1. What is the name of the function?
2. What does it describe (ie: What does it do?)
3. How do you write it (ie: What is it’s Syntax?)
4. What is it’s parameters (ie: What information can you put inside of it?)
5. When would you use the function?
6. Create an example digitalRead function.
Use the word-bank to match the term to the correct description
LED
Transistor
DC Motor
Servo Motor
Resistor
1___________used to restrict electrical current
2__________type of motor that angles
3__________amplifies or boosts electrical power
4__________a type of light that takes 1.5 volts of power
5__________type of motor that spins
Examine the Arduino Board and match the number with the Arduino component. Use the word bank to help. Note: You will NOT use all the words in the word bank
Digital Pins
Power Pins
Voltage Regulator
Reset Button
6_________________________(answer for number 1 in picture)
7_________________________(answer for number 2 in picture)
Arduino and Breadboard Practical Exercise: Look at the Arduino and Breadboard and answer the following questions. Note: The lack of power in the Arduino board does not constitute a correct answer.
Picture 1: Close-up
Picture 2: Far away
8 Identify one problem of this Breadboard set-up. Be specific as possible:
9 Identify another problem of this Breadboard set-up. Be specific as possible:
10 Explain what you would need to do to correct this Breadboard set-up. Be specific as possible.