User Tools

Site Tools


user:stostan2:start

EOCE 0X0 Written Experience!

PCTX- pct or (Practice Critical Thinking) puzzles are meant to well, test your critical thinking skills. The puzzles can range from a number of bases. These puzzles are also known as letter division puzzles. So some math skills are required to know before tackling a letter division puzzle. In our case we did between bases 8-13. Different bases can effect your outcomes. How you borrow, how you take, how you add and how you subtract from things. In all of the puzzles you will still count the same way you would count from 0-9 and then roll over to 10. Only now, depending on your base, you may roll over at a different time. So for example if you have a base 8 puzzle, you would count the way you normally would. 0,1,2,3,4,5,6,7 and then when you get to 7 you roll back over to 0. Same goes for 9,10,11,12 or 13. Once you hit that final number, you will roll over.

ABC0- The project ABC0 is an introduction to the world of C. The idea of ABC0 is meant to test a basic command known as printf. The printf() command is a very helpful tool. For example when creating a circuit and when the circuit reads off data, printf commands can be used to help transmit that data into your device (in our example, the raspberry Pi).This will be mentioned more shortly. It can look something like this: { printf(“Hello World\n”); return(0); }

GTF0- Our next task is trying to successfully develop a code that will read off a picture. We begin by getting ourselves familiar with declaring variables. So for example, making a color accommodate a variable. For example int red = 0;. Once we declare our variables, we would now want to use those variables to create shapes and lines. We can do so by using gdImageColorAllocate commands and creating the color by changing the values (0x00).

DTR0- We are now beginning to get into some very key concepts at this point. Were using binary and hexadecimal coding to help further our understanding. The max on binary digits can change depending on what your base is. If your base is base 2, then your range is 0-16. You can count this out like so (0000,0001,00010,0011,0100,0101,0110,0111,1000,1001,1010,1011,1100,1101,1110,1111). There is also Hexadecimal. Hexadecimal is a counting system that can count from 0-16. Also the different type of data. Char, Unsigned Char.

STL0- In STL0, we put our knowledge from DTR0 to the test. In this week were also introduced to new coding statements. Were introduced to digitalWrite commands. digitalWrite can be used to help control a circuit and what it will produce. So for example if youre trying to get light to appear out of an LED light you will write digitalWrite(pin,HIGH);. If you want it to turn off you will then follow it with a delay. delayset(milliseconds). digitalWrite statements are very inefficient depending on what you're using them for. For this project the best way to go about it is use if and else statements which are arguably the most important thing to understand when learning and using C. Basically what digitalwrite can do in 100 lines, if statements can do in under 2 lines. Depending on what you want to loop, you will first start by stating your variables and the condition. For example if(1<0)|then follow it with a statement such as digitalWrite (1,HIGH);| followed by the else. So example else(digitalWrite (1,LOW);|. Thats just a watered down example but we will continuously use this time and time again.

GFOX- GFO (Grade Figure-Outerer) is a project that is meant to use our knowledge of Pi spreadsheets and also help us see how were performing in C for ENG. Using the sc command followed by the gfo project name, you will open up a new spreadsheet. With that you will go into lab46 and do status c4eng to receive grade feedback on how youre doing in the class. You will then use the grade info in front of you to help further understand how your grade is. Your spreadsheet will be broken up into 3 different sections. First your projects, then your participation and your journals ( or the 3 different parts of the grading criteria). Now the spreadsheet is more than just typing in value and calculating it. If you're doing the project correctly you're using the spreadsheet to help do the math for you. When trying to figure out your percent grade on a specific project you will start by getting into the appropriate box and then proceed by doing = then the math you would like to perform. For example if you want to divide your grade 30/35 and the boxes are in line with each other in column C and your are in 3,4 you will do = C3/C4 (ENTER). Say you wanted it in C5 you would hover over that box and that value of 30/35 would be place in that box.

STL1-The objective is to use a breadboard to make 4 LED lights flash in binary code. The materials required to make this happen are 10 lose wires, 4 LED lights and 4 220 ohm resistors. The circuit needs a wire plugged into a 3.3V going into +, ground pin going into -, as well as a wire for each LED going into a GPIO pin. GPIO pins each have their own voltage and own input and output. Lights are outputs devices because they're outputting light energy. Each light will need voltage and in output. As well as a ground pin going into the - column to stop a short circuit from occurring.(This can lead to the magic smoke in which we don't want.) In this project you are instructed to use if statements. Doing this with digitalWrite statements would be time consuming, tedious and boring. If statements are meant help us as coders and help save us time. The goal is to use the 4 LED lights to count to 16. This project could be done between 0-16 if statements. Most people, it would take about 4 if statements. As long as you have a conditions for each of the four lights, you should be able to successfully complete this project in no time. This photo below is how the circuit should be set up in order to function properly.

PTB0- We are beginning to dive deeper into the fun toys that lie within our electronics kit. For this portion of the project we will need 2 LED,1 button and a speaker. As well as wires,and resistors. the goal here to to develop a code so that when a button is pressed a light flashes on and a speaker beeps at us. If the button is not being held down, then the other light should be a steady color. Doing this will require us to use if and else statements. If we use those correct for each of the separate components, then you will have a cool looking circuit.

PTB1- PTB1 was an extension of our previous project PTB0. We are now upgrading from using 4 single LEDs, to now using an entire bar. The bar consist of 10 separate “LEDs”. Now though theyre all “together”, they each require their own GPIO pins, and ground. After connecting the whole circuit, our next step is to hook up buttons to circuit using 1 kohm resistors, wires to go into a GPIO pin, and wires for the ground. By hooking these buttons up, we will now use them to control how many light up. One button will make it count down and the other one will make it count up. This project will require more knowledge from the previous stl projects.

PTB2-In PTB2 were doing most of the same things that we used in ptb0 and ptb1. Only now were using a multicolored LED that will light up and can use hundreds of different colors. You will this by using 3 buttons, a multicolored LED, a rocker switch, GPIO pins and 1 kohm resistors and 220 kohm. This project will open us up to trying new coding lingo. We can also use if and else statements which are still ok to use in this. However, we have another tool to our disposal, that being, the array. An array is a way to group up an entire number of GPIO pins/functions into one. FOR EXAMPLE: Arrays int x[4]; 0 1 2 3 4 Gives you 4 boxes x[0]=7; x[1]=13; x[2]=2; x[3]=59;

With the help of a for( index=0; index<4;index=index+1) {if(x[index]>0)

       {
         do_something
         }
         else
         {
          do_another_thing
          }
          }

EAPX- The EAP projects are meant to be a time for us to experiment on something that we wish to try. Our electronics kits have a number of different components that we have yet to try. So in this we start by picking a component that we have never used before. We must put the correct program in a .c file and if it functions we have successfully completed the first part of the project. Following that we now can use different key components that we either have used, or we haven't. In my example you will see I used an Ultra-Sonic distance measurer with lights attached and a speaker that goes off when it reaches a certain distance. You will integrate the code for parts 2 and 3 intoyour original part 1 that you used to code your main component.

user/stostan2/start.txt · Last modified: 2023/11/29 13:02 by stostan2