Week 14 – James – 2019

Hi guys. This will be the last time I blog about the line follower.

I am very happy with my code and it works all the time. I feel very confident about the competition and I hope I’ll do really well.

On the competition day I won’t have Dad to give me things to think about so I’ll have to work by myself. I’m OK about that though.

I did another run through on my main code for the competition and it worked. The reason I did a double check was if somehow the robot failed on competition day we would not finish the course.

That’s all for today so I’ll now leave you with my next steps, word and phrase of the day.

Indolence: Avoidance of activity or exertion; laziness

A person who never made a mistake never tried anything new – Albert Einstein

Next steps: To figure out a Rubic cube using the Mindstorm

Bye…

Week 13 – James – 2019

Hi guys. Today I made a table on where the can might be placed on competition day and I also did a run-through on my progress so far.

So with my table I drew a picture of the spillage area like this.

This was what my table looked like but I numbered where the possible spots the can might be placed

Here is what happend on my tests.

Spot 1: It was placed in the top left corner of the spillage and successfully pushed it out.

Spot 2: It was placed in the top right corner of the spillage and only just managed to push it out.

Spot 3: It was placed in the top middle of the spillage and pushed the can out.

Spot 4: It was placed on the left but moved up a bit and hit the can smack bang in the middle and pushed it out.

Spot 5: It was placed on the right but moved up a bit and once again it was hit smack bang in the middle and pushed the can out.

Spot 6: It was placed on the left but moved down a bit and the robot only just managed to push the can out.

Spot 7: It was placed on the right but moved down a bit and the robot only just managed to push the can out of the spillage.

Spot 8: It was placed in the middle of the spillage area and the robot hit the can smack bang in the middle and succsefully pushed the can out.

When I finished my can finder testing, I did a video on what my competition code would look like. The video is below.

What my code will look like at the competiton. Enjoy 😄 .

This is it for today’s blog so i’ll leave you with what I need to do next, the word of the day and the phrase of the day.

My next step: To try make my can finder even better.

Observe: To see, watch, perceive, or notice.

Excellence is a habit. It’s always what you repeatedly do – Shaquille O’Neal

Bye…

Week 12 – James – 2019

Hi guys.

NEWS FLASH! The competition has been postponed till the 19th of September due to 2 of the 6 teams competing in the whole competition being sick!

We get extra time coding so I made my can finder and speed builder better. Here are the changes I made.

The change I made to my Speed Builder is that I added more speed every time and the robots doing it for 1500 times.
The change I made to my Can Finder code is that I got rid of the loop and made the robot hit the can in the middle of the bar that pushes the can out.

These are the changes I made to my speed builder.

Before: With my speed builder, I made the speed start from 30 and added 0.001 to the speed doing that for 10,000 times making the final speed 40.

After: I made the robot start at a speed of 30 but adds 0.01 to the speed and doing that for 1500 times and making the final speed 45. At the end I put a sound block that made a crowd cheer.

These are my changes to my can finder.

Before: I had a loop at the end of my can finder and my turn back code was affecting where the robot will hit the can.

After: I took out the loop and when I tested it the robot hit the can smack bang in the middle.

That’s all for today’s blog so I’ll leave you with the word and phrase of the day.

Machinery: The working parts of a machine

When you are not practicing, someone else is getting better – Allen Iverson

Bye…

Week 11 – James – 2019

Hi guys. Today I added some more comments in all of my bits of code. Here is what they look like.

Can finder code.
Speed builder code.
Main code.

The Robocup JR competition is in a weeks time now so I tested the robot on all of the lines that could possibly be in my competition. Here are the tiles that I tested the robot on.

The tiles that I might need to complete in Robocup JR.

They all worked really well so I experimented with my turn speed.

I had my turn speed set at 75 but my dad suggested to change it down to 30 or 70 to see if it would still work.

It worked on 30 and 70 so I wrote down on a piece of paper.

This is the end of this weeks blog so I’ll leave you with the word and phrase of the day.

Algorithm: Rules for solving a problem in a finite number of steps

If you are afraid to fail, then your probably going to fail – Kobe Bryant

Bye…

Week 10 – James – 2019

Hi guys. Today I did a lot of coding today. I finally worked out why the code was saying “Hello”. I was running the wrong project! I also forgot about the ramp and did some coding on the can finder and deleted all my code I don’t need for the competition. When I got back to the ramp, I managed to get it to work.

I’ve only kept four pieces of code for the competition. The picture of the code is below.

My main code.
My variables.
My can finder code.
My speed builder code.

I tried the older code on the black line. But it did not work. Dad suggested I might be running the wrong code because I made a new project called 19/08/08 James.ev3 but I was running James.ev3, the project I made at the start of my journey!

With the can finder, I had to add a bit so it locks onto the can first and then locates it. It does not show you this in my code, above, because these photos where taken on Thursday but we had an extra lesson on Tuesday so we were prepared for the competition which is happening in 1 weeks time. The can finder works really well and gets the can out safely.

When we get up to the ramp, it runs my can finder code. So I added bits in before my can finder code to make the robot go over the ramp. I added a block to drive straight for 2.1 rotations of the wheel. It worked before saving the can and it also worked while the ramp was quite far off the liquid spillage area.

The line follower is still in good shape so I feel good about the competition.

My next step: To add comments in my code so I understand it.

This is the end of this weeks blog. Now here is the word and phrase of the day.

Perseverance: Not giving up despite the tasks difficulty.

I want to be remembered as a great competitor and a great teammate – Steve Nash

Bye…

Week 9 – James – 2019

Hi there. Today I did some more programming on how to get over the ramp. I’ve also changed bits in my competition code by taking bits out. The overall verdict for me is, “My code has just gone from working to not working”.

My code was looking very messy. Like this

My old code. Looks pretty messy.

But my new code looks like this.

My new line following code. Looks way tidier than before.

I did this so I could possibly just drive over the ramp. However, it didn’t work. When it went on the ramp it just said “Hello” and went off the ramp.

I managed to make the robot not say “Hello” just before we packed up. Since I duplicated my old code, I might have accidentally uploaded my old code instead of my new code.

That’s it for today’s blog. I’ll now give you the word and phrase of the day.

Bravado: A bold manner or a show of boldness intended to impress or intimidate.

If you do the work, you get rewarded – Michael Jordan

Bye…

Week 8 – 2019 – James

Hi guys. Today we got a new thing, it’s a ramp! (Thanks to Mrs Bennet for making it). The ramp is used in Robocup Jr.

The ramp has caused problems for almost all of us. (Sara has worked out how to go over the ramp and stop at the silver strip).

Today, I did a bit of duplicating. (I mean duplicating a whole project). I did this because Dad said to me to add comments into my other project. I just made the code a bit different for the turning bit as well. The others used one of the wheels to turn back and another to turn forward. The code for it would be this… It multiplies the turn_speed variable by minus 1 to make one wheel turn backwards instead of just stopping.

The new way of turning.

I’ve done this because my old way of turning wasn’t turning sharp enough. But when I did the new way of turning, it was way better. If the old code for the turning still worked Dad would still probably make me rewrite it to what it is now.

The final thing to talk about is the ramp. My code did not get the robot to go over. It just ran my can finder code. We were going to look at Sara’s code for getting over the ramp but we didn’t have enough time.

Before I go here is the word and quote of the day.

Nixie: A letter or parcel that is undeliverable by the post office because of a faulty or illegible address

I like people who don’t need everyone to like them – Virat Kohli

Bye…

Week 7 – 2019 – James

Hi guys, if you’re wondering why we haven’t written for a week, it’s because of Dad looking after me. (I was sick last week). Anyway, I worked on my can finder (again).

The last one I showed you (Back in week 6) was partly done. But now, I’ve done more on it and put more comments in. Here is a reminder of what my last weeks one was compared to this weeks.

My last weeks can finder code. Note: the last loop hasn’t been tested or uploaded yet.
This weeks can finder code. Note: The “My Block” at the end just slowly ramps the speed up when pushing the can out by adding 0.01 to the speed every time the code goes around the loop.

