Monthly Archives: October 2016

Fall 2016 – Week 10 Class Notes

I hope you all had a great break! I was expecting a little bit of difficulty coming back in to class, but it turned out that *I* was the one with the most difficulty getting back in the swing of things. I forgot my clipboard, so all homework assignments are delayed by a week. I forgot to bring the Arduinos to put in your boxes! These will be corrected next week. See below for more information about each class.

Computer Programming

Last week we did functions. I saw some of your homework, and one thing I noticed is that a lot of people used global variables in their functions. This is legal, but is a really bad habit. Good functions have all of their input come in through their parameters, all of their output come out through the return statement, and all of the variables that they use be local variables. There are a few exceptions to this, but by and large, you should try to live by this as much as is reasonable.

This week we started talking about how the computer stores the variables for its functions on the stack. I changed the schedule a little, and, because Chapter 11 is a bit esoteric, we are going to be spending two weeks on it. Also, I am going to delay the section three assignment a few weeks. Anyway, if you haven’t finished the homework for chapter 10, do that, and I will take up chapter 10 this next session. But no matter what be sure to read Chapter 11, AND COME WITH QUESTIONS! The stack is sometimes tough to wrap your head around, but it is an important concept!

Also note that the way that we discussed the stack in class is a little simplistic. The book does a more thorough job, which will come into importance in Chapter 12.

Electronics

Major teacher fail – I had forgotten that I did not pass out Arduinos at the beginning of the year, and left them at home. Have no fear – they will be there next week! So, we were going to do Chapter 12 this week, but we will have to wait until next week. You should go ahead and read Chapter 12, but you won’t be able to do the projects until next week.

Also, I think the schedule had a quiz for this week – we will do it next week.

In class, we covered, in general terms, what microcontrollers were and how they were used. You can actually watch a video I made on this subject on YouTube here. Additionally, you can also watch a short YouTube video reviewing most of this semester’s material here.

Calculus

This week we reviewed related rates. Remember the steps: (1) Create one or more models of the thing you are looking at. Usually this stems out of geometry, but it doesn’t have to. (2) Differentiate so that you have how the terms change with respect to each other. (3) Divide by dt to convert your differentials into rates. (4) Plug and chug.

I updated the calc book with most of the problems we did in class, plus one extra. Without using your notes from class, see if you can do the problems on your own this week.

See you all next week!

Fall 2016 – Week 9 Class Notes

Hello everyone! The big news this week is that there is NO CLASS next week! Don’t forget – if you show up I won’t be there!

Computer Programming

This week we concentrated on functions (Chapter 10 of the book). Remember, you can do anything in a function that you can do anywhere else. Sometimes, rather than making a function, it is easier to just write a program, and then wrap the functionality up in a function. Anyway, some of the problems are starting to be harder, so please email me if you get stuck.

Electronics

This week we did logic chips. Next time we get together we will be starting to use the Arduino microcontroller board. We also have a quiz for next time. There will be questions from the last quiz, plus new questions on diodes, pull-up resistors, and voltage dividers.

Calculus

Everyone did great on the quiz this week. I hope you all are pleased with your progress because I certainly am! This week is related rates. We will do another quiz soon, probably focusing on related rate and optimization questions.

Fall 2016 – Week 8 Class Notes

Another week is done! We had some hiccups in class this week, but I think everyone did well. I was the low-performer this week.

Computer Programming

This week we covered loops. We learned the parts of a loop and how they are implemented as “while” loops and “for” loops. I think everyone understood the general concept of a loop, but many people had trouble formulating exactly how and when to use loops, and especially how to get the loop to solve their need.

Think about it like this – any time you need to do something repeatedly in a row, you probably want a loop to do it. You need to figure out a “control” variable to tell you how many times to loop (so you know when you are done), and you need to figure out what you actually want to do during the loop – what is the basic function you are repeating.

Remember, the computer is stooooooopid. It will only do exactly what you tell it to do. Before trying to run your programs, you should try to trace how the program itself will run. Keep a sheet of paper, and write down exactly what gets placed in each variable at each step. Don’t invent steps that are not written! Think back to the game where we just fetched and processed instructions. The computer only does exactly what you tell it to, so if you are following your own code keep that in mind!

Email me if you have any problems or questions.

I will get your section 2 assignments graded this week and handed back to you next class. If you did not get your section 2 in to me yet, please email me soon!

Electronics

Electronics this week was, well, kind of a fiasco. That is mostly my fault. First, I lost the attendance/grading sheet. Don’t worry, I found it this evening. All is well. We also spent more time reviewing than I anticipated. Then, all of my plans were on my computer, which lost power. So, we ended up trying to squeeze one of our larger projects in a very short timespan without any plans. Unsurprisingly, that didn’t go well.

In any case, I have a solution. I recorded a video of what I was planning to do/show in class. You can follow it at home and try it out and see how it works for you. You can view the video by clicking on this link. I am uploading it to YouTube as I type, so it might not be available until tomorrow morning (October 6). Anyway, if you were confused in class, PLEASE watch the video, as it should clear most things up. Email me with any issues you are still confused about.

Remember, the “output” of the LM393 has two states – positive and zero. The zero state basically connects the output directly to ground. The “positive” state is kind of wierd, as it merely disconnects itself from the circuit. This allows you to provide your own power to the output. Therefore, we use a pull-up resistor to provide power to the circuit. You should have a 2,000-ish ohm resistor in your box. This would be optimal for that circuit.

Note that this circuit is also in your chapter. The one difference is that the circuit in the chapter uses a 15,000-ohm resistor, but I gave you a 10,000-ohm resistor. That’s because I don’t have any 15,000’s at the moment, but a 10,000 should do fine. For the first (fixed) voltage divider you can use any two resistors as long as they are of equal value.

One more note – the LM393 can be easily broken. If the output gets connected to the positive rail without a resistor, it croaks pretty quick. If you think you did everything right and it still doesn’t work, bring it in next week and we can check your LM393 to see if it is working right. Bring in your working project for next week. If you can’t get it to work, email me.

There is a quiz scheduled for next week, but I think I am going to back it up a week and make sure everyone has the time to get themselves more familiar with the common circuit patterns. We are learning one more next week.

Calculus

Apparently, I am behind on giving you all a quiz. We will have a comprehensive quiz next class session. You all are doing well, so I have no doubt you will do well on the quiz.