Difference between revisions of "CSC231 Lab 4"
(→Tutorials) |
(→Setup) |
||
Line 26: | Line 26: | ||
* You should get a window with blue bars and menus. That's the Arduino IDE. | * You should get a window with blue bars and menus. That's the Arduino IDE. | ||
* Connect the '''USB cable''' to the '''computer''', and the '''Arduino''' to the USB cable | * Connect the '''USB cable''' to the '''computer''', and the '''Arduino''' to the USB cable | ||
+ | * In the '''Tools''' menu of the IDE, select '''Board''' and make sure '''Diecimila''' is selected (that's the chip on your Arduino stamp) | ||
+ | * In the '''Tools''' menu, select '''Serial Port''' and make sure the '''/dev/ttyUSBxxx''' is selected. (xxx can be 0, 1, 2... ) | ||
===Tutorials=== | ===Tutorials=== |
Revision as of 11:18, 26 September 2008
Back to CSC231 Weekly Schedule
CSC 231 Lab # 4
© D. Thiebaut, 2008
Arduino
You will find information on how to setup the Arduino software on a Mac and on a Linux box [[CSC231 Links and Resources | here]. These represent the step I took to install the software on my machines. I didn't document installing under Windows as the Web has very good coverage of these steps.
Setup
- Boot your PC with the Ubuntu LiveCD which you will have received.
- Select the "start Ubuntu without modifying computer" option
- Wait a minute or so until everything is loaded
- Double click on the Examples folder
- Click on the icon showing a page and a pencil to open the navigation box
- Enter /root in the navigation box
- Open the arduino-0010 folder
- Click on the arduino application to start the IDE for the arduino chip.
- When faced with a window asking you how you want to run the GUI, select Run
- You should get a window with blue bars and menus. That's the Arduino IDE.
- Connect the USB cable to the computer, and the Arduino to the USB cable
- In the Tools menu of the IDE, select Board and make sure Diecimila is selected (that's the chip on your Arduino stamp)
- In the Tools menu, select Serial Port and make sure the /dev/ttyUSBxxx is selected. (xxx can be 0, 1, 2... )
Tutorials
Follow the very nice tutorial pages created by Limor, a young talented engineer/geek/programmer:
- Lesson 1: Skip the first part, and go to the Startup! Section.
- Lesson 2. Do the whole lesson. Save to your memory stick whenever you are asked to save your sketch. Do the exercises at the end (and turn the lights off for Exercise 3!)
- Lesson 4. Do the whole lesson, and stop when you get to the Pythagorean party section. Just for kicks, check the section labeled Introduction to types, part 2, do you recognize anything? :-)
You can find more lessons and information on Limot's tutorial page: http://ladyada.net/learn/arduino/ :
Wiki Page
- Go to the Student Wiki-Page portal for the class: http://tango.csc.smith.edu/classwiki/index.php/CSC231_Page
- Study the "A quick tutorial on the basic elements of a wiki page", and look at its code by editing it (don't modify anything)
- Create a new page starting with the 231a-xx link you will find on the portal page.
- If you feel confortable having your name and/or picture on the wiki page, add it/them. Remember that these pages are linked to my Smith Web sites, available to Web spiders and bots, and accessible (for reading) to anybody on the Web.
- Define several sections:
- A project section
- A project ideas subsection
- A demos and examples section
- A resource section, where you will collect links to sites you discover, and which contain good/useful/interesting information relating to this project.
- Any other sections, subsections, pictures, description you feel will enhance the information and navigation on your project page.
- A project section
- In the resource section, create links to the tutorials/lessons you just went through
- In the demos and examples section, copy/paste the code of the sketches you have created In the Arduino part of the lab.
- Add a picture of the Decemilia Arduino to your page (be efficient; don't upload a picture if it already exists in this mediawiki site!!!)
Lab Report
The lab report is the wiki page you just created, plus a list of project ideas in a special section you will create for this purpose.
The report is due a week after the lab, next Friday
I would like you to do some research and think of ideas of simple projects you can build around the Arduino. The idea is to use the input/output ports of the Arduino chip and write an assembly language program that will monitor the inputs and control the outputs so that your project "does something interesting." :-)
You should also contact one person (not your instructor) about ideas of projects. We have many people on the Smith and Hampshire campuses doing research and in need of gadget for various projects (control, measurement, music, lighting, etc.) and part of your assignment is to locate one such person and get some ideas of something that they could use that would work with a few switches, leds, displays, and possibly servo motors. You are not forced to implement anything that this person would need. At this point all we want to gather is ideas!
The limitation, and the challenge, is that you cannot spend more than $20 on external parts! (the funds will come from the CS department)
Here are some ideas of mine, that can get you started.
- Connect the Arduino to an infra-red LED and write a program that will make the arduino send the same patterns of ON/OFF signals to the LED as remote controls do for TVs, and stereo systems. The project could be to design an intelligent remote control that could turn on and setup different stereo components of a home-theater system.
- Wire up a thermistor (resistor that changes resistance with temperature) to the Arduino and create a temperature sensor. The assembly program could be used to create a graph of the variation of temperatures over time.
- Wire up an LCD display to the Arduino and display information in real time on the parameters of some experiment.
- Use infrared diodes and infrared receivers to make two Arduinos communicate with each other over an infrared link.
Finally, as you browse the Web for ideas and information on the Arduino, add your discoveries to the Help/Resource section of the class wiki page (http://tango.csc.smith.edu/classwiki/index.php/CSC231_Page).