1 / 19

Flowcharts

Flowcharts. Hello again, Sparkey here. Slippery and I will help you explore how to create a program that simulates outputs on a traffic light. Make sure you have your guided notes. Flowcharts.

willow
Download Presentation

Flowcharts

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Flowcharts Hello again, Sparkey here. Slippery and I will help you explore how to create a program that simulates outputs on a traffic light. Make sure you have your guided notes.

  2. Flowcharts Flowcharts can be a useful tool that better enable us to organize, problem solve, and brainstorm when we are writing a program. Flowcharts are similar to thinking maps and concept maps we use to organize, problem solve, and brainstorm when we are writing a paper.

  3. Flowcharts In our last program, we wrote a program to turn on a light for two seconds. Let’s use symbols to represent the logical flow of this program.

  4. Symbols Start and Stop symbols represent the beginning or end of a program. These symbols are simply a place holder and are oval.

  5. Symbols Input and outputs from the computer can be represented by the parallelogram symbol below. We use this symbol to represent when we turned the light on.

  6. Symbols We can also use this symbol to represent a switch or a touch sensor.

  7. Symbols Process symbols represent computational action as rectangles or blocks and represent “Action”. For example, we use this symbol to represent the timer counting two seconds.

  8. Symbols The decision symbol represents a yes/no and is in the shape of a diamond. We use this symbols to represent testing if the counter has counted to two.

  9. Symbols The decision symbol can also represent if a switch or a touch sensor is pushed or not.

  10. Symbols The arrow symbols represent the direction of flow in a program. The arrow symbols shows how the logic flows in a computer program.

  11. Complete Flowchart The connection of all the symbols shows a process. The flowchart to the right represents the process of turning a light on for two seconds, then turning off the light, and then ending the program.

  12. Complete Flowchart Start the process Turn on the light - If (Yes) the time has expired then: Go to Stop - If (No) the time has not expired then keep counting Turn off the light Stop

  13. Flow Chart Activity • Our next program will perform the following so please write these down in your activity guided notes: • The green light and red light will turn on for two seconds. • The green and red light will turn off. • The green and yellow light will turn • on for one second • The green and yellow light will turn off

  14. Flow Chart Activity • Wiring: • The green light is connected to Port • A of the NXT controller and relay 1 • on the relay board. • The yellow light is connected to Port • B of the NXT controller and relay 2 • on the relay board • The red light is connected to Port C of the NXT controller • and relay 3 on the relay board

  15. Pre-Programming Activity With the symbols below and the PowerPoint guided notes, create a flow chart that represents a computer program that will logically follow the steps you have just written in your Activity 10 guided notes.

  16. Flow Chart Your flow chart should look something like the flowchart pictured to the right.

  17. Flow Chart NXT Object Reference Your computer program should look something like the flowchart pictured to the right.

  18. Complete Flowchart Can you flowchart the process of a traffic light?

  19. Complete Flowchart Now, let us complete Activity 10

More Related