Task 43:
Here are some project sites:
http://www.arduino.cc/playground/Projects/ArduinoUsers
This project site is on the official Arduino website.
http://hacknmod.com/hack/top-40-arduino-projects-of-the-web/
This project site gives a list of 40 top arduino projects.
http://www.practicalarduino.com/projects
This project site has a few interesting projects.
http://www.arduinoprojects.com/
This project site is an open venue for you to put your own projects and get comments from other Arduino users.
Sunday, May 9, 2010
Task 42
Task 42:
Here are some Bulletin Board rules:
Here are some Bulletin Board rules:
- You may not use this Bulletin Board to post any material which is knowingly false, abusive, hateful, harassing, obscene, threatening, invasive of a person's privacy, or otherwise violating any law.
- You may not post any copyrighted material, unless the copyright is owned by you or with permission of the copyright owner.
- Posts that are solely aimed at instigating fights, insulting or discriminating will be removed and will lead to a ban.
- Do not start a new thread when there is already a thread on the same topic.
Saturday, May 8, 2010
Tasks 38 and 39
Task 38:
const int photocellPin = 0;
const int buttonPin = 2;
int photocellReading;
int buttonState;
void setup()
{
Serial.begin(9600);
pinMode(buttonPin,INPUT);
}
void loop()
{
buttonState = digitalRead(buttonPin);
if (buttonState == HIGH)
{
photocellReading = analogRead(photocellPin);
Serial.println(photocellReading);
delay(1000);
}
delay(250);
}
Task 39:
const int photocellPin = 0;
const int buttonPin = 2;
int photocellReading;
int buttonState;
int readCount = 0;
void setup()
{
Serial.begin(9600);
pinMode(buttonPin,INPUT);
}
void loop()
{
buttonState = digitalRead(buttonPin);
if (buttonState == HIGH)
{
photocellReading = analogRead(photocellPin);
readCount++;
Serial.print("Reading number ");
Serial.print(readCount);
Serial.print(" is ");
Serial.println(photocellReading);
delay(1000);
}
delay(250);
}
const int photocellPin = 0;
const int buttonPin = 2;
int photocellReading;
int buttonState;
void setup()
{
Serial.begin(9600);
pinMode(buttonPin,INPUT);
}
void loop()
{
buttonState = digitalRead(buttonPin);
if (buttonState == HIGH)
{
photocellReading = analogRead(photocellPin);
Serial.println(photocellReading);
delay(1000);
}
delay(250);
}
Task 39:
const int photocellPin = 0;
const int buttonPin = 2;
int photocellReading;
int buttonState;
int readCount = 0;
void setup()
{
Serial.begin(9600);
pinMode(buttonPin,INPUT);
}
void loop()
{
buttonState = digitalRead(buttonPin);
if (buttonState == HIGH)
{
photocellReading = analogRead(photocellPin);
readCount++;
Serial.print("Reading number ");
Serial.print(readCount);
Serial.print(" is ");
Serial.println(photocellReading);
delay(1000);
}
delay(250);
}
Thursday, May 6, 2010
Tasks 34, 35, 36 and 37
Task 34:
int ranNum;
void setup()
{
Serial.begin(9600);
}
void loop()
{
for (int count = 1; count <101; count++)
{
ranNum = random(10);
Serial.println(ranNum);
delay(500);
}
delay(5000);
}
Task 35:
int ranNum;
void setup()
{
Serial.begin(9600);
}
void loop()
{
for (int count = 1; count <101; count++)
{
ranNum = random(10);
Serial.print(count);
Serial.print(".");
Serial.print(ranNum);
Serial.println();
delay(500);
}
delay(5000);
}
Task 36:
int ranNum;
int total;
int average;
void setup()
{
Serial.begin(9600);
}
void loop()
{
total = 0;
for (int count = 1; count <101; count++)
{
ranNum = random(10);
Serial.print(count);
Serial.print(".");
Serial.print(ranNum);
Serial.println();
total = (total + ranNum);
delay(500);
}
average = (total / 100);
Serial.print("The average of these random numbers is ");
Serial.print(average);
Serial.println();
delay(5000);
}
Task 37:
After playing around with the baud rate: I found that, when I set it to 300, i could see each character printed on the serial monitor seperately. When i set it to the maximum of 115200 it was incredibly fast, but i didnt even see any data flow errors.
int ranNum;
void setup()
{
Serial.begin(9600);
}
void loop()
{
for (int count = 1; count <101; count++)
{
ranNum = random(10);
Serial.println(ranNum);
delay(500);
}
delay(5000);
}
Task 35:
int ranNum;
void setup()
{
Serial.begin(9600);
}
void loop()
{
for (int count = 1; count <101; count++)
{
ranNum = random(10);
Serial.print(count);
Serial.print(".");
Serial.print(ranNum);
Serial.println();
delay(500);
}
delay(5000);
}
Task 36:
int ranNum;
int total;
int average;
void setup()
{
Serial.begin(9600);
}
void loop()
{
total = 0;
for (int count = 1; count <101; count++)
{
ranNum = random(10);
Serial.print(count);
Serial.print(".");
Serial.print(ranNum);
Serial.println();
total = (total + ranNum);
delay(500);
}
average = (total / 100);
Serial.print("The average of these random numbers is ");
Serial.print(average);
Serial.println();
delay(5000);
}
Task 37:
After playing around with the baud rate: I found that, when I set it to 300, i could see each character printed on the serial monitor seperately. When i set it to the maximum of 115200 it was incredibly fast, but i didnt even see any data flow errors.
Monday, May 3, 2010
Tasks 30, 31 and 32
Task 30:
const int buttonPin = 2;
const int LEDPin = 13;
int buttonState = 0;
void setup ()
{
pinMode (LEDPin, OUTPUT);
pinMode(buttonPin, INPUT);
}
void loop ()
{
buttonState = digitalRead(buttonPin);
if (buttonState == HIGH)
{
digitalWrite(LEDPin, HIGH);
}
else
{
digitalWrite(LEDPin, LOW);
}
}
Task 31:
const int buttonPin = 2;
const int LEDPin = 13;
int buttonState = 0;
void setup ()
{
pinMode (LEDPin, OUTPUT);
pinMode(buttonPin, INPUT);
}
void loop ()
{
buttonState = digitalRead(buttonPin);
if (buttonState == HIGH)
{
digitalWrite(LEDPin, LOW);
}
else
{
digitalWrite(LEDPin, HIGH);
}
}
Task 32:
const int buttonPin = 2;
const int LEDPin = 13;
int buttonState = 0;
void setup ()
{
Serial.begin(9600);
pinMode (LEDPin, OUTPUT);
pinMode(buttonPin, INPUT);
}
void loop ()
{
buttonState = digitalRead(buttonPin);
if (buttonState == HIGH)
{
digitalWrite(LEDPin, HIGH);
Serial.println("Button Pressed - LED On");
}
else
{
digitalWrite(LEDPin, LOW);
Serial.println("Button Not Pressed - LED Off");
}
}
const int buttonPin = 2;
const int LEDPin = 13;
int buttonState = 0;
void setup ()
{
pinMode (LEDPin, OUTPUT);
pinMode(buttonPin, INPUT);
}
void loop ()
{
buttonState = digitalRead(buttonPin);
if (buttonState == HIGH)
{
digitalWrite(LEDPin, HIGH);
}
else
{
digitalWrite(LEDPin, LOW);
}
}
Task 31:
const int buttonPin = 2;
const int LEDPin = 13;
int buttonState = 0;
void setup ()
{
pinMode (LEDPin, OUTPUT);
pinMode(buttonPin, INPUT);
}
void loop ()
{
buttonState = digitalRead(buttonPin);
if (buttonState == HIGH)
{
digitalWrite(LEDPin, LOW);
}
else
{
digitalWrite(LEDPin, HIGH);
}
}
Task 32:
const int buttonPin = 2;
const int LEDPin = 13;
int buttonState = 0;
void setup ()
{
Serial.begin(9600);
pinMode (LEDPin, OUTPUT);
pinMode(buttonPin, INPUT);
}
void loop ()
{
buttonState = digitalRead(buttonPin);
if (buttonState == HIGH)
{
digitalWrite(LEDPin, HIGH);
Serial.println("Button Pressed - LED On");
}
else
{
digitalWrite(LEDPin, LOW);
Serial.println("Button Not Pressed - LED Off");
}
}
Sunday, May 2, 2010
Task 28
Task 28:
int photocellPin = 0; // the cell and 10K pulldown are connected to a0
int photocellReading; // the analog reading from the sensor divider
int LEDpin = 11; // connect Red LED to pin 11 (PWM pin)
int LEDbrightness; //
void setup(void) {
// We'll send debugging information via the Serial monitor
Serial.begin(9600);
}
void loop(void) {
photocellReading = analogRead(photocellPin);
Serial.print("Analog reading = ");
Serial.println(photocellReading); // the raw analog reading
// LED gets brighter the darker it is at the sensor
// that means we have to -invert- the reading from 0-1023 back to 1023-0
photocellReading = 1023 - photocellReading;
//now we have to map 0-1023 to 0-255 since thats the range analogWrite uses
LEDbrightness = map(photocellReading, 0, 1023, 0, 255);
analogWrite(LEDpin, LEDbrightness);
delay(100);
}
int photocellPin = 0; // the cell and 10K pulldown are connected to a0
int photocellReading; // the analog reading from the sensor divider
int LEDpin = 11; // connect Red LED to pin 11 (PWM pin)
int LEDbrightness; //
void setup(void) {
// We'll send debugging information via the Serial monitor
Serial.begin(9600);
}
void loop(void) {
photocellReading = analogRead(photocellPin);
Serial.print("Analog reading = ");
Serial.println(photocellReading); // the raw analog reading
// LED gets brighter the darker it is at the sensor
// that means we have to -invert- the reading from 0-1023 back to 1023-0
photocellReading = 1023 - photocellReading;
//now we have to map 0-1023 to 0-255 since thats the range analogWrite uses
LEDbrightness = map(photocellReading, 0, 1023, 0, 255);
analogWrite(LEDpin, LEDbrightness);
delay(100);
}
Subscribe to:
Posts (Atom)
