WEEK 1
Figure 1.0 - Arduino Hardware board
Week 1 Progress:
- Plan and assign assignments among group members
Mohil: Blog aspect
Ronak: technical aspect
Rushi: technical aspect
Sagar: helper with multiple tasks
- Look up several different Arduino Wifi Board that can be used for the project
http://www.amazon.com/LinkSprite-CuHead-WiFi-Shield-Arduino/dp/B00789Z2TK
http://www.amazon.com/WiFi-DiamondBack-1-0-Arduino-Compatible/dp/B0078A4MA4
http://www.amazon.com/Arduino-A000046-UNO-board/dp/B004CG4CN4/ref=pd_sxp_grid_i_0_1
- Compare several different boards and prices and requirements for the project before buying the product
_________________________________________
WEEK 2
WEEK 2
- Finalize and order arduino UNO board after the approval of the TA. With many confusing and intricate parts of the product, it was challenging to order the right board.
- Discuss Meeting times which everyone would be available to work on the project
Wednesday: after 5
Thursday after 6
Weekend efforts are also taken into consideration
- Hardware being ordered:
Figure 1.0: Aurdino UNO Ethernet board
Details about the board: The board can also be powered via an external power supply, an optional Power over Ethernet (PoE) module, or by using a FTDI cable/USB Serial connector.
External power could come either from an AC-to-DC adapter (wall-wart) or battery. The adapter can be connected by plugging a 2.1mm center-positive plug into the board's power jack. Leads from a battery can be inserted in the Gnd and Vin pin headers of the POWER connector.
The board can operate on an external supply of 6 to 20 volts. If supplied with less than 7V, however, the 5V pin may supply less than five volts and the board may be unstable. If using more than 12V, the voltage regulator may overheat and damage the board. The recommended range is 7 to 12 volts.
Helpful Link:
http://arduino.cc/en/Main/ArduinoBoardEthernet
*Goals for Upcoming Week/ Important notes from TA : start working on the design project after meeting upon a discussed time.
get led and connect to digital ports Take PWM configure that and allow LED lights to work (hardware aspect). Laster download the software which provides many example codes looking at tutorials, manual and etc.
Divide into 2 parts...
taking hardware controlling lights
communicating wirelessly
than we can go through and compare on how you can send message to the computer and control that aspect.
_________________________________________
WEEK 4
I. After having bought Aurdino Wifi board, our group carefully examined and researched many specifications about the board.
http://www.arduino.cc/
II. Download Aurdino program from: http://arduino.cc/en/Main/Software
III. After, we acquired a breadboard from Engineering lab which helped attain the light to blink with the use of the Aurdino program:
Figure 1.0: Bread Board: construction base for prototyping of electronics
Initial Trial Code used in Aurdino Program:
/*Blink Turns on an LED on 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 setup 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(1000); // wait for a second digitalWrite(led, LOW); // turn the LED off by making the voltage LOW delay(1000); // wait for a second}
IV. References from Youtube Used
Using Arduino breadboards and LED tutorial
http://www.youtube.com/watch?v=2MQywWsOZ2w
Learning Aurdino Board with Breadboard
http://www.youtube.com/watch?v=CssOBb-qaX0
V. Applications Found on Youtube
http://www.youtube.com/watch?v=ncOSe1lcpVE&feature=player_embedded
The Eye Shield was used for my Reflections in Cider installation. This illuminates a matrix of LEDs inside cider bottles in a window display, to create a video-mirror of the passersby.
_________________________________________
WEEK 5
I. Experiment around with Aurdino playground program, allowing us to become familiar with the
program and see the effects of different changes.
II. Baground information
In theory, the circuit is very simple (just a button and an LED). The cool fading bahavior is done with code. When you get into the code, you will see that there is a function called Quad_easeInOut(). These functions do something called easing -- which means to ease in or out of an animation. But can use easing equations for all sorts of things. They are valuable anytime you want to smooth out how something goes from one state to another. In our circuit, we are easing the on / off of the LED.
Some important things about LED:
They don't really fade well. Which means that if you try to control the brightness of an LED by simply reducing current, the LED will get somewhat less bright. But eventually, the LED simply shuts off. In order to get good fade control, using an ability of the Arduino board called Pulse-Width Modulation or PWM would work the best. When you use PWM it means that the output is at full voltage, but it simulates lower voltages by pulsing the voltage at different rates.
Only certain digital pins can be enabled for PWM -- pins numbered 3, 5, 6, 9, 10, 11.
III. Assembly Steps for Setup Figure 1.0, 1.1
- Connect the ground port on the Arduino board to one of the long rows of holes on the breadboard -- this makes that row ground (0v).
- Connect the 5v port on the Arduino board to one of the other rows of holes on the breadboard -- this makes that row source voltage (5v).
- Connect one leg of the button to both digital pin 8 and ground through a 10k resistor, while the other leg is connected to source voltage.
- Connect the cathode (negative) leg of the LED to ground, and connect the anode (positive) leg of the LED to digital pin 9 on the Arduino board.
Figure 1.0: Arduino and bread board ideal setup
Figure 1.1: The progress occurring in Aurdino board
IV. Arduino Code
/*
This script uses a button to fade an LED -- with an easing equation for smoothness.
This script allows you to use a button to turn an LED on and off (with fading).
We use digitalRead() to get the value from the button.
We use analogWrite() to set the brightness of the LED.
We use an easing equation (thanks to Robert Penner) to make the fading smooth.
We use a timer to allow us to have a specific clock speed (see note below).
The circuit:
* LED attached from digital pin 9 to ground.
* Button with one leg connected to digital pin 8 and ground through a 10k resistor, while the other leg is connected to source voltage.
created 2010
by Andrew Frueh
I built this code starting with "Fading" from Arduino examples - 1 Nov 2008, By David A. Mellis
http://arduino.cc/en/Tutorial/Fading
*/
// You can change the settings here
// >>
// fadeTimerFreq is the clock speed in milliseconds, lower numbers are faster
const int fadeTimerFreq = 30;
// fadeTime is the total time it will take to complete the ease (in milliseconds)
const int fadeTime = 3000;
// <<
// additional variable for the timer
int currentTime, fadeTimerLast;
// these constant variables store the pin numbers
const int ledPin = 9;
const int buttonPin = 8;
const int fadeRange = 254;
// the amount to step the fade; must be between 1 and the fadeRange
const float fadeStep = (float(fadeTimerFreq) / (fadeTime)) * fadeRange;
int buttonValue, fadeTarget, fadeValueTweened;
float fadeValue;
void setup() {
// initialize the serial port; needed for debugging below
Serial.begin(9600);
// initialize the LED pin
pinMode(ledPin, OUTPUT);
// initialize the input pin
pinMode(buttonPin, INPUT);
}
void loop() {
// for all timers
currentTime = millis();
// checks to see if the number of milliseconds has passed
if ( abs(currentTime - fadeTimerLast) >= fadeTimerFreq) {
fadeTimerLast = currentTime;
// read the value from the input
buttonValue = digitalRead(buttonPin);
// step the fading
if(buttonValue == 1){
// if the button is pressed, increase the fade
fadeValue = fadeValue + fadeStep;
}
else{
// if the button is not pressed, decrease the fade
fadeValue = fadeValue - fadeStep;
}
// constrain the fadeValue so it can't go off toward infinity
fadeValue = constrain(fadeValue, 0, fadeRange);
// get the tweened value -- i.e. the smooth value
fadeValueTweened = Quad_easeInOut(fadeValue, 0, fadeRange);
// use the tweened value to set the brightness of the LED
analogWrite(ledPin, fadeValueTweened);
// print the values to the serial port for debugging
Serial.print(buttonValue);
Serial.print(", ");
Serial.println(fadeValue);
}
}
// Quad easing thanks to Robert Penner
// variables used are type "float" so that you can throw smaller numbers at it and it will still work well
float Quad_easeInOut(float t, float fixedScaleStart, float fixedScaleEnd){
// float b = 0, c = 1, d = 1;
float b = fixedScaleStart;
float c = fixedScaleEnd - fixedScaleStart;
float d = fixedScaleEnd;
if ((t/=d/2) < 1) return c/2*t*t + b;
return -c/2 * ((--t)*(t-2) - 1) + b;
}







No comments:
Post a Comment