In-Depth #2

Two weeks into my in-depth me and my mentor have been working on building up my knowledge of Arduino and the designing parts of my final project. We worked on 4 main concepts, Variables, Connecting a series circuit, Analog code, and binary numbers.



Just like in math, coding has variables you can use. By placing them at the top of your code it makes changing large sets of numbers easier.

As you can see in the left-hand photo the highlighted parts are the variables in the code lines below you can see how the words replace where the numbers would go. This helps when dealing with codes that look like the photo on the right with over 100 lines.


Series Circuits:

Just like in science class a series circuit is a loop. The only difference between the ones we worked on and the Arduino ones is that the current goes through a breadboard, rather than just through the wires.

Analog Code:

This is how Arduino can control things as a scale rather than using DigitalWrite (as seen in variables photos) which is on and off. AnalogWrite is like an adjustable light switch whereas DigitalWright is just a normal switch. When using analog, you can use the numbers 0-255, zero is off and 255 is the max brightness.

Binary Numbers:

The binary system is a way of showing numbers with zero’s and one’s. For example, 0000 is 0 and 0101 is 5. The chart below is a good way to explain it and look at it easier.

The numbers on the top are number columns. Like in math when you break apart numbers into one’s, ten’s, and hundred’s, in this case, each column is worth the number in the top section.

Take the number five, for example, in the eight-column there’s nothing, in the four-column, there’s a one indicating there’s a four, in the two’s column there’s nothing, and there’s a one on the one column. Based on these numbers we know that 4+1=5, therefore 0101 is 5.


A Bit More on My Mentor:

How did your mentor gain their experience/ expertise?

My mentor went to McMaster University and got his master’s in mechanical engineering. He’s also worked as an engineer for BMW for just over 19 years.

What were those experiences like for your mentor?

He sounded like he liked them. When I originally asked, he said it was hard work, but it was worth it. Based on how many years he worked in the business he also enjoyed doing it.

What wisdom have you gained from your mentor so far?

That the best way to get through a big project is to plan it out and break it into smaller more manageable pieces. Another thing I learned is to always ask questions especially when I may not know what I’m doing.

Some other videos and pictures: