Homework

  • 1-16-2020

    Day 2 of Animating a User Interface: Random Rolling of Dice

    See post below for 1-14-2020 for more information.

     

     

    1-14-2020

    This is Day 1 of our next 3 days on a cool programming project: Animation of a random number generator using dice. The big idea, or programming goal, of this project is Learning how to Animate a User Interface.

    Step-by-Step Instructions of Dice Project.

    Part 1: Program a dice to "roll" until it stops at a number. You will be using both Front Panel and Block Diagram for this project, but not the NXT brick.

    Part 2: Program a set of dice (2) to "roll" until they stop at their numbers.

    Part 3: Apply your basic dice programming knowledge learned to now program a virtual slot machine that will randomly "roll" through a set of 5 displayed images, each separate independent roll having 6 possible images, until the "roll set " stops at a set of images that may or may not all match.

     

     

     

     

    12-11-19

    If you have done the other things, you are ready for Unit 6, involving attaching the arm and gripper. When done, see the programming video.

    Unit 6 Arm & Gripper Build Instructions pdf

    Unit 6 Programming Video

    Unit 6 Programming Tips pdf

     

     

     

    12-9-19

    Some of you have finished Unit 4 and have already wired your motors. You are now ready for Unit 5 and will start programming basic motor functions.

    Unit 5 Programming Video

    Unit 5 Programming Instructions

     

      

    12-5-19

    We are now ready to use a different robotics totebox called Tetrix. The Tetrix kit has metal pieces instead of LEGOs, but it uses some of the LEGO tote parts like the NXT brain. LabVIEW is still the programming language for this project. Our eventual goal is to build and program a robot vehicle that will carry and deliver a plastic bottle of water.

    Tetrix Unit 4 Introduction to Tetrix pdf

    Tetrix Unit 4 Build Instructions pdf

     

     

    11-25-19

    We are now finished with our LEGO robot and took it apart and stored the pieces neatly into the LEGO totebox.

    Soon, we wilkl start building another robot using Tetrix metal parts, but will still use the LEGO NXT brick.

     

     

     

    11-21-19

    After a few attempts using the <, >, and symbols to no avail. We decided to instead use the range variables feature of the case structure title field. Instead of Case 1, e.g., we used a reflectivity range of say 55..65 percent reflectivity assigned to a particular note. The 2 periods are actually a code command that actuates a note result for reflectivity in that specified range.

     

     

     

    11-15-19

    We now return to our LEGO robot to give it one more task. We will use the optical Read Light sensor to detect changes in reflectivity as the robot moves over gray squares of different shades. Each different reflectivity value will be associated with a case structure that will play a musical note. An effective program will be one that plays a possibly-recognizable tune!

    After doing this basic project, you are encouraged to think outside the box and add more creative uniqueness or complexity.

    Programming Hints for Optical Music Player Robot

     

     

     

    11-5-19

    Today, we will start coding a virtual instrument that will access an EKG voltage probe to make a working heart EKG. Eventually, we will cose a pulse rate detector in Part 2, and a Peak Detector beep in Part 3.

    Coding Tutorial for Coding an EKG Parts 1, 2, and 3.

     

     

     

    10-28-19

    Here is a pdf file of Soundwave generator code that will tutor and guide you step-by-step. It is in color and has been re-written for better guidance and clarity. Pay specific attention to the directions on the proper selection of the multiple terminals when wiring a few of the icons. Each different wire color stands for a specific kind of information transfer. For example, green wires are associated with Boolean values.

     

     

     

    10-24-19

    This is Day one of our new project: Soundwave frequency generator.

    Friont Panel & Block Diagram colorful view.

     

     

     

    10-22-19

    Here is my solution to the loan calculator coding. Notice How clean and simple it looks, with no crossed wires:

    Loan Calculator Coding Solution

    Here is another version of my coding solution using colored markers to help you see which parts of the code corresponds to the math formula for loan calculations:

    Loan Calculator Solution with Colored Markers

     

     

     

     

    10-18-19 

    Unit 5 Coding a Loan Calculator

    Now that you have already written the code for a simple calculator, using Front Panel controls for numerical inputs and an indicator for the answer, you are ready to apply that knowledge in creating a Loan Calculator. 

    Instructions for Loan Calculator Project

    The above link gives you the background information you'll need, including the loan formula and the suggested steps you should take to accomplish your goal. When finished, demonstrate your working program code for a Project Grade.

    Make sure that you verify that you are saving your loan calculator project to the nausetsci classroom cloud in your folder.

     

     

     

     

    10-16-19

    Unit 4 Creating a Remote Control for your robot vehicle using 2 touch sensors. Case structure work nicely for the Boolean touch sensors.

     

     

     

    10-9-19

    Unit 3d Creating a calculator that add/subtracts and multiplies/divides. attention is given to Boolean color coding and Boolean labels.

    If you are finished with Unit 3d, I offer you the following challenge: The are a few ways you can use LabVIEW to hide and unhide controls depending on whether or not they are immediately needed. This helps the dashboard operator prevent needless visual overload and confusion (e.g., in a military jet fighter cockpit).

    Here is a straightforward way to add visibility, using Property Nodes, in Unit 3e calculator.

     

     

     

    10-3-19

    Time to start applying LabVIEW coding concepts to different environments. Unit 3c Objectives introduce you to the Front Panel to act as your interactive "dashboard" for your switches, numeric controls, and indicators, as you build your first simple add/subtract calculator. If you finish early, a more-advanced programming project is Unit 3d Objectives, programming a calculator that will have add/subtract and multiply/divide with more switches and case structures. 

    Programming hints for Unit 3c can be found in my Tutorial Slides 44 and 45.

     

    If you finish, you can make the more advanced calculator (that also multiplies and divides) for Unit 3d. Refer to Tutorial Sides 46 ---> 50.

     

     

     

     

    9-26-19

    Time to start applying LabVIEW coding concepts to different environments. Unit 3c Objectives introduce you to the Front Panel to act as your interactive "dashboard" for your switches, numeric controls, and indicators, as you build your first simple add/subtract calculator. If you finish early, a more-advanced programming project is Unit 3d Objectives, programming a calculator that will have add/subtract and multiply/divide with more switches and case structures. 

    Programming hints for Unit 3c can be found in my Tutorial Slides 44 and 45.

     

    If you finish, you can make the more advanced calculator (that also multiplies and divides) for Unit 3d. Refer to Tutorial Sides 46 ---> 50.

     

     

     

     

    9-25-19

    We spent 10 minutes finishing up Unit 2C Case Structures and the Ultrasonic Sensor, "following the hand".

    Then, we started Unit 3a: Using an optical sensor to have a robot follow a line (masking tape) using the True/False Boolean Logic of Case Structures. Next class, for Unit 3b, we will add an ultrasonic sensor in a nested while loop to continuously assess any obstacles in the way while the robot is following the line.

     

     

     

    9-19-19

    We are finishing up controlling our continuous sensor operation using Nested While Loops, and are now ready to explore a different way to achieve the same result with Case Structures inside a While Loop. The Powerpoint Unit 2b & 2c Tutorial provides you with the basic concepts to start using case structures (See Slides 64, 65, and 66).

     

     

    9-17-19

    We have already mastered the basics of Unit 1 motor movement programming and have demonstrated this by programming our robot to move in a square. We practiced turning by moving only one wheel, and also by moving one wheel backward (negative constant value) while the other moves forward.

    We are ready to start Unit 2a by attaching a touch sensor to our robot. You will be introduced to the concept of Nested While Loops, a programming feature used in many computer languages. In Unit 2b, you will attach an ultrasonic sensor to detect how far your robot is away from an object in its path.

    The Build Instructions for Unit 2 and Programming Videos for Unit 2 are found in the Resources web page

     

     

    9-8-19  A Day

    We are still making progress building our LEGO vehicle for Unit 1. Our 1st programming exercise after the build is to make your robot go forward, then stop. (Before this though, I will introduce you to the basics of programming.)

     

     

    9-5-19  A-Day

    Today you were assigned your LEGO project tote boxes and you began to build your robot for unit 1. You will always use the same tote boxes and assigned laptop. You may also use your ipad to access my web Resources page.

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

    1-24-19

    You should be finished building your Tetrix robot by the end of A4.

    You should be finished programming it by the end of A4 next Monday.

     

     

     

     

    1-14-19

    If you have finished Unuit 6, you can start Tetrix Unit 7:

    Unit 7 Build Instructions:Ultrasonic & Touch Sensor

    Unit 7 Arm, Gripper, Robot Programming Video

    Unit 7 Programming Tips pdf : Wiring To & From While Loops

     

     

     

     

    1-9-19

    If you have done the other things, you are ready for Unit 6, involving attaching the arm and gripper. When done, see the programming video.

    Unit 6 Arm & Gripper Build Instructions pdf

    Unit 6 Programming Video

    Unit 6 Programming Tips pdf

     

     

     

     

    1-7-19

    Some of you have finished Unit 4 and have already wired your motors. You are now ready for Unit 5 and will start programming basic motor functions.

    Unit 5 Programming Video

    Unit 5 Programming Instructions

     

     

     

     

    1/3/19

    Today we worked on trying to finish the Unit 4 Build for the basic Tetrix frame and motors. The next step is to attach the wires. The wiring diagram you should follow is at the end of the Tetrix Unit 4 Introduction to Tetrix pdf.

     

     

     

     

    12-18-18

    We are now ready to use a different robotics totebox called Tetrix. The Tetrix kit has metal pieces instead of LEGOs, but it uses some of the LEGO tote parts like the NXT brain. LabVIEW is still the programming language for this project. Our eventual goal is to build and program a robot vehicle that will carry and deliver a plastic bottle of water.

    Tetrix Unit 4 Introduction to Tetrix pdf

    Tetrix Unit 4 Build Instructions pdf

     

     

     

     

     

    12-12-18

    This is Day 2 of our Sound Wave Frequency Generator project. Some of you have already finished and can do an optional cool project: Animation of a random number generator using dice.

     

     12-10-12

    This is Day one of our new project: Soundwave frequency generator.

     

     

    11-26-18

    Today we are programming our smart car to

    1. go forward until ultrasonic sensor detects wall.

    2.go backward toward right until right reas touch sensor detects wall.

    3. go forward to the left until light sensor detects yellow masking tape or white sheet of paper.

    4. emit 3 victory beeps or tones. This is an opportunity to learn how to use For-Loops.

    Sample unfinished rough code

     

     

     

     

    11-13-18

    This was Day-3 of the smart car build, so most of you have made a lot of progress. For those of you that have competed the build, here is a programming guide to help you get started. The degree of motor steering can be awkwardly controled by time, but that angle of steer will depend on battery power. A better way is to use the motor spin icon which can determine steering angle.

     

    Here is the general plan for smart car behaviors.

     

     

     

     

    11-6-18

    After programming 2 touch sensors and the left & right NXT buttons to control two of the arm's motots, we decided it was time to program a game controller to control all 3 motors in asmooth fashion. Then we disassembled our robots to get ready for a new project: building and programming a smart car.

    Build instructions pdf

    LEGO Digital Designer 3-D modeling example

    LDD 8-min tutorial

    another 8-min tutorial on LDD

     

     

     

     

    10-23-18

    After finishing taking apart our vehicle and putting away the pieces neatly and organized in the tote trays, we started to build a robotic arm. You may need some pieces from your blue totebox containing supplementary pieces. It will have the same tote number as your regular LEGO totebox.

    Robotic Arm Build Instructions

    Unit 5a Objectives: Robotic Arm

     

     

     

     

    10-19-18

    We made a remote control for moving, stopping, and turning our vehicle by attaching 2 touch sensors with 2 long cables to the car and programmining the NXT with Boolean logic (Nested Case Structures or similar coding). A schematic diagram for the needed behaviors was provided on the Unit 4 Objectives sheet. Then we started to take apart our vehicle to get ready for the next project: a robotic arm.

     

     

     

     

    10-15-18

    We viewed a video on the technology of manufacturing in China to give us a sense of its manufacturing ecosystem for maximum efficiency. Desireable or undesireable?

    Chinese manufacturing video 45 minutes

     

     

     

    10-9-18

    Unit 3d Creating a calculator that add/subtracts and multiplies/divides. attention is given to Boolean color coding and Boolean labels.

    If you are finished with Unit 3d, I offer you the following challenge: The are a few ways you can use LabVIEW to hide and unhide controls depending on whether or not they are immediately needed. This helps the dashboard operator prevent needless visual overload and confusion (e.g., in a military jet fighter cockpit).

     

     

     

    10-4-18

    Time to start applying LabVIEW coding concepts to different environments. Unit 3c Objectives introduce you to the Front Panel to act as your interactive "dashboard" for your switches, numeric controls, and indicators, as you build your first simple add/subtract calculator. If you finish early, a more-advanced programming project is Unit 3d Objectives, programming a calculator that will have add/subtract and multiply/divide with more switches and case structures. 

    Programming hints for Unit 3c can be found in my Tutorial Slides 44 and 45.

     

    If you finish, you can make the more advanced calculator (that also multiplies and divides) for Unit 3d. Refer to Tutorial Sides 46 ---> 50.

     

     

     

    9-28-18

    We did Unit 3a: Using an optical sensor to have a robot follow a line using the True/False Boolean Logic of Case Structures. Next class, for Unit 3b, we will add an ultrasonic sensor in a nested while loop to continuously assess any obstacles in the way while the robot is following the line.

     

     

     

    9-24-18

    We are finishing up controlling our continuous sensor operation using Nested While Loops, and are now ready to explore a different way to achieve the same result with Case Structures inside a While Loop. The Powerpoint Unit 2b & 2c Tutorial provides you with the basic concepts to start using case structures (See Slides 64, 65, and 66).

     

     

    9-18-18

    We have already mastered the basics of Unit 1 motor movement programming and have demonstrated this by programming our robot to move in a square. We practiced turning by moving only one wheel, and also by moving one wheel backward (negative constant value) while the other moves forward.

    We are ready to start Unit 2a by attaching a touch sensor to our robot. You will be introduced to the concept of Nested While Loops, a programming feature used in many computer languages. In Unit 2b, you will attach an ultrasonic sensor to detect how far your robot is away from an object in its path.

    The Build Instructions for Unit 2 and Programming Videos for Unit 2 are found in the Resources web page

     

     

    8-6-18

    Today you were assigned you LEGO project tote boxes and you begain to build your robot for unit 1. You will always use the same tote boxes and assigned laptop. You may also use your ipad to access my web Resources page.