Skip to content

ctucker02/Engineering_4_Notebook

Repository files navigation

Engineering_4_Notebook

My Engineering 4 stuff

Get Your Pi Online

Pictures

Lesson

This assignment I had a very difficult time trying to troubleshoot to get my Pi online. After thoroughly reviewing my code, I found a tiny error causing my code not to work. There was a space between an = and a letter, which is what caused the problem. After fixing that I was able to get it online.

Dice Roller

Pictures

Dice_roller

Lesson

This assignment I coded the Pi to roll a dice on its own. How it works is you press enter and a random number is then displayed on the screen ranging 1 through 6, just like dice. I had a problem trying to figure out how to run the code. I then figured out you needed to type Python3 to run code in the nano.

Calculator

Pictures

Calculator_pi

Lesson

This assignment I made a calculator that finds the sum, difference, product, quotient, and remainder. How it works is you enter 2 numbers and it takes them and adds, subtracts, multiplies, and divides them by each other, then displays the values on the screen. I had trouble getting my if statement to work and I realized it was because of a small mistake using one = instead of two.

Quadratic Solver

Pictures

Quadratic_solver

Lesson

This assignment I created a program to solve a quadratic equation, given the roots or stating that there is none. How it works is you enter three values and the solver takes them and finds the roots between them. If there are none it says no real roots. I had trouble figuring out how to make an array, but after browsing the web and talking to friends I figured it out.

Strings and Loops

Pictures

Strings_Loops

Lesson

This assignment uses arrays to display words you type out, spaced out line by line. How it works is you type a sentence, and the Pi takes it and spaces each letter out on each line, with a dash indicating spaces. I had trouble figuring out how to make them split between lines but I figured it out using a split function.

MSP

Pictures

hangman

Lesson

This assignment was to code a program to allow someone to play the game hangman. There are 5 options of words that the answer could be. With each letter wrong the hangman slowly gets smaller until you run out of guesses or win the game.

GPIO Pins

Pictures

GPIOpins

Lesson

This assignment was to set up the T-cobbler and LEDs to make them blink ten times. At first I had trouble getting it to work but I then figured out it was because I had my cobbler backwards.

GPIO Python

Pictures

GPIOpins GPIOPypic

Lesson

This assignment was to make the LEDs blink using a more sophisticated and clean script called fancy python. Very similar to previous assignment

About

My engineering 4 stuff

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages