Arduino Robot

This summer I decided to have some fun with the various robotics we have at our school.  The first one I worked with was the Arduino microcontroller.  I bought a couple of different quicks from an offshore website (https://www.banggood.com/4WD-Smart-Robot-Car-Chassis-Kits-With-Strong-Magneto-Speed-Encoder-p-917007.html, https://www.banggood.com/2WD-Avoidance-Tracking-Smart-Robot-Car-Chassis-Kit-With-Speed-Encoder-Ultrasonic-For-Arduino-UNO-R3-p-1124282.html) that took a few weeks to arrive, but came with almost all the parts needed (extra wiring was not included, and for the second car I wanted the L298N Motor controller).

It was somewhat tricky to get started, I do not have a background in wiring and electrical work (have wired one Arduino before with a very detailed video) on microcontrollers but this one was not too difficult and has a lot of similar videos that can help.

The trickiest part of the build was linking up the motors to the motor controller and then linking that to the Arduino (or the motor shield, which I have done both now).  The kits do need additional power supplies (the only downside to using the motor control), so I am currently waiting for the 9V battery adapters from Amazon before I can let them drive around my garage freely.

I learned that the fear I had with wiring it wrong was not one I should worry about.  The forgiving part of the arduino is that as long as you identify it correctly in the code as a global variable to the correct pin it will work.  You will need to also connect the ground to the motor and the arduino board ground (on the port side).  The motor controller is beneficial because you can use it to combine motors, change speeds, and provide it with additional power to make it function correctly.  The first car I made had only one power supply to a breadboard and it was unable to work correctly.  Everytime it was connected to the PC is would drive at the right speed and then when connected to battery it would go much faster.

I found the one thing missing from the readings I found was that it did not explain the controllers on the motors easily, so I am labeling it here. Using L298N motor:
– ENA/b controls the speed
– IN1 right motor forward movement if set to high (IN2 must be set to low)
– IN2 right motor reverse movement if set high (IN1 must be set to low)
– IN1 left motor forward movement if set to high (IN4 must be set to low)
– IN2 left motor reverse movement if set high (IN3 must be set to low)
– setting all motors to low will turn it off (like using breaks)

here is the code I have used.

// motor one
int enA = 10;
int in1 = 9;//for
int in2 = 8;//rev
// motor two
int enB = 5;
int in3 = 7;//for
int in4 = 6;//rev

void setup()
{
// set all the motor control pins to outputs
pinMode(enA, OUTPUT);
pinMode(enB, OUTPUT);
pinMode(in1, OUTPUT);
pinMode(in2, OUTPUT);
pinMode(in3, OUTPUT);
pinMode(in4, OUTPUT);
}

void demoOne()
{
// this function will run the motors in both directions at a fixed speed
// turn on motor A
digitalWrite(in1, HIGH);
digitalWrite(in2, LOW);
// set speed to 200 out of possible range 0~255
analogWrite(enA, 200);

// turn on motor B
digitalWrite(in3, HIGH);
digitalWrite(in4, LOW);
// set speed to 200 out of possible range 0~255
analogWrite(enB, 200);

delay(2000);

// now change motor directions
digitalWrite(in1, LOW);
digitalWrite(in2, HIGH);
digitalWrite(in3, LOW);
digitalWrite(in4, HIGH);

delay(2000);

// now turn off motors
digitalWrite(in1, LOW);
digitalWrite(in2, LOW);
digitalWrite(in3, LOW);
digitalWrite(in4, LOW);
}

void demoThree()
{
//left turn
digitalWrite(in1, LOW);
digitalWrite(in2, HIGH);
digitalWrite(in3, HIGH);
digitalWrite(in4, LOW);
analogWrite(enB, 200);
analogWrite(enA, 200);
delay(1000);

 

//right turn
digitalWrite(in1, HIGH);
digitalWrite(in2, LOW);
digitalWrite(in3, LOW);
digitalWrite(in4, HIGH);
analogWrite(enB, 200);
analogWrite(enA, 200);
}

void loop()
{
demoOne();
delay(1000);
demoThree();
delay(1000);
}

Attached are some photos as well of the designs.  I will post again on this when I have them moving freely.  And I will post about the utlrasonic sensor as well.

Advertisements

CS Teachers Conference at UWaterloo

I had the pleasure of attending this 3 day conference where I was able to learn some older and new technologies that are available from the university as well as things that other educators are doing in their classrooms daily.  For me, it was an amazing opportunity to learn because I have been focused on my math teaching for the past 3 years.   There were come key themes that I took away and some questions I have for the next steps.

The first thing that I continuously thought about (as well as something that I heard from others) was the desire from our students on instantaneous feedback.  Students want to know how they did, if they need to improve, and how they need to improve as soon as they complete a task.  Although this may sound like exciting news, it is not always as great because some students do not want to think about how they can improve, but rather want you to tell them how to improve.

One way the University of Waterloo and other websites provide a way for instantaneous feedback in coding is through “tutorials” where students do not have to download the IDE.  Some examples we looked at in the conference were CSCircles, Codingbat, and Websheets (this is a newer one where you create your own code).  All of these provide some information on the program, the elements you will be tested on, and then a space to code the program required.  When students “ran” the code, the sites would compile and run test cases against the solution code.  It would give error messages and give results based on the test cases.  I found the test cases very helpful because it allowed to student to see that you need a number of test cases and need to make sure that you test a lot to find subtle problems.  They do not all track the students progress as they are to complement the student learning rather than be the classroom they are in.

The other concept that a lot of teachers were implementing was the idea of using cloud services to submit files and to promote collaboration on code.  One industry tool that is constantly being used for coding and other services is Git and Github.  This is a neat tool that creates online repositories and then allows you to share the code with anyone you allow (free Github makes all code public).  In order to collaborate together, you need to give special permission to the other users.  In our session we were all able to access the code presented in an easy way as we didn’t have to download the files and then locate the package to open.  The only downside was that you needed an account and some boards block the use of Git and Github.  Once I get the handle on this, I will hope to use it in my own classes so that students are able to work together and learn skills that the workplace already uses.

The last take away was not the newest concept, but was something that I would like to practice in my classes (even math) and that was the idea of Genius Hour.  The one teacher took it a step forward and talked about how they implement aspects of project management into the genius hour sessions.  In order to work through their personal project they are required to complete the basic components involved in project management.  Every session also included a basic exit card that had key ideas, such as what they learned, what they did, where they need help, and what their next steps were.

As always it was great to go to a conference that stretched my thinking and made me reflect on where I could go next with my learning.

Community Circle In a Senior Class

Today was day two of restorative justice which saw us in the circles as a participant as well as getting a chance to facilitate.  I found this experience helped me gain the confidence needed to run circles more frequently in my classes.  

I didn’t post this last time but the idea of restorative practice is to ask the right questions that will lead students to understand their actions had implications because they had to think deeper.  The following questions will help get away from the “I don’t know” response students give when we used to ask “why did you do that”.

 
I have used these before without knowledge of the program and have found they do get students to think and they lead to more meaningful steps to solving problems. 

Last year I did complete tribes training which I feel helped me understand the basics of the circle and the need for consistent use so that students saw it as multidimensional.  Those are the two keys to being successful with this practice.  If you don’t build the foundation with the students and have them experience how powerful the circle can be for getting your voice heard, shy students will not gain the confidence needed to share their input into the classroom.  The other part is using it for other purposes so that students start to gain the idea of community and that the circle is for sharing, good and bad.

The major trouble I have seen in the past and even today is the idea that in order to use these circles you need to gain a level of trust with your class.  In a secondary classroom this proves to be more difficult as we only have them for 76 minutes a day, try to implement our rules, and cram curriculum into their head.  This year I have found that I sense a stronger community with my students, and that is why last Thursday I attempted an impromptu circle.

My grade 11 class was upset with their results on the last test.  In order to diffuse the situation and have the students still trust that I had their best interest at heart, I formed a circle.  I explained the rules about no put downs, which is already established day to day, and that you had a right to pass if you weren’t comfortable sharing this time.  I was nervous as I had never facilitated a circle before but knew that this was needed more than new content to keep the class cohesive.  The prompt was the key as I focused on what the class could do better to help them prepare (what I could do) and what they could do/would like to do better in the future.  By making them think about the second part it took away from the blame on me or someone else and made it into a we need to do all these things to make it better.

At the end a couple of students turned and said, this was amazing and appreciated it because it let them voice what they didn’t like and what we could do to make the future tests and assessments better.  Since Thursday I have found that they are doing the things they said they would to better prepare and are appreciating the smaller things I have been doing to meet the needs they set for their success. 

I am happy to have been part of both sessions (tribes and restorative practice) and would recommend one, or both, to any teacher as a way of changing the mentality of the class and as a way to make a group closer, even for 76 minutes.

My next steps are to bring it to my other class and have check ins on Monday and Friday to see how they are feeling in order to help them socially, emotionally, and academically.

Dr. Ross Greene and Collaborative Problem Solving

I meant to blog this shortly after I saw him, but got delayed on writing this piece.  Dr. Greene has two books so far “The Explosive Child” and “Lost at School”. This post will focus on the latter of the two books which looks at why behavioural challenging students are failing in our system and how we are failing them.  I am only going to give some of the key takeaways from the talk because I think that reading his book and thinking about changing your own mindset on this area could be beneficial to the students we all teach.

I had the honour of seeing a presentation about a month ago from Dr. Greene.  It was insightful and was amazing to see the different ways that we could work with students to help them solve their problems.  The first part of his talk was something that I have come to realize, but was great to hear again, “Children do well if they can”.  All students want to do well and want to be successful, the students that have behaviour challenges just have other factors in the way and we (as teachers) need to help them out.

The main idea around the book and the talk was about how the students with challenging behaviours are challenging because they lack the skills to not be challenging.  It is a simple idea and thought but is very powerful and is a different lens to look through in the life of a student.  We used to think that it was the parent, or they were unmotivated, or attention seekers, or good manipulators, or even that they were testing limits…but these are wrong.  Some of the comical counterexamples are that if they were good manipulators they would be doing it without us knowing, we all test limits and can’t blame any student for doing the same thing, and that we as adults seek attention all the time to get our way; so why are we getting mad at children for  modelling what they see.  These were all old world ideas and if the strategies we had to fix them worked, we wouldn’t still be having these problems today.

He outlined some of the big ideas of his book which revolved around the skills that behavioural challenging students lacked.  They were executive skills (hindsight, forethought, impulse control), language processing and communication skills, emotional skills, cognitive skills (grey thinking), and social skills.  The amazing part of this discussion was that he did not place any of the blame on the parenting techniques a student was exposed to (something most of us do) and didn’t look at any of the psychiatric diagnoses that we are all expecting from a topic like this.  When he described some of the situations that displayed each one of the skills, it was easy to picture a student that I had taught or currently taught (in my short 3 year experience), which made talk that much more powerful.

I order to help these students he created a document to outline the different problems we see and strategies to help students and teacher collaboratively fix them.  It is all collaborative because in that model there are winners and winners (no losers if everyone agrees on the strategies).  You can find these resources at livesinthebalance.org and they are all free!

The strategy is the ALSUP (Assessment of Lagging Skills and Unsolved Problems).  It’s a simple idea that can have a lot of impact on the lives of the children we teach.  Teachers of the student meet and as soon as one person identifies a problem they see, all the teachers discuss where they may have seen a sign of this.  This process is continued until the sheet is complete.  The key things are that there are no theories here and they need to be specific to what has been seen.  Once this is complete then the teachers decide which problem they will help the student solve and then the meetings with the student take place.

The reason for the meetings with students is because it helps them take ownership of the problem and shows that you have empathy as well.  Its better than an adult imposed suggestion because the student may feel that the concern is not met and they are simply complying to make sure that they are fitting the rules of the class.  The other alternative is to leave it aside and not work through the problem, which only leads to further concerns as the problem grows when left unsolved.  There are some guidelines for the meetings but it can be overwhelming to see all the different parts of this model at once.

I know that it seems like some of the findings he presented are trivial and that it just creates another “job” to do, but I have been in a school where problems were brushed aside or solved from a unilateral perspective and it did not lead to anything but worse behaviour.  I believe in the statement that children do well if they can and are given the opportunity to succeed.  I have seen it in my applied level class this semester that if students are given the chance to be successful and feel the empathy from you, they will work their best to meet the expectations you set.

My question to you is, what do you think about this topic? How do we proactively deal with students who have behavioural concerns and how do we get them to fit back into our system effectively?

Video Games and Teaching

I recently spent the weekend finishing off the game the Last of Us for the Playstation 3.  I had been meaning to play it for a while but the fact is I never had the time.  After getting started I instantly got into the story and couldn’t stop thinking of ways to beat a certain level or even strategies to best use my player’s skills in the game play (I even asked my students for some hints as I was getting stuck).  The one thing that stuck out to me as I finished was “How can we compete at school with the stimulation that these games are providing our students?”

As a computer programming teacher I instantly saw the connections that could be made and how we could spin a lesson out of video game design and storytelling, and then go on to create our own games.  Unfortunately as a math teacher I was (and still am) stuck on the idea of how to get students into a subject that is often deemed one of the worst classes.  I often try to being humour into the course and try to connect what we are doing to real-life and even popular media (singing all about the bass when working on power laws), but I want to further inquire about gamifying my classroom.

I feel that with the amount of students that play games (girls as well as boys), we could all benefit from the power of gamifying classrooms.  Games provide that connection to our imagination and provide us with opportunities to try new things without being punished when failure occurs.  Although I strive to make the learning zone in my classroom a fail-safe zone where students feel comfortable in answering questions even without full certainty, it is not the same feeling as with a game.  Due to the fact the lives can come back and that you will not be judged on intelligence, failing in a game is much safer than failing in real life.  I have tried to make “games” that have helped the students get interested in tackling problems and being successful in their own learning, but it is not the same stimulation that a game provides.

I have often thought about making the MAP4C class into a game of life or the SIMS, because they learn about buying a house, saving money, and planning for their future.  I think the trouble lies in the delivery of content such as statistics (two-variable data sets, weighted averages, percentile ranks, etc.), exponent laws and exponential functions, and algebraic models (linear vs. quadratic vs. exponential graphs).  There are the trickier topics that can demotivate students and I want to further explore how to incorporate these into the ideas that we have for personal finance, trigonometry and geometry.  These are the questions that I have for myself and have for my colleagues who are further interested in making the courses more interactive like a game as that can help our students stay focused in this over-stimulated world.

It goes without saying that we will have to face the challenges of motivating students for a long period of time when they are developing shorter attentions spans.  With games, smartphones, and Netflix we are becoming the most boring and least controlled element in the students lives.  It is a difficult (but interesting) challenge although I am unsure of how we are able to compete or even teach the students content that they do not feel is applicable to their lives.  Reaching the students and getting them to see the application of content in their lives is one of the greatest accomplishments but is also the biggest obstacle.  We need to use the lesson of great video games: get them hooked to the story and the tasks at hand and they will want to continue attempting the work for hours (even days).

Teaching Perseverance

One thing I never thought about in my own schooling and on my teaching placements was teaching students the value of perseverance. It is something I became more aware of when I worked at the college level as a teaching assistant and then again this semester when I started teaching the grade 12 college math course.

I think this post links well with my earlier post on growth mindset because I have been trying to implement the idea of “I can” in my students minds. Today was one of those days where I later realized that the teaching I did was more than just teaching math content. I felt like I was able to teach a bit of perseverance to my students today which positively affected those who put in the effort. I had a couple have those “ahh” moments that we hope to see a lot of our students have.

At the end of the class I made sure to let my students know that we did struggle at the start but when they kept pushing through we made it to solving the problem effectively. Before the start of class today I had a student come to get additional work because they were going home sick. This made me realize that I needed to congratulate my students on their efforts because they needed to know that I appreciated their hard work in a difficult task.

I feel like the two lessons yesterday and today gave them the confidence they required in a task that they usually had difficulty with. I have always strived to create a connection with my class so that they felt comfortable with taking chances, but I am still learning how to motivate them to consistently persevere in math.

GAFE Summit 2014 Day 1 – Mind Blown!

So today was the first day of the Ontario GAFE (Google Apps for Education) Summit in Kitchener.  It was my first time at a summit like this so I was unsure as to what I would expect from it.  I was overwhelmed from all the different sessions that were taking place in the day and couldn’t choose, but I was lucky enough to have some great colleagues and friends who joined shared document to get all the information from as many sessions as possible.  By the end of the day, my mind was blown from all that went on and ideas were flying around with all the things I could do.  Here are some of the major ones that stood out.

The first big thing I learned from today were that we need to look at the SAMR Model when we are looking at using tech in the classroom.

As discussed in the amazing keynote from Jennie Magiera (@msmagiera), when we start using tech we are either at, or slightly below, the Substitution level of the model.  Which as teachers we think is great until we realize that it is not really doing anything but replacing worksheets with iPads or Chromebooks.  To move into the Modification and Redefinition stage we need to think of using tech in the way that Barney and Dora the explorer help young children learn.   I find that since I am early into using tech in my classroom, I am finding myself stuck at the substitution level, which can be frustrating when I want to be able to make tech part of the learning.  I am hoping that with the use of tech in my classroom in the semester I will be able to move away from substitution.

The next big thing that I took away from the my sessions was MIT App Inventor.  This was formerly a Google Labs product, but was later given to MIT to further develop.  The session was amazing because we were able to create a basic app and then test it on an android device instantly.  Any changes that we made would then transfer to the device and we could see the results immediately.  The session brought me to think of the way in which I could use the app inventor with a math class.  My initial thought was to have students make apps to solve the problems we were doing in class, for example solving trigonometric equations.  But later on I realized that this was simply substitution on the SAMR Model, so it’s back to the drawing board on that one (any thoughts on that would be appreciated).

The other two sessions that were incredible were the ones by James Peterson on Google Draw and by Kyle Pace on creating a Google Sites.  This was truly effective because we were taken step by step on how to create something based on the two products.  The two can go hand in hand as well since we can link what we create to the site and all we have to do is change the image if required (no need to re-link).  If you are using GAFE in your school, consider doing what Kyle and his colleagues did by creating easy to use templates for the not-so-savvy teachers who could use a starting point.  Its a simple click in the site settings that saves your current layout as a template for all in your school/board to use in the future.  Learned about some add-ons and sites, like pixlr and clippingmagic.com, that are perfect for getting jpeg images to have transparent backgrounds.

The demo slam at the end of the day highlighted all the amazing presenters and the great things they are doing with GAFE in their classes.  Some of the ones I want to further check out are Google Read and Write, Synergyse, Google Maps Engine, Pear Deck, Google Black Menu and the whole idea of having apps scripts.  I am trying hard to figure out which sessions I will go to tomorrow but it’s going to be another tough choice.

If you have a chance tomorrow to follow the conference because you couldn’t attend, just follow the #gafesummit on Twitter for all the amazing tweets from the incredible sessions going on.