Arduino Traffic Light

--Originally published at GTO

I was working with Rodrigo Valdez for the final project, this is a blog post about what we did:

Using an arduino and LED’s we made a traffic light simulator, we choose this project because as engineers we are going to make thing and solve problems of our world so this is something very common in life so we decided to relate something like that to our programming class and simulate the job of that device.

Here is a video of our traffic light working:

Our code is here: (You can modify the timing of the lights by changing the delays)
const int VERDE = 4000;
const int PVERDE = 500;
const int RAMARILLO = 2000;

// Conexiones
int verde = 2;
int amarillo = 5;
int rojo = 11;
void setup() {
// Inicialización
digitalWrite(verde,LOW);
digitalWrite(rojo,HIGH);
digitalWrite(amarillo,LOW);

pinMode(verde,OUTPUT);
pinMode(amarillo,OUTPUT);
pinMode(rojo,OUTPUT);
}

void loop() {
// Secuencia para semaforo 1
digitalWrite(verde,HIGH);
digitalWrite(amarillo,LOW);
digitalWrite(rojo,LOW);
delay(VERDE);
digitalWrite(verde,LOW);
delay(PVERDE);
digitalWrite(verde,HIGH);
delay(PVERDE);
digitalWrite(verde,LOW);
delay(PVERDE);
digitalWrite(verde,HIGH);
delay(PVERDE);
digitalWrite(verde,LOW);
delay(PVERDE);
digitalWrite(verde,HIGH);
delay(PVERDE);
digitalWrite(verde,LOW);
digitalWrite(amarillo,HIGH);
delay(RAMARILLO);
digitalWrite(amarillo,LOW);
digitalWrite(rojo,HIGH);
delay(5000);

}

 

Arduino Traffic Light

--Originally published at GTO

I was working with Rodrigo Valdez for the final project, this is a blog post about what we did:

Using an arduino and LED’s we made a traffic light simulator, we choose this project because as engineers we are going to make thing and solve problems of our world so this is something very common in life so we decided to relate something like that to our programming class and simulate the job of that device.

Here is a video of our traffic light working:

Our code is here: (You can modify the timing of the lights by changing the delays)
const int VERDE = 4000;
const int PVERDE = 500;
const int RAMARILLO = 2000;

// Conexiones
int verde = 2;
int amarillo = 5;
int rojo = 11;
void setup() {
// Inicialización
digitalWrite(verde,LOW);
digitalWrite(rojo,HIGH);
digitalWrite(amarillo,LOW);

pinMode(verde,OUTPUT);
pinMode(amarillo,OUTPUT);
pinMode(rojo,OUTPUT);
}

void loop() {
// Secuencia para semaforo 1
digitalWrite(verde,HIGH);
digitalWrite(amarillo,LOW);
digitalWrite(rojo,LOW);
delay(VERDE);
digitalWrite(verde,LOW);
delay(PVERDE);
digitalWrite(verde,HIGH);
delay(PVERDE);
digitalWrite(verde,LOW);
delay(PVERDE);
digitalWrite(verde,HIGH);
delay(PVERDE);
digitalWrite(verde,LOW);
delay(PVERDE);
digitalWrite(verde,HIGH);
delay(PVERDE);
digitalWrite(verde,LOW);
digitalWrite(amarillo,HIGH);
delay(RAMARILLO);
digitalWrite(amarillo,LOW);
digitalWrite(rojo,HIGH);
delay(5000);

}

 


Programming with Ken Bauer

--Originally published at GTO

During this semester more than learning to program in C++ , I learned about being responsable of my tasks, studying even if the exam doesn’t worth points and looking for information by myself instead of going to class and hear the teacher speaking for an hour and a half, I was able to do all this because of the teaching method of Ken Bauer, my teacher for TC1017 Fall 2017, I’m in first semester of college and I really think this way of learning is better because it’s more like life, nobody is going to be there telling you what do everytime, you got to do thing by yourself even if you don´t have idea of how, in this time is very easy to find usefull content, contact people and learn throught many different plataforms and this course is a very good way to practice that.

Setting my own grade makes me think about my work and ask me if deserve a good grade and this motivates me to work hard and be sure that I should get a good grade.

 

-GTO

#coursereview

Programming with Ken Bauer

--Originally published at GTO

During this semester more than learning to program in C++ , I learned about being responsable of my tasks, studying even if the exam doesn’t worth points and looking for information by myself instead of going to class and hear the teacher speaking for an hour and a half, I was able to do all this because of the teaching method of Ken Bauer, my teacher for TC1017 Fall 2017, I’m in first semester of college and I really think this way of learning is better because it’s more like life, nobody is going to be there telling you what do everytime, you got to do thing by yourself even if you don´t have idea of how, in this time is very easy to find usefull content, contact people and learn throught many different plataforms and this course is a very good way to practice that.

Setting my own grade makes me think about my work and ask me if deserve a good grade and this motivates me to work hard and be sure that I should get a good grade.

 

-GTO

#coursereview


WSQ13 – Learning about SciLab

--Originally published at GTO

This WSQ is a little bit different from the other ones, this time Ken asked us to download SciLab and check it out to see how it can be useful for our life and tasks in college, I «played» a little bit with the console and then I created a little script that solves a physics problem, I assigned some variables and created the formula. I really liked SciLab specially for physics and also I would like to learn more about graphing and applying math with it.

Screen Shot 2017-11-19 at 2.00.23 PM

#WSQ13#teclife

GTOBlogs

WSQ13 – Learning about SciLab

--Originally published at GTO

This WSQ is a little bit different from the other ones, this time Ken asked us to download SciLab and check it out to see how it can be useful for our life and tasks in college, I “played” a little bit with the console and then I created a little script that solves a physics problem, I assigned some variables and created the formula. I really liked SciLab specially for physics and also I would like to learn more about graphing and applying math with it.

Screen Shot 2017-11-19 at 2.00.23 PM

#WSQ13#teclife

GTOBlogs


WSQ12 Calculating «e» with precision «x»

--Originally published at GTO

For this WSQ I used some previous learning from the Factorial WSQ, I used the function for calculating factorial because I is part of the process for calculating «e». The WSQ wasn’t really hard, just about understanding «e» and figuring out how to work with the precision.

Here is a ss of my program and how it works:

Screen Shot 2017-11-19 at 2.02.16 PM

You can find my full code here:

https://github.com/getorres99/TC1017-Fall-IMT-GTO/blob/master/WSQ12Calce.cpp

The normal consult book: “How to Think Like a Computer Scientist, C++ Version”, Downey, Allen B. 2012.

Some information about the «e»:

https://es.wikipedia.org/wiki/Número_e

 

#WSQ12#teclife

WSQ12 Calculating “e” with precision “x”

--Originally published at GTO

For this WSQ I used some previous learning from the Factorial WSQ, I used the function for calculating factorial because I is part of the process for calculating “e”. The WSQ wasn’t really hard, just about understanding “e” and figuring out how to work with the precision.

Here is a ss of my program and how it works:

Screen Shot 2017-11-19 at 2.02.16 PM

You can find my full code here:

https://github.com/getorres99/TC1017-Fall-IMT-GTO/blob/master/WSQ12Calce.cpp

The normal consult book: “How to Think Like a Computer Scientist, C++ Version”, Downey, Allen B. 2012.

Some information about the “e”:

https://es.wikipedia.org/wiki/Número_e

 

#WSQ12#teclife