Posts

Showing posts from December, 2019

Final Personal Retrospective

This is my last post for this class.  It is hard to believe that 6 weeks has already gone by and this class is just about over.  As I look back over the last 6 weeks I think the build that I am the most proud of is the digital dice one.  Even though it proved to not be totally random it still was the most fun and challenging build.  It took me a while to come up with the idea of what to do and then it took even longer to see it happen but when it did I think it was the coolest build that I did.  I think that the first week was challenging to figure out how to build the circuits but I think as the weeks went on it got easier and easier to build with the Arduino. I think that is the thing that I learned the most is that I was capable to do these kinds of things.  I would often see builds done like this on youtube as I was browsing around but I would always think that these are way to hard for me to actually do but now I think I might try one the next time that I see it.  I think the bigg

Motor with sonar

So this week’s challenge was to build something that involved motors and sensors. I decided to make mine out of a servo and a sonar sensor. Here is the code... #include <Servo.h>  Servo servo1;  long distance;  long duration;  int trigPin = 10;  int echoPin = 9;  void setup() {  servo1.attach(8);  pinMode(trigPin, OUTPUT);  pinMode(echoPin, INPUT); }  void loop() {  ultra();  servo1.write(0);  if(distance <= 10){  servo1.write(90);  }  }  void ultra(){  digitalWrite(trigPin, LOW);  delay(2);  digitalWrite(trigPin, HIGH);  delay(10);  digitalWrite(trigPin, LOW);  duration = pulseIn(echoPin, HIGH);  distance = duration*0.034/2;  }  This challenge didn't seem to hard to program but I was swamped with other work that I had to do for my job so I was unable to build the circuit this week to actually test to see if it worked.  I think it should have but I will try it next week but since this is due today I thought tha

LCD awesomeness

Image
So for this week I decided to do the LCD display. I chose this one because I thought it would be fun to do. So basically the challenge was to display something on the LCD. I also thought that this would be challenging so I started to do this.  I read a lot online and there is really only one way to set this up.  So I just copied the one in the starter guide. so here is the set up. This is what it looks like it real life. Here is the code. #include <LiquidCrystal.h> LiquidCrystal lcd(12,11,5,4,3,2); void setup() {   lcd.begin(32, 2);   lcd.clear(); } void loop() {     lcd.setCursor (0,0);     lcd.scrollDisplayLeft();     lcd.print("Merry Christmas and a Happy New Year");     delay(200);     } Here is the video of it working.  There really was not much challenge of getting this working.  I just followed the diagram and then changed the code to print what I wanted it to print.  It cut it off so I decided that I needed it to scroll so I lo