Selected Courses on Digital Art-UOWM

15 Νοεμβρίου 2014

ARDUINO 04 COLOR MIXING LAMP

Filed under: ARDUINO — admin @ 12:33

[youtube https://www.youtube.com/watch?v=4SgLTb_XeOc?list=UUP3kEXaqtY63GaSKfsqk6WQ]

const int greenLEDPin = 9; //Green pin in the RGB LED
const int redLEDPin = 11; //Red pin in the RGB LED
const int blueLEDPin = 10; //Blue pin in the RGB LED

const int redSensorPin = A0; //Photoresistor no. 1
const int greenSensorPin = A1; //Photoresistor no. 2
const int blueSensorPin = A2; //Photoresistor no. 3

int redValue = 0;
int greenValue = 0;
int blueValue = 0;
//These values can only be from 0 to 255.

int redSensorValue = 0;
int greenSensorValue = 0;
int blueSensorValue = 0;
//These values will be reading from the photoresistors.

void setup() {
  Serial.begin(9600);

  //Set up the RGB LED pins to be OUTPUT.
  pinMode(greenLEDPin, OUTPUT);
  pinMode(redLEDPin, OUTPUT);
  pinMode(blueLEDPin, OUTPUT);
}

void loop() {
  //Set up the XXSensorValues to read from the photoresistors.
  redSensorValue = analogRead(redSensorPin);
  delay(5);
  greenSensorValue = analogRead(greenSensorPin);
  delay(5);
  blueSensorValue = analogRead(blueSensorPin);
  delay(5);

  //Print on the serial monitor the values given by the photoresistors.
  Serial.print(“Raw Sensor Values \t Red: “);
  Serial.print(redSensorValue);
  Serial.print(“\t Green: “);
  Serial.print(greenSensorValue);
  Serial.print(“\t Blue: “);
  Serial.print(blueSensorValue);

  //XXValue can only be from 0 to 255 because they are define the intensity of the pin on the RGB LED.
  redValue = redSensorValue/4;
  greenValue = greenSensorValue/4;
  blueValue = blueSensorValue/4;

  //Print on the serial monitor the values that the LED pin is on.
  Serial.print(“Mapped Sensor Values \t Red: “);
  Serial.print(redValue);
  Serial.print(“\t Green: “);
  Serial.print(greenValue);
  Serial.print(“\t Blue: “);
  Serial.print(blueValue);

  //analogWrite is used here to write, instead of HIGH(1) or LOW(0), a certain intensity(0-255) that is more precise.
  analogWrite(redLEDPin, redValue);
  analogWrite(greenLEDPin, greenValue);
  analogWrite(blueLEDPin, blueValue);
}

[youtube https://www.youtube.com/watch?v=QtrTM_tUz3A]

learning maya

Filed under: MAYA — admin @ 11:58

[youtube https://www.youtube.com/watch?v=YZ_deuTJ-xc?list=PLD8E5717592CF5C26]

……..2/6….3/6….4/6……..

[youtube https://www.youtube.com/watch?v=TFkUclwFjDg?list=PLD8E5717592CF5C26]-

—- [youtube https://www.youtube.com/watch?v=C69sQ9sLOvY]

14 Νοεμβρίου 2014

ARDUINO03

Filed under: ARDUINO — admin @ 13:52

const int sensorPin = A0;
const float baseLineTemp = 20.0; //float values can store decimals.

void setup() {
  Serial.begin(9600); //open a serial port

  for(int pinNumber = 2; pinNumber<6; pinNumber++){
    pinMode(pinNumber, OUTPUT);
    digitalWrite(pinNumber, LOW);
  }
}

void loop() {
  int sensorVal = analogRead(sensorPin);

  Serial.print(“Sensor Value: “);
  Serial.print(sensorVal);

  //convert the ADC reading to voltage
  float voltage = (sensorVal/1024.0) * 5.0;

  Serial.print(“, Volts: “);
  Serial.print(voltage);
  Serial.print(“, degrees C:”);
  //convert the voltage to temperature in degrees
  float temperature = (voltage – .5) * 100;
  Serial.println(temperature);

  if(temperature <= baseLineTemp){
    digitalWrite(2, HIGH);
    digitalWrite(3, LOW);
    digitalWrite(4, LOW);
    digitalWrite(5, LOW);

  }else if(temperature >= baseLineTemp+2 && temperature <baseLineTemp+4){
    digitalWrite(2, LOW);
    digitalWrite(3, HIGH);
    digitalWrite(4, LOW);
    digitalWrite(5, LOW);
 
  }else if(temperature >= baseLineTemp+4 && temperature < baseLineTemp+8){
    digitalWrite(2, LOW);
    digitalWrite(3, HIGH);
    digitalWrite(4, HIGH);
    digitalWrite(5, LOW);
 
  }else if(temperature >= baseLineTemp+8){
    digitalWrite(2, LOW);
    digitalWrite(3, HIGH);
    digitalWrite(4, HIGH);
    digitalWrite(5, HIGH);
  }
  delay(1);
}

I’m just trying out Arduino Uno for the first time with 2 blinking LEDs on a breadboard. All the tutorials on the Internet seem to use a resistor. I do know the function of resistors, but does it really matter here? These LEDs are working just fine without a resistor.
shareimprove this question
3  
(if you would ever return here): don’t hit and run. You asked a question, got an answer, and you were gone. You haven’t upvoted the answer (you didn’t have enough reputation) and you haven’t accepted it. Since you don’t seem to come back I suppose your question has been answered. Give credit where credit’s due. –  Federico Russo Jun 3 ’12 at 9:38
3  
The good part is that person cared to ask. So future generations are now able to find the question and answer –  user924 Jun 4 ’12 at 2:48
    
Ok. Sorry about that, I’m new here. –  40Plot Jun 14 ’12 at 13:34

1 Answer

up vote 32 down vote accepted
Naughty! :-). If they say to use a resistor there’s a good reason for that! Switch it off, NOW!
The resistor is there to limit the LED’s current. If you omit it the current limiting has to come from the Arduino’s output, and it will not like it. How do you find out what the resistor needs to be? You do know Ohm’s Law? If you don’t, write it down in big letters:
V=IR
Voltage equals current times resistance. Or you could say
R=VI
It’s the same thing. The voltage you know: Arduino runs at 5V. But not all that will go over the resistor. The LED also has a voltage drop, typically around 2V for a red LED. So there remains 3V for the resistor. A typical indicator LED will have a nominal current of 20mA, then
R=5V2V20mA=150Ω
The Arduino Uno uses the ATmega328 microcontroller. The datasheet says that the current for any I/O pin shouldn’t exceed 40mA, what’s commonly known as Absolute Maximum Ratings. Since you don’t have anything to limit the current there’s only the (low!) resistance of the output transistor. The current may so well be higher than 40mA, and your microcontroller will suffer damage.
edit
The following graph from the ATmega’s datasheet shows what will happen if you drive the LED without current limiting resistor:
enter image description here
Without load the output voltage is 5V as expected. But the higher the current drawn the lower that output voltage will be, it will drop about 100mV for every extra 4mA load. That’s an internal resistance of 25Ω. Then
I=5V2V25Ω=120mA
The graph doesn’t go that far, the resistance will rise with temperature, but the current will remain very high. Remember that the datasheet gave 40mA as Absolute Maximum Rating. You have three times that. This will definitely damage the I/O port if you do this for a long time. And probably the LED as well. A 20mA indicator LED will often have 30mA as Absolute Maximum Rating.

arduino 02

Filed under: ARDUINO — admin @ 11:09
HIGH (there is voltage here)  AND LOW(there is no voltage here)
digitalWrite()

PINS

int switchState = 0;

void setup()
{

  pinMode (3, OUTPUT);
  pinMode (4, OUTPUT);
  pinMode (5, OUTPUT);
  pinMode (2, INPUT); //This pin is the button as INPUT.
}

void loop()
{
  switchState = digitalRead(2); //switchState will change to HIGH(1) or LOW(0) depending if the button is pressed.

  if (switchState==LOW) { //If the button is not pressed.
 
    digitalWrite (3, HIGH); //green LED will be on.
    digitalWrite (4, LOW);
    digitalWrite (5, LOW);
  }

  else { //else is applied only if the corresponding “if” state isn’t accomplished.
 
    digitalWrite (3, LOW);
    digitalWrite (4, LOW);
    digitalWrite (5, HIGH);
 
    delay(250);// wait for a quarter second
   //toogle the Leds
    digitalWrite (4, HIGH);
    digitalWrite (5, LOW);
    delay (250);// wait for a quarter second
  }

}

13 Νοεμβρίου 2014

arduino 01

Filed under: ARDUINO — admin @ 09:51

http://arduino.cc/en/Guide/Windows

get to know your tools
-transducers-μετατροπείς    (lightbulbs,speakers,…) other types of energy to electrical (vice versa)
-sensors                                other forms of energy to electrical
-actuators-ενεργοποιητές     electrical energy to forms of energy
circuits                                  move electricity to different conponents
direct current circuits
alternating current circuits

Current                                  measured with Amps A
Voltage                                   measured with Voltage V
Resistance                              measured with Ohms  Ω


led   cathode(-)/shorter leg
         anode(+) /longer leg
resistor    converts electrical energy into heat

switch — switch is closed it will complete the circuit–monentary/pushbuttons

build the circuit


series curcuit






parallel circuit



3ds Max Learning Path

Filed under: 3DMAX — admin @ 09:28
http://area.autodesk.com/3dsmaxlearningpath

http://knowledge.autodesk.com/support/3ds-max-design/learn-explore/caas/CloudHelp/cloudhelp/ENU/123112/files/3dsmaxdesign-2014-tutorials-html.html

12 Νοεμβρίου 2014

Filed under: UNCLASSIFIED 1,ΚΑΛΛΙΤΕΧΝΕΣ-ARTISTS — admin @ 09:51

//%20www.youtube.com%20/embed/IGF5bkr8esQ

3 Νοεμβρίου 2014

3D camera tracker

Filed under: AFTER EFFECTS — admin @ 11:24
http://tv.adobe.com/watch/learn-after-effects-cs6/3d-camera-tracker/

15 Οκτωβρίου 2014

Matthew Barney – Cremaster 3 pt.1 (2002)

[youtube https://www.youtube.com/watch?v=AtjvyQqim50]

Moog modular -V2 Bizune GTG K1++

Filed under: NOTES ON SOUND ART — admin @ 21:58
https://www.youtube.com/watch?v=eW8IK9VSaR4?list=PLCA79DDF32502EB47
https://www.youtube.com/watch?v=QT-DM6SVeW0?list=PLCA79DDF32502EB47
https://www.youtube.com/watch?v=ObAdTZ-1ocw?list=PLCA79DDF32502EB47
 

[youtube https://www.youtube.com/watch?v=eW8IK9VSaR4?list=PLCA79DDF32502EB47]

 

[youtube https://www.youtube.com/watch?v=QT-DM6SVeW0?list=PLCA79DDF32502EB47]

 

[youtube https://www.youtube.com/watch?v=ObAdTZ-1ocw?list=PLCA79DDF32502EB47]

« Newer PostsOlder Posts »

Powered by WordPress

error: Content is protected !!