Saturday, December 13, 2014

Ultrasonic and Blinking LED



#include<NewPing.h>
#define trigPin 8 //the trigger pin is plugged in digital pin 8
#define echoPin 9 //the trigger pin is plugged in digital pin 9
#define LEDpin 13 //LED is in digital pin 13 though Arduino built it led is
                  //already in pin 13
#define scalingfactor 10

NewPing sonar(trigPin,echoPin); //this is the new function of new ping
unsigned long duration = 0;
unsigned long maxtime = 1000;
unsigned long i = 1;
unsigned long time2 = 0;
unsigned long time1 = 0;
int DistanceIn = 0;
void setup(){
   pinMode(13,OUTPUT); // pin 13 is declared as an output
   Serial.begin(9600);
   }

void distance(){
  time1 = millis();
  delay(100);
  DistanceIn = sonar.ping_in(); // automatically the ping is converted to inches
  time2 = millis();
  maxtime = scalingfactor*DistanceIn;

}

void delayanddistance(){
  i=1;
  while(1){
    if (i % 60 == 0){
      distance();
    }
    delay(1);
    ++i;
    if (i >= maxtime){
      break;
    }
  }
}
void LEDblink(){
   Serial.println(DistanceIn);
   digitalWrite(LEDpin, HIGH);
   delay(90);
   distance();
   if(time2-time1 < 30){
   delay(60-(time2-time1));
  }
   digitalWrite(LEDpin,LOW);
   Serial.println("malapit na");
  }

void loop(){
  LEDblink();
  delayanddistance();
}

Sunday, December 7, 2014

Exam Output

The following is the exam output. Please refer to the following sketch for your reference..
Arduino with DC motor, Ultrasonic sensor and LED

Wednesday, December 3, 2014

Flash Tutorials that you can watch and learn

This is youtube channel about Flash video tutorials. It cites simple yet important aspects in creating an animation. Movements and timings are well explained. If you are just starting using Flash program this tutorial is a must. Hope you like it..

Tuesday, December 2, 2014

3x3x3 LED Cube Matrix





Next meeting Monday, December 8, 2014; we will be creating the 3x3x3 Led cube matrix. Please bring the following materials for your activity.

1.) 27x LED (any color will do)
2.) 9x 220 ohm resistor
3.) 3x 22K ohm resistor
4.) 3x NPN Transistors (2N2222, 2N3904, BC547, etc.) either of the three
5.) 3 meters of Wire 22awg
6.) Readymade PCB

Soldering Lead
Pliers
Please be informed that no materials means no Hands-on activity.. thank you,,,

see the embedded video of a 3x3x3 Led Cube prototype.





Monday, October 13, 2014

Albera Movie Maker Activity

Hands on Exam of IV Albera using Movie maker. Click this LINK to go to youtube page.


Wednesday, October 8, 2014

4th Year Project.

Fourth Year project will focused in Video Tutorials (DIY) Do It Yourself video. A group of 3 members where actors, directors, propsmen, etc will be the three of you.

Tuesday, October 7, 2014

Ricceri Monthly Exam Scores

October 7, 2014.
Monthly Exam Results.
Please use your Class number as reference to your score.


Monday, September 22, 2014

ComCourse Project + ComElec Project

Two subjects for Computer Course student will be integrated. The Computer Course and Computer Elective. Please be advised that you are allowed to use only your Video/Digital camera during school hours. Those who wish to use their mobile phones in filmmaking are allowed after dismissal time.


Monday, July 7, 2014

My first blog.... Just posting for review purposes...

//shorte.st //shorte.st