As you can see, I’ve made a new variable and a new “My Block” which i’ll explain about now.

The new variable is called “turn_angle”. It stores the number of degrees to turn for every increment. The new “My Block” is called “speed_adder”. It increases the speed by 0.01 every time the is repeated in the loop. Inside the “My Block” uses an addition block which puts the speed up by 0.01.

I can’t show you the code inside it since I haven’t got a screenshot of it.

This is what happens when I run my new code. When the robot gets up to the silver strip, the robot finds the can. Next it turns in five degree increments till the robot cannot see the can. Next you have to do some maths. The maths is how many increments were turned till the robot didn’t see the can. Divide this number by 2. Multiply this number by how many degrees in an increment. In my code an increment was five degrees.

I left it at five degrees because it worked quite nicely. However, the robot appeared not to turn the opposite direction as much as expected. I’m going to look at it next week to find a way to make sure the robot lines as straight up as possible with the can.

That’s it for today’s post. But for now here is the word and phrase of the day.

Abet: To help, encourage, or support someone in a criminal act.

The true competitors are the ones who always play to win – Tom Brady

Week 6 – 2019 – James

Hi guys, today I revisited my can finder code for the Robocup Jr compition. I did this because my line follower definitely works but my can finder is pretty basic compared to the other team members code from last year.

Here is my code from before:

My Can Finder code from last year. Pretty basic really.

My new one is going to include a variable in it. The others from last year all used variables in their can finder. They did not add one thing though, comments. So I’m going to make the can finder better and adding comments along the way as well as rewriting my line following code with comments and adding the new ‘My Block’ with my new can finder code inside it.

To start things off, I looked at some examples from last year. I made 2 new variables called ‘increment_counter’ to know how many degrees the robot has turned and ‘max_distance_to_can’ to locate the can within the variables value. (Note: ‘max_distance_to_can’ may be changed. I’ve set it to 50 at the moment). When the can is located, the robot will stop and then turn 5 degrees till the robot cannot see the can. When it can’t see the can it will count how many 5 degree turns it has done and divide that number by two. When you get the answer the robot will turn that amount of degrees in the reverse direction and stop. At this point, the robot should be pointing at the can. Last, and finally, the robot will move forwards and push the can out of the green chemical spill.

I’ve only done a bit so here is the code for my improved can finder, so far. I really need to write some pseudocode so I will do that next week!

My new can finder code. Note: the last loop hasn’t been tested or uploaded yet.

That’s it for this weeks blog. I hope you’ve enjoyed learning stuff so far. Here is the word and phrase of the day.

Charlatan: A person falsely claiming to have a special knowledge or skill; a fraud

Be proud of who you are – Eminem

Bye…

Week 5 – 2019 – James

Hi guys, today I worked on the junior competition requirements for the Robocup Jr junior competition.

Here are the tiles you’ll have to complete in the junior competition.

The tiles in the robocup Jr primary competition.

Some time ago I think I had a photo of my 2 sensor line follower. But this time I’ve made the line follower even better. Here’s what I did…

Firstly, in the senior competition there are those green hints. I added a variable called “use_green_hints”. I used that to look for the hints if I turned the variable setting to true. If I put it to false, the robot would not be looking for hints. This would be useful because in the junior competition, there are no hints. But if you compare that to the senior competition, there are hints.

With that true or false variable, I put it in to my ‘Declare Variables’ ‘My Block’ along with the speed and turn speed variables, as you can see below on the far right.

The new variable is a true or false block so you can turn things on and off like this case for instance.

You can see the code below for using the true or false block where that green line is leading to.

The code for turning the hint finder on or off. (The blocks after the “use hint” comment are not necessary but the code still works.

There will be a ramp included in the competition but we don’t have one yet. It should be made sometime soon though.

That’s it for today’s post, so now i’ll give you the word and phrase of the day.

Lionize: To treat someone as a celebrity; pursue celebrities

It’s better to offer no excuse than a bad one – George Washington

Bye…