On Monday it was the Queens birthday so there was no school. Because there was no Monday we didn't have an assembly so I couldn't get my silver badge. At food on Tuesday I learnt more about what the healthy cafe is. I spent quite a while looking for a recipe I learnt that a lot of recipes need avocado! I also found out the it is going to be held on Friday the 23rd of June. At band on Thursday I learnt how to play "A London Intrada" and "Moana".
At robotics I learnt how to write java script to code robotics. Previously in robotics we have been using blocks to make the robots move which is easier, but when you are makeing web pages and similar you can use blocks so we are learning how to use java. At the start you have to have "async function startProgram() {" Then in the next line you have // Write code here. In the next lines you write what you want the robot to do. I have been making it go around a maze with Bobby. My first line of coding was "await roll ( 0, 50, 2.1, ) ; " You always have to have a "}" at the very end on the next line, but before that after each line of coding you have to have a semicolon (;) to tell the robot that it is at the end and to start the next line of code. The await at the start means a short delay before it starts to roll( the roll command). The 0, means heading to 0 degrees. The 50 means to go at 50% speed and the 2.1, means to roll for 2.1 seconds. I learnt that the heading, speed and roll time are variables which means that they can change and it won't muck up the rest of it. My end coding looked like:
async function startProgram() {
// Write code here
await roll ( 0, 50, 2.1 ) ;
await roll ( 270, 50, 1 ) ;
await roll ( 180, 50, 2.7 ) ;
await roll ( 270, 50, 2. ) ;
await roll ( 315, 50, 0.5 ) ;
await roll ( 0, 50, 0.2 ) ;
await roll ( 315, 50, 2 ) ;
await roll ( 45, 50, 2.5 ) ;
}
In the afternoon block Emily, Patrick and me went into the lad to test out some coding software. I learnt about a program called Ruins of Atlantis. It is a program where you code a ship through the ruins of atlatis. On Friday I went to tough guy and gal. I got very muddy and it was a lot of fun.
No comments:
Post a Comment