[Project 2 template page: copy but do not modify the original] 

Binary Addition Helper

Note: these black boxes are instructions to you to make the documentation, and should not be included in your final submission!

1b. A photo that is a good overall view of the project. This image should be one of the "well-shot" images described below, or a cropped subset of one of them.

Brown rectangular board with eight vertical toggle switches and one horizontal one. A four-digit seven-segment display is at the top.

Front view of the binary adder, without power on, and all the counting switches in the off position. 

(Above is a reasonable sample caption. This picture could be a bit brighter, but it's clear and shows the project effectively.)

1c. A brief explanation of the project. This should be short and sweet.

This project helps me to learn how to add binary numbers up. Each of the vertical toggle switches represents one of the powers of two, so the rightmost switch is the ones, the next one over is the twos, the next over is the fours, and so on. The horizontal switch at the bottom changes the board back and forth between decimal and hexadecimal representation of the sum.

1d. At least four good still images of the final project. If it's possible for you to take higher-quality image, like using a DSLR (here's the class DSLR photography guide) that's fine; but camera phone pictures are ok, too if they're carefully shot and good quality. Images:

(This picture isn't so good! It's too small on the page which hides detail, and it shows an ugly background for no reason, which is distracting. It's also missing alt text.)

(This picture is not straight-on, is out of focus, too small, poorly cropped, and missing alt text.)

(This detail photo is big enough on the page, but it's focused on the wires, which obscures the connections behind them. If you wanted to draw your viewers' attention to the text labeling on the wires, or their colors, this would be a good photo; if you wanted them to look at the circuit boards behind the wires, though, this isn't so useful. It's also lacking alt text.)

Close-up of colored electrical wires attached to three components: an Arduino Uno microcontroller, a seven-segment display, and a part of an electrical breadboard.

All of the components are screwed into the back of the main board with wood screws. The wires are plugged into the Arduino, a small power rail for all the grounds, and they're soldered onto the back of the 7-segment display for security.

(The above caption is pretty good. Image note: this photo is taken from the same place as the one above it, but it's got the focal plane on the chips behind rather than the wires in front. It also has useful alt text.)

1e. Moving image (one or more), a .gif, .mp4, or .mov file. Your movie can be as short as a second or two if that's all that needed to show the interactivity of your device, but should go longer as is necessary. It can feature voice narration if you like, but does not need to.

Upload instructions: Do not merely link to an outside hosting service like YouTube and do not embed a YouTube or other video service frame into your page. Rather, the videos are inserted by uploading a video file to this Google Drive folder and then under the Insert tab on the right, selecting "Drive," then clicking on the Shared drive called "60-223 s24." By keeping video files in that Shared drive, we ensure that this documentation page will remain intact for the long term.

If the movie is not audibly narrated, a caption should describe the action of the movie so that a blind person would still be able to understand what is happening.

(Note that videos don't have captions or alt-text options on Google Sites, so you just need to write your own text boxes below them.)

DSC_3915.MOV

In this video, I show operation of the machine in decimal mode, flipping different switches on to make different sums. When all switches are off, the sum is 0; when the rightmost switch is on, the sum is 1, and then when that switch is off but the next one over is on, the sum is 2; when only the third switch over is on, the sum is 4; and so on.

DSC_3916.MOV

In this video, I show operation of the machine in decimal mode, flipping the right three switches from off to on, which makes the decimal sum 15. Then, I flip the bottom center switch from the left to the right, which turns the machine into hexadecimal mode; once, I do that, the 15 appears instead as "F," which is the equivalent hexadecimal representation. Then, I switch only the fourth switch from the left to on, and all of the other ones off; once I do that, the sum is 16 in decimal, which appears as "10" in hexadecimal on the display. Finally, I switch the mode switch back to the left, and the display shows "16" since that's the decimal representation of that number.

2. Process images and review

Your process section should have at least 4 photos each of which is captioned, and ~100–300 words describing any aspect(s) of your process you'd like your readers to know about. Did something surprise you with how well or how terribly it went? Did something take much longer than expected? Did you get lucky and something worked out unexpectedly? Tell us about it.

Add captions and alt text to your images so your reader understands their relevance and meaning.

Process

Stacks of lasercut drawer parts on a whiteboard table. The parts have jagged edges with many in-out rectangular patterns.

Laying all the parts out before beginning assembly. It took a few hours to do all the lasercutting.

Person wearing gloves holding a 24" long, 3" tall thin piece of brown lasercut wood. That piece is being glued into slots in a 24" x 8" wide board sitting on a table.

Placing the central vane in its right spot prior to glueing up the side and end walls.

Brown rectangular pieces interlocked like puzzles laying flat on the table surface. Glue is being applied at the flat seams where the pieces meet. A vertical rectangular piece has already been placed.

Lay the mating edges right next to each other to apply a single bead of glue along the line—this saves lots of time.

Brown rectangular pieces fill the frame. Glue is laid along the seams between them, and also on two sticking-out ears from the piece nearest the camera.

Ready for assembly. Note the places where glue cannot be applied in one long line; those have to have the glue applied to the right mating faces manually.

Assembled drawer insert, long and rectangular, with three wood clamps holding it together.

Clamping for an hour or so ensures that everything's in the right spot permanently.

White product label on brown background. Text reads "1/4" Tempered Service."

We used this masonite, which the manufacturer calls "tempered service." It is actually 6mm thick from our measurements, not 1/4" as the label says.

Don't forget that this section also needs a brief bit of text, ~100–300 words describing any aspect(s) of your process you'd like your readers to know about. You can interleave this with the images or put it all at the top or bottom or however you'd like.

3. Discussion

(instructions are embedded below)

Discussion

(Address all of the prompts below. It is best to address all of these topics in a natural piece of prose. However, if you prefer, you may write four disjoint paragraphs, each of which is addressing a prompt. (The first way is better.) In total, this section should be ~300500 words.

4. Technical information

4a.  Include **schematic and block diagrams**, drawn in https://draw.ioref.org, and exported from that software as .png images. 

The block diagram should legibly show all inputs, computational steps, and outputs of your project. The schematic should be done so that a competent person, reading your drawing and with the appropriate parts, could recreate the electrical system of the project. For both schematics and block diagrams, follow all of the standards described on the course schematics guidance page.

Technical information

4b. Code submission, embedded into the project page

Optionally also including a Github or other version control service public-facing link. Your code should be reasonably commented throughout so that people other than you (the author) can better understand it. You don't need to explain every single line—that would be overkill—but leave useful notes in a reasonable measure. 

Write a comment block at the top of the code including: 

Add your code by using a text box with the "code" formatting option

Make sure that your final code as it appears on the public-facing post is correct and will compile!

/*


Scotty Driver for ISAM 102 workshop


Reads an infrared ranger as input and drives a servo motor as output.


Code written for an MH-ET Live Tiny 88 board, a cheap ATTiny88 implementation.

(Note that our testing got no analog read values out of pins A0 through A5

for an unknown reason, hence using A6 as our input pin.)


pin mapping:


Arduino pin | role | description

___________________________________________________________________

A6 input attached to output leg of IR proximity sensor

3 output driving a continuous rotation servo



Code released to the public domain by the author, 10/12/2023

Robert Zacharias, rzachari@andrew.cmu.edu


*/


#include <Servo.h>


const int PROXPIN = A6,

SERVOPIN = 3;


// max. observed voltage is 1.5V, convert to analogRead value

const int MAXANALOGREAD = 1.5 / 5.0 * 1024;


Servo gearDriver;


void setup() {

gearDriver.attach(SERVOPIN);

pinMode(PROXPIN, INPUT);

}


void loop() {

// read proximity value

int proxVal = analogRead(PROXPIN);


// map values to appropriate range to drive motor

int motorVal = map(proxVal, 50, 1000, 5, 175);


// ensure that the motor is never instructed to go outside

// of its mechanically possible range

motorVal = constrain(motorVal, 5, 175);


// drive the motor

gearDriver.write(motorVal);


delay(10);

}