Showing posts with label flowchart. Show all posts
Showing posts with label flowchart. Show all posts

Friday, June 25, 2021

Coding on the Microbits - Rock Paper Scissors Flowcharts.

 My Year 8 class today were coding with the Microbits. To continue our work on using flowcharts to plan our coding, we wrote the algorithm for playing Rock Paper Scissors and then designed a flowchart to show how the coding flows through. I know this is a bit back to front at the moment but I want them to get used to seeing the flowcharts and how they compare to the blocks on the coding.

Link to work on the class site.

Here are a few of the students blog posts about what we did today

Juel

Fau

Lilly





Thursday, June 24, 2021

Using flowcharts to prep for coding - Part 2

 Last week, my intermediate class were looking at using flowcharts to plan coding. They planned the small sections of how the mBot has to behave to follow the black line. Blog post here

Today, we put together all the parts from the previous couple of weeks. The binary was used to code the mBots and the flowchart and code was all put together to get the final outcome.

The students then had a great time racing the mBots round the course, changing the speed variables and adding lights at every direction change.

Link to Google Drawing here









Thursday, June 17, 2021

Using flowcharts to prep for coding

 My intermediate class are coding mBot robots. To get them into it, we have been just kind of launching ourselves in and doing "stuff".

To prepare for the "Follow the line" task (link to task on the class site here) we have been preparing so they know why the code is like it is and why the mBot is behaving as it is. Last week we looked at binary. We did an introduction to what binary is and some whole class activities and then we played some games so they got the hang of it themselves. (link to work here) 

This week we looked at flowcharts and how they help you to plan a sequence of events that have to happen. Link to work on class site here. We went through the symbols and where to find them on Google Drawings then went through the "Do you take sugar" example. The class then had a go with the "Socks" activity themselves and we looked at using loops with the alarm clock example. 

We then started to apply it to the following the black line main activity that they have to do. We went through the sequence that had to happen verbally first so they understood which way the mBot had to go in the four different circumstances. 

  • both sensors on the black line, 
  • the left sensor on the black the the right sensor on the white, t
  • the right sensor on the black the the left sensor on the white, 
  • both sensors on the white. 

We did the first two events together, then they had to do they second two themselves. It came together quite well as we were combining the binary work we had done, the flow charts and seeing where it all linked to the coding blocks. Seeing where the flowchart links directly to the coding blocks is good.

Here is my worked example, which I did on a google drawing. Maybe I should have done it on a presentation so each event could have its own page and be clearer to understand. Link to drawing here.

Next week, I want them to combine it all together and upload it to the nMot to see if it works. They will then understand why the numbers on the inputs have to be 0,1,2 or 3 and understand the flow of the algorithm.