User Tools

Site Tools


user:nbutler5:start

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
user:nbutler5:start [2023/12/14 01:45] nbutler5user:nbutler5:start [2023/12/15 03:27] (current) nbutler5
Line 113: Line 113:
 orange = gdImageColorAllocate (image, 0x00, 0x00, 0x00); orange = gdImageColorAllocate (image, 0x00, 0x00, 0x00);
  
-The other side of this project is to generate shapes and tie the colors you have made to the shapes the shapes you can create can be made with functions from the library gd.h and link for functions: +The other side of this project is to generate shapes and tie the colors you have made to the shapes. The shapes you can create can be made with functions from the library gd.h
-https://libgd.github.io/manuals/2.3.0/index/Functions.html+ 
 +link for functions: https://libgd.github.io/manuals/2.3.0/index/Functions.html
  
 ------------------------------------------------------------- -------------------------------------------------------------
Line 162: Line 163:
  
 STL1 STL1
 +
 +The second STL project has you make a sequence of lights that turn on and off according to the binary value so the first sequence in the code or zero or in binary 0000 all lights are off because 0 indicates off and 1 indicates on. Which also means that the last number in the sequence before it starts over again is 15 and all 4 LED's are on because the binary value of 15 is 1111. The image of the circuit above can be adopted for STL1, just multiple everything by 4. 
 +
 <code> <code>
 (0000) = (4th place, 3rd place, 2nd place, 1st place) (0000) = (4th place, 3rd place, 2nd place, 1st place)
Line 191: Line 195:
  
 **PTBX -** **PTBX -**
 +
 +{{ :user:nbutler5:screenshot_2023-12-13_212207.png?nolink&600 |}}
 +{{ :user:nbutler5:screenshot_2023-12-13_212339.png?nolink&600 |}}
 +{{ :user:nbutler5:screenshot_2023-12-13_221837.png?nolink&600 |}}
 +{{ :user:nbutler5:screenshot_2023-12-13_221925.png?nolink&600 |}}
 +{{ :user:nbutler5:screenshot_2023-12-13_222025.png?nolink&600 |}}
 +
 +
 +
 +The first PTB project was to turn on and off a passive speaker, and also attach an indicator to show that the speaker is no or off (other than the sound that the speaker would make). The specific indicator was LED lights. RED LED on meant the speaker is off, and a GREEN LED on meant the speaker is on. 
 +
 +The second PTB project was to use the 10 element LED bar to count to 10, but adding a light for each value so instead of saying 2 is a light turned on in the 2's place, have two lights on sequentially stating the value 2. 
 +
 +The third and final PTB project was to use the multi-colored LED light that can display red, green, and blue light. The objective was to use three buttons, and preferably "label" them with there respective color caps to indicate when the blue capped button is depressed the a blue light will appear from the multi-colored LED. 
  
 ------------------------------------------------------------- -------------------------------------------------------------
  
 **EAPX -**  **EAPX -** 
 +
 +{{ :user:nbutler5:screenshot_2023-12-13_215739.png?nolink&600 |}}
 +{{ :user:nbutler5:screenshot_2023-12-13_201806.png?nolink&600 |}}
 +
 +EAPX 1-3 was an evolution of a project starting with the base program and adding features, then finally optimizing the code. 
 +
 +For the first evolution of the project was to use the stock code from freenove electronics kit tutorial page for the LCD module. Once I copied the code then I just cleaned it up and commented it so that I could understand it as well as make it more readable. The readability aspect was critical, because the stock code was lazily written and whoever wrote it wasn't very disciplined about the readability. 
 +
 +The second evolution of the project was to add a feature to the stock code. I added a blinking LED for whenever the LCD module updates its information, the information that was being updated was the CPU temperature of the Pi. 
 +
 +The third evolution of the project was to optimize the code. I implemented a statement in the terminal readout when the code was running indicating CTRL-C should be used to stop the program, as well as using more rigorous if statements for the wiringPiSetup function, and then cleaned up the code even more. 
  
 ------------------------------------------------------------- -------------------------------------------------------------
Line 245: Line 274:
  
 ------------------------------------------------------------- -------------------------------------------------------------
 +
 +PCTURES FOR EoCE 0x3 
 +
 +{{ :user:nbutler5:image1_9_.jpeg?nolink&600 |}}
 +{{ :user:nbutler5:image0_10_.jpeg?nolink&600 |}}
 +
 +-------------------------------------------------------------
 +
  
  
user/nbutler5/start.1702518323.txt.gz · Last modified: 2023/12/14 01:45 by nbutler5