Search This Blog

Friday, January 20, 2017

Traffic Engineering in TK with Raspberry Pi

This week, TK students at one of my elementary sites became traffic engineers with the help of Scratch and some Raspberry Pi.

Coding and digital making in Transitional Kinder??* Indeed!

Honestly, I wasn't sure if it could be done, but the first time someone suggested to me that physical computing and Raspberry Pi was only for older kids, I took it upon myself to prove them wrong. Children will surprise you, and I'm a firm believer that when the bar is set high, and with the right supports, kids are perfectly capable of doing some pretty amazing things.

My TK physical computing plan? I decided to use Pibrellas (so we wouldn't need to worry about loose wires or who would do the wiring), pre-create the Scratch blocks that the students would need to use to program their LEDs, and set up the Raspberry Pi stations already opened to Scratch and the partially written code. Students would work in small teams of 2 or 3 and take turns dragging the pre-written blocks into the correct order to make their lights blink they way that they wanted.

I integrated this lesson into a unit on "Community Jobs" that students were already working on and started off by introducing students to traffic engineering as a community job. We talked about how engineers use coding to program traffic lights in order to manage traffic flow.

Before this lesson, students had some coding experience, having been introduced to coding concepts
already by their classroom teacher, using both Code.org lessons and the OSMO Coding kit. Building off of what they already knew about coding, I introduced Scratch and our coding goals, and we did some hands-on planning before programming on the computers:
  • First, the teams organized print outs of red/yellow/green lights into the blinking sequence of their choice.
  • Next, I guided the teams through putting printed out Scratch cards in the order we needed to make our lights blink one after the other. We talked about the importance of wait blocks and looked for patterns in our code.
  • Finally, students were ready to get onto the Raspberry Pis and program their LEDs.
    • One student suggested that if they got stuck working in Scratch they should use the plan that they had just created with the printed blocks to help them (score!).
  •  At their stations, the teams were introduced to the Raspberry Pi computers (with Pibrellas already attached); we were lucky enough to have 4 adults in the room between classroom teacher, aid and coaches, so each station also had an adult helper.
  • I had pre-written the first part of the code for students, and already laid out the labeled "broadcast" blocks that students needed, so all they had to do was to put the "redon/off, yellowon/off, greenon/off" and "wait" blocks in the correct order.

Challenges:

  • I had expected students to struggle with reading the blocks, but luckily there were enough readers in this group of students that they had no trouble differentiating between the words red, yellow, and green on the Scratch blocks.
  • The biggest struggle was with learning how to use the mouse; most of these 5 year olds were used to touch screens, but not 3-button mice.

The Results:

Every team was able to get their LEDs turned on! Some teams even had time for me to teach them about loops, and others started playing with the order of the lights to see if they could extend the coding lesson on their own. 



*For those that aren't familiar with what TK is, the abbreviation stands for Transitional Kindergarten. Not to be confused with either Pre-K or Preschool, TK is an option for children who do not meet the "5th birthday before September 1st" requirement for entering Kindergarten in California-- an introduction to Kindergarten for the "young 5-year-olds".

Tuesday, January 17, 2017

Encouraging Perseverence & Creative Thinking in 4th Graders with 3-Act Math

Student work
"Why did you choose to build your model that size?", I asked a small group of 4th grade students using linking cubes to recreate the cross-shaped table that I had shown the class during Act 1 of our 3-Act task

"Um, I don't know..." one student replied as she continued building the model.

"How is this model going to help you solve our problem?"

"We're going to count up the cubes and figure out the area."

"Ah ha, we're trying to figure out the area. Okay. But is your model the same size as that table? Will they have the same area?"

At this point in the conversation I found myself guiding students to think about scaling concepts, in terms of multiplication and division. Not the original plan when I started teaching the lesson, but that is the beauty of a 3-Act math task-- the open problem solving and inquiry-based format means that the math instruction can often take spontaneous turns in whatever direction the students' work and conversation leads us.

Act 1 "Mystery Picture"
In this particular task ("Piles of Tiles" by Graham Fletcher), students were presented with a picture of a cross-shaped table on which a handful of 1 inch squared math tiles were placed along the edge of the table. The question-- are there enough tiles in the bag to cover the whole table? 

The classroom teacher had asked me to come in and demo a 3-Act. Her goal is to help her students become better problem solvers in math, to help them think more creatively in math and to engage them in more meaningful math tasks. 

This was the students' first 3-Act task, and most did have a hard time getting started. It's still not typical for a math teacher to ask students to dive into a problem with little guidance and without a textbook chapter title hint at the top of a worksheet cluing them into which operation(s) to use. When I asked students what they thought we should do first, I received quite a few blank stares. Fair enough. The one thing most students did know right away-- they wanted to use the manipulatives I had put out! 

Linking cubes were everywhere as students started recreating the shape of the table. They weren't quite sure why they were building the table, but they did know that building that table and filling it in with cubes should help them. It was from this "playing" that the conversation above was spawned-- I asked students to think about the dimensions they were given (60 tiles long), and then think about a number that could be useful when building their models. 
  • One group said "6!" right away, seeing the 6 in the 60, but it took some prying for them to think about 6 as a factor of 60, and that being the reason why 6 could make a good size scale model.
  • Another team, overhearing my conversation with the other, then suggested that 12 cubes as the length of their scale model might work because it is also a factor of 60-- nice!
One student in the class started solving the problem by drawing a model and breaking the cross-shape into five small squares. From there she confused the dimensions, but her thinking was on the right track. It took everything I had not to give her too much information and to instead ask the right questions to get her thinking about where her mistakes were.

We ended my demo lesson that day without closure. We did take time to reflect on our work up to that point, and shared some of the students' thinking so far, but we still had not solved the problem-- another jarring situation for the 4th graders. They expected me to give them the answer that they hadn't figured out yet-- not so much. Instead, their classroom teacher excitedly explained that she would be taking over the lesson the next day, and would let the students continue their work on the problem. The students' reactions? Cheers and applause.

That's right, 4th graders were cheering for math.

Saturday, January 14, 2017

Constructing Colonial Technologies in Minecraft Pi

Yesterday I wrapped up my first Minecraft Pi programming unit with a class of 5th graders. I was looking for a group of students to try "hacking Minecraft" with on our Raspberry Pis, and their classroom teacher wanted to take last year's Minecraft Colony project and kick it up a notch-- we found a match!

The progression of the unit:

  • Day 1-- Scratch project
    • The first day that I met with the 5th graders we started with a Scratch project. The students had already been introduced to coding via Code.org lessons and some had dabbled in Scratch. I wanted to spend our first lesson building off their background knowledge to teach a couple of programming concepts that we'd use in our Minecraft projects.
    • Using a hyperdoc as their guide, students were challenged to create animations about fractions in Scratch.
    • In the process, we discussed coding and mathematical topics we needed for our Minecraft project including loops, coordinates & number lines, algebraic thinking, wait/sleep time, and events to name a few.
  • Day 2-- Code Monkey
    • I wanted to lead up to text-based coding with some guided practice.
    • Students used Code Monkey-- a gamified way for students to learn how to write commands for a sprite, or in this case a turtle, using text. 
    • Using Code Monkey helped students learn the importance of spelling, punctuation and syntax in coding.
  • Day 3 & 4-- Intro to Minecraft Pi and Python
    • Using resources from the Raspberry Pi website and my experience at Picademy, I put together an introductory lesson for the 5th graders on "hacking Minecraft" (an evolving work in progress). 
      • Students learned how to teleport, post a message, set a block, and set a rectangular prism of blocks using Python.
    • Over the course of two class periods, students worked in small groups and learned about the Raspberry Pi computer, inputs/outputs, variables, x/y/z coordinates, loops and conditions.
  • Day 5-- Create a Colonial Technology in Minecraft Pi
    • Students' final task was to use what they'd learned in their history units and in our coding lessons to construct and describe a colonial technology in Minecraft.
    • Students first reviewed how to post messages and set blocks in Minecraft Pi using Carrie Anne Philbin's videos.
    • Then, students were required to sketch out a building on grid paper, with dimensions, that they wanted to construct, either independently or with partners.
    • Next, students had to plan out the code that they would use to construct their first colonial building.
    • Once the students' plans were approved, they got together with their project group to start coding.
    • After programming their first building, they moved on to constructing a technology that they thought was important to colonial America. Students had to decide the best (most effective) way to construct their technologies using Python. 
    • Some of their ideas included:
      • Setting a cuboid and then cutting out parts of the cube to shape their technology
      • Programming their character to drop blocks behind them and then moving their character around to quickly construct the shapes they needed
      • Another team set blocks manually to create their colonial tool, but successfully programmed a message to appear and describe their technology

What students learned:

  • How to debug, edit and revise their work
  • 3-dimensional coordinate planes and how to move along the plane
  • Basic algebra concepts
  • What variables are, and their role in writing code
  • Events, Arguments, Conditions, Loops
  • Grit and persevering through challenging work
  • Basic Python commands
  • How to draw on information from multiple sources and how to read and comprehend informational/technical text
  

What I learned:

  • 10 year-olds CAN program in Python-- they were amazing!
  • Groups of more than 3 students per Pi was too many. I like students programming in teams, but more than 3 students per group and it's hard for the kids to find something for everyone to do (I'd already experienced this issue with a younger set of students, and it was confirmed with this older group).
  • 30 kids was a lot to try to teach coding and physical computing to all at once. I think my threshold is about 24 students. More than that for these lessons, and I could use a co-teacher.

Lesson Resources:


Tuesday, January 10, 2017

A peek into the 1st ever #K2CanToo event

Last weekend I had the pleasure of participating in the first ever #K2CanToo conference as a facilitator-- a learning event especially for TK-2 teachers and other educators supporting primary level classrooms. The brain child of instructional coach, Susan Stewart, the event centered around instruction in STEM topics and the special needs of our littlest learners. There was something for everyone and sessions ranged from digital citizenship to makerspaces, inquiry-based math instruction to robotics & coding, makerspaces to NGSS in the primary classroom.
Lots of opportunities for personalized learning

Small class sizes, and the #HelpDeskEDU unconference running all day, provided opportunities for personalized instruction for attendees. Hands-on learning, and plenty of collaboration and creation time in sessions, meant that many teachers left the conference with not just new ideas but with redesigned lessons prepped and ready to implement on Monday.

I had pleasure of leading two sessions: one on inquiry-based math instruction in K-2 and another on Seesaw, the Learning Journal app.

Think they're too little? Think again!
In my inquiry-based math session, participants took part in a 3-Act math task for littles; explored ways of using Dot Talks and Notice/Wonder to incite conversation and math talk; considered bringing in inquiry and critical thinking with Which One Doesn't Belong tasks; discussed ways of providing young learners with opportunities for open-ended math exploration with Would you Rather? Math; and learned how we can make math relevant by teaching math content in context. Math tends to be the subject in which teachers have the hardest time shifting instruction; we're so used to teaching facts and figures the same way that we have for more than a century that doing things differently means major mindset change. It was exciting to see all of these primary teachers ready to challenge their students, and themselves, to think differently about math!
Hands-on learning

My Seesaw session was a packed house and teachers were excited to learn how they and their Seesaw to communicate, collaborate, demonstrate learning, create, analyze, become more independent learners, and share all of this classroom goodness with parents and, potentially, the world. Teachers left the session with their Seesaw classrooms up and running and ready for students.
students can use

It was an inspiring weekend, and I look forward to seeing the #K2CanToo movement grow!


The #K2CanToo crew!

Monday, January 9, 2017

Cooking up some Pi finale-- primary age digital making

Several months ago I worked with one of our 3rd grade teachers to develop a multi-disciplinary computer science unit around government and the election process. It was one of the best experiences of my career in education. Thanks to the work of their classroom teacher, the 3rd graders learned all about the election process and the California propositions on this year's ballot. Building off of what they learned in their language arts and social studies units, I had the joy of working with students on a related computer science unit, with a focus on coding and math, to help us build a digital photo voting booth (see related week 1 & week 2 posts for details on the lesson progression).

On Election Day, students presented their work to their peers, admin, parents, teachers, and even the polling place supervisor working downstairs that day (since the school site happens to also be an actual polling place). The students were eloquent, knowledgeable, and visibly excited to share their hard work with an authentic audience.

What skills did students learn during their digital making experience?
  • Sequencing
  • Patterns
  • Math in context
    • Decimal fractions
    • Multiples
    • Abstract reasoning
    • Attending to precision
    • Looking for structure
  • Programming concepts
  • Algorithms
  • ELA in context
    • Punctuation
    • Capitalization
  • Editing & revising work
  • Basic circuitry
  • Electricity concepts
  • Problem solving
  • Perseverance & grit
  • Collaboration

In addition, the hands-on learning and creating in this project-based format provided opportunities for ALL of our learners to shine! Students typically unengaged with "traditional instruction" quickly jumped into the electronics and making, while our detail-oriented friends latched on to the coding tasks, and our more artistic students enjoyed working on the sprites in Scratch and creating the persuasive videos and election posters. Students worked together, learned to solve problems as a team, and coached and supported each other throughout the process. It was amazing to see what kids are capable of when you give them a chance to work on something meaningful in the classroom.

My favorite comment during the unit-- "Ms. Haughs, I love you for teaching us this!" followed by a big hug. I guess the project was a success.


Lesson Resources:



Monday, January 2, 2017

Bring Coding to Your Classroom Tomorrow (originally written for PBS Teachers Lounge blog)

DECEMBER 08, 2016
http://www.pbs.org/education/blog/bring-coding-to-your-classroom-tomorrow
Why should educators across all grade levels and subjects integrate coding computer sciences into the curriculum? That was the theme of my last blog. Now, let’s talk about other ways  educators can start integrating computer science education into their classrooms. For many, coding has been the answer, but this can be intimidating. Most of us never had any training in computer science in school, and it certainly wasn’t a topic covered in my multi-subject, pre-service program. Primary teachers that I work with tend to be especially unsure about what computer science might look like in their TK-3 classrooms.
For teachers new to computer sciences, there are so many fantastic resources available to introduce coding to their students.
So how do you get started?
  • The best advice? Jump right in and learn with your students! Even if you have no coding experience at all, start some lessons on Code.org with your class and learn together. Many of the Hour of Code lessons on Code.org also come with lesson plans that support educators in teaching relevant academic vocabulary and computer science concepts.
  • Use the Computer Science Teachers Association (CSTA) 2016 Interim CSTA K-12 Computer Science Standards to guide integration of computer science or coding instruction.
  • Check out the Code.org workshops for K-5 educators where you’ll learn the basics of computer science and how to use the Code.org lesson resources in your classroom.
  • Raspberry Pi is a U.K. based, non-profit organization dedicated to growing computer science education for teachers and students. Last year they expanded their “Picademy” computer science education program into the United States. Interested educators can apply to attend the program by visiting Raspberrypi.org.
There are other excellent benefits of incorporating coding and computer science into the classroom. It can encourage a more diverse population of students to embrace these subjects. Why does it matter? In 2015, according to the Bureau of Labor Statistics, women made up only 24.7% of the computer science and mathematics industry. A mere 8% of those women were black and 9% were Hispanic. Diversity in the computer science and mathematics industry is still severely lacking – and we as educators can help with these concrete tips:
  • Start early: The earlier that we get children interested in computer sciences, the more likely they are to continue in computer science courses in high school and college.
  • Make the learning relevant and cool: If we want to see more students interested in computer science topics, we need to make it relevant to their lives. How can we integrate not just coding, but digital making into our classrooms as a way for children to create and solve problems? Students can use tools like Makey MakeysArduinos, and Raspberry Pi to apply their coding skills and create!
  • Share diverse computer science role models: Computer science is not just for geeky white males, as is often portrayed by the media. The STEM world is made up of a diverse group of individuals who have done amazing things; people like Ada Lovelace, Grace Hopper, Hedy Lamarr, Mae Jemison, Margaret Hamilton, Katherine Johnson, Annie Easley, Ellen Ochoa, and many more.
  • Encourage perseverance: Encourage all students to learn some coding. Encourage perseverance when students get stuck and collaboration so that students can help each other learn. A growth mindset – the idea that anyone can learn anything with hard work) – is one of the most important tools for coding and life.
A Coding Success Story for a Third Grade Class
Last month, my work with a 3rd grade class was proof that students at all grade levels are ready for this type of learning. I partnered with the teacher to introduce her students to the idea of physical computing and how to build and program a “voting/photo booth” using Raspberry Pi computers and Scratch for programming. Students had minimal experience with block coding and no experience in electronics or computer sciences. By the end of our 3-week long unit, students were using terms like input/output, circuit, and GPIO; persevering through problem solving with their teams; iterating the design of their devices and debugging code until both operated correctly; discussing mathematical concepts like multiples, repeated addition and decimal fractions in context; and could explain the relationship between the code they had written and the functionality of the device they had built. More importantly, the students had a chance to create something, to engage in relevant learning, and to have fun at school. These 8-year-olds far surpassed our expectations. Now I’m excited to see what happens in two upcoming programming and computer science projects with a TK (transitional kindergarten) class and a 2nd grade class!
Extra Tools and Resources for Teaching Coding
Check out the many resources available for educators to use to bring coding into the classroom, even with little coding knowledge themselves. Here are just a few of my favorites:
After seven years of teaching in grades K-5, Amanda is currently a Math and Technology Integration Coach. She is passionate about providing innovative learning opportunities for students on a daily basis and is enthusiastic about the power of technology in education. Her curriculum planning and delivery is supported by the use of technology as a tool to differentiate instruction and to access student engagement and critical thinking skills.

5 Reasons to Get Coding (originally written for PBS Teachers Lounge blog)

DECEMBER 05, 2016
http://www.pbs.org/education/blog/5-reasons-to-get-coding
Nearly 50% of U.S. jobs will be automated by 2020.1
Approximately 65% of today’s elementary-age children are likely to work someday in jobs that don’t even exist yet – with about 2 million of those jobs expected to be created in the computer. mathematics and engineering fields.2
Technology is changing rapidly and changing the world that we live in. Jobs and tasks that a robot or computer can be programmed to do, will be. So how well are we preparing our students to live, and thrive, in this increasingly digital world?
It is imperative that today’s students receive an education that prepares them for this very real and not so distant future. Today’s students will need to be more than just regurgitators of facts and figures. They will need to think critically, solve problems, communicate, design, and create. They will need to learn how to learn if they are going to be prepared to live and work in this digital revolution age-- skills that worksheets cannot provide.
We are a long way off. Even with increased access to computer science instruction in U.S. schools in the last few years, still less than half of K-12 schools offer that needed computer science instruction, and there are still mixed feelings about the priority of computer science (CS) education in K-12 schools.3  As an elementary math and technology integration coach, I am passionate about integrating computer science and coding education into elementary classroom instruction.
Why should educators across all grade levels and subjects integrate coding beyond preparing students for a future workforce?
  1. Innovating and Inventing: Coding gives students another venue for creating. Students can use tools like Scratch or Dash and Dot robots to present their learning or explain their thinking, and digital creation provides children with another outlet for innovating, inventing, and expressing themselves in a different way.
  2. Incorporates all school subjects: Coding requires students to use language arts, math, and science concepts in context; skills including syntax, punctuation, cause/effect, input/output, multiplication, measurement of angles, coordinates, conditionals, electronics, circuitry, and much more.
  3. Encourages critical thinking: Learning to code challenges students to think critically, solve problems, and persevere through tough situations. Via partner programming activities, students practice collaboration and communication skills.
  4. Engages unengaged students: Teaching computer science and coding is an opportunity to reach students that might otherwise be unengaged in school. Last year, I worked with small groups of elementary age students at one of our Title 1 schools, teaching Scratch and Python as part of a physical computing project with Raspberry Pi. A handful of those students had spent much of the year in the principal’s office, were struggling to get along with peers, and were failing academically. During our coding lessons, however, those students were engaged, excited about learning, and were given an opportunity to become learning leaders in their classroom.
  5. It’s fun!: Robots, video games, animations, Minecraft, physical computing, web design – coding can be fun and children should have fun learning.
My hope is that soon, computer science instruction – computational thinking, problem solving, data analysis, algorithms, etc. – will be integrated into daily instruction of core subjects like math, science, and language arts. No matter what students plan for their future careers, the skills acquired from coding are powerful for all learners.
Not sure how to get started bringing computer science education and coding to your classroom? Check back in the PBS Teachers’ Lounge later this week. Look for: Best tips & tools for integrating computer science education into your school. Stay tuned.
1Frey, Carl Benedikt, and Michael A. Osborne. "The future of employment: how susceptible are jobs to computerisation." Retrieved September 7 (2013): 2013.
2World Economic Forum. “The global challenge insight report: future of jobs.” Retrieved December 1 (2016): 2016.
3Google Inc. & Gallup Inc. (2016). Trends in the State of Computer Science in U.S. K-12 Schools. Retrieved from http://goo.gl/j291E0
After seven years of teaching in grades K-5, Amanda is currently a Math and Technology Integration Coach. She is passionate about providing innovative learning opportunities for students on a daily basis and is enthusiastic about the power of technology in education. Her curriculum planning and delivery is supported by the use of technology as a tool to differentiate instruction and to access student engagement and critical thinking skills.

Emotions and Academics Go Hand in Hand (originally written for PBS Teachers Lounge blog)

SEPTEMBER 14, 2016
http://www.pbs.org/education/blog/emotions-and-academics-go-hand-in-hand 
This article is the third in a series of four blog posts featuring programs from PBS’ Spotlight Education week of educational programming. In this installment, former PBS Digital Innovator Amanda Haughs shares her thoughts and reactions following an advance screening of "NOVA: School of the Future”. "NOVA: School of the Future" airs tonight on PBS stations nationwide. Check your local listings. You can also follow the conversation on Twitter using #SpotlightEduPBS and #TeachBoldly.
My first year teaching was in a Kinder class that I took over mid-year for a new teacher who’d decided to quit the teaching profession. I remember spending every day of that half year feeling like a complete failure. My Kindergarteners weren’t progressing much academically and I spent more time breaking up fights and tracking down escaped five-year-olds than I did teaching math or reading. Let’s just say there was a lot of crying – a lot of me crying, that is, not necessarily the Kindergarteners.
One day, while standing in the hallway with a quiet group of Kindergarteners lined up in front of our classroom, my principal walked up to me with a huge grin on her face, and told me that I should be proud. This was the first time all year that she’d seen this group of students standing in line so calmly and respectfully with each other. In that moment I realized that maybe I wasn’t able to get a lot of math instruction done in the few months I was there, but I was able to build trusting relationships, develop a culture of caring, and create a safe space for my students to be in everyday. And I learned something that my teacher prep program had not taught me – that education is not just about the academics. It isn’t about teaching facts and figures as much as it is about teaching children.
So how exactly does a student’s emotional well-being affect their learning?  This was a question that spoke to me more than any other in School of the Future. The contrasting stories of students living in both East Palo Alto and Palo Alto was a reminder that students from all walks of life are dealing with emotional stresses that are affecting their learning on a daily basis; daily stresses that contribute to major inequities in our education system.
As a teacher working in an incredibly diverse school district, serving students from some of the wealthiest homes in the county as well as some of the poorest, I see my students reflected in the stories of those attending school both in East Palo Alto and Palo Alto. And, having grown up in Silicon Valley, not far from Palo Alto, I’ve seen the newscasts about teenagers committing suicide due to the overwhelming academic pressures they felt -- 10 in Palo Alto since 2009. How did our education system, and society, get to the point that an adolescent would choose to take their own life because they didn’t feel that they were doing well in school?
On the other end of the socio-economic spectrum, students living in poverty have a completely different set of stressors accompanying them to school every day. It is pointed out in the film that the “achievement gap [in America] is caused by an opportunity gap.” Some students go to school after having worked all night to pay their family’s rent, or having to worry about what color they wear to school, or whether they’ll make it home safely that afternoon. More often, students living in poverty do not have parents or relatives at home that can help with homework. They do not have many books at home to read or computers to study from. Some do not even have their basic needs met on a regular basis. These children are more likely to come to school more stressed and distracted than their peers. And right now, students living in poverty make up more than 50% of our public school population, a poignant statistic and one that needs to be considered by all educators; how are we changing our classrooms to meet the needs of a changing student population?
Amika Guilaume, principal of East Palo Alto Academy, says in the film that “if you do not envision your future, you will not work for it…” If students living in poverty are coming in to our schools already believing that they do not have a future, what do we as educators need to do in order to help them be successful? And if more than half of our students nationwide are currently living in poverty, how do we need to change our schools, change our classrooms, change our instruction to better engage today’s students, meet their needs, and help them understand that they do have a future?
I believe this is where personalized learning comes in, and the work of researchers like Angela Duckworth, Jo Boaler and Carol Dweck. It is important for us as educators to create a safe space for our students; a place where they feel physically safe, but also emotionally safe. Learning does not happen in a classroom unless children feel safe and feel as if they matter. One way that we can let students know that they matter is by making learning relevant for them. Acknowledging students’ strengths and their interests, and creating personalized and culturally-responsive learning experiences, empowers and engages students. Designing instruction around problems that students actually care about, and that are relevant to their lives, are validating and help spark emotional connections that can increase the desire to learn.
Educators also need to develop a classroom culture in which failing is okay and is a part of the learning process. Our classrooms need to be supportive environments where children can make mistakes and learn from those mistakes. All students are capable of learning and it is our job as educators to ensure our students know that. Students’ mindsets about learning and their emotional well-being must be nurtured just as often as their reading or math skills.
To better help modern students succeed, and to work towards repairing some of the inequities in our public school system, we need to remember that academics and emotions go hand in hand.

Sunday, January 1, 2017

My 1st Hack with Raspberry Pi!

Day 1 (or how I managed to break stuff)

Tree before hacking
A couple of weeks before Christmas, I discovered some cute little bug sculptures at a craft show, created from the recycled insides of various electronics. It was love at first site and so I bought a bug for each of my colleagues, and for myself, I purchased a circuitboard Christmas tree with blinking LEDs-- the perfect holiday decoration for a tech geek like myself.

A couple of days before my district's winter break, I tweeted out a picture of the blinking tree, thinking my techy friends would also find joy in such a geeky little gift to myself. One of those friends responded back with kudos, thinking I had made the tree myself. "Unfortunately I can't take credit for this cool gadget..." I replied, and then I started to wonder, could I maybe hack my new toy?

With my Raspberry Pi close at hand, and grandiose thoughts of programming my own lighting effects, I asked my office mates for their thoughts. (None of us know all that much about electronics, and although I'm getting better and better at programming my RPi, up to this point, I'd definitely never hacked anything from scratch.) That being said, the next thing I knew, one of my TOSA teammates was flipping through some books she had on electronics, the other was texting her engineering husband for advice, and I was digging around online looking for projects that might give us some insight into how we might hack the tree.


The hacking was officially underway!


Step one: Analyze, and get familiar with, all of the pieces of the tree
  • LEDs.... got it. Feeling pretty good about those.
  • Resistors... yup, we know what those are, too. Sweet.
  • 9V... right now this guy is powering the tree. 
  • Cylindrical blue thingies with writing on them that kind of look like larger resistors... might have to look into what those are. (Turns out those are electrolytic capictors.)
  • Other black thingies popping out at us... no idea on those. Will have to figure that out, too. (BTW, those are transistors.)
Step two: Snip the wires connected to the battery pack
Broken ground wire...boo.
We figured that if we were going to do anything at all, we first needed to remove the 9V battery pack. We no longer wanted the LEDs on the tree to be controlled simply by that battery. Our goal was to eventually get this guy connected to my Raspberry Pi for power and programming.

Once I had the wires cut, my next plan was to strip those wires and then extend them using some jumper cables I had in my toolkit. Unfortunately, in the process of stripping the wires (with scissors since I did not have wire strippers handy), I also managed to twist the wires right out of the soldering on the back of the tree (bummer).

Step three: Order soldering iron on Amazon (sigh.)

Interlude

Soldering kit arrived! Set up & plugged in then ran out of time to get to work before department holiday party. Did get a chance to watch Carrie Anne Philbin's intro to soldering video, though. Feeling ready!


Day 2 (learning that I had more to learn)

So after mentioning to my dad that I'd started this hack, his interest was piqued and he asked if I wanted to bring my new soldering kit over for a lesson. Before retiring, my dad worked at Applied Materials for 20-some years and used to do this kind of electronics work professionally, so yeah, if he was interested in giving me a lesson, I was in! 

First up-- removing the old soldering work from the +/- connections on the circuit board. We got the soldering kit set up on my parents' dining room table and, after my dad gave me a mini-lesson in using the "solder sucker", we successfully cleaned out the broken wires from the +/- connections. Then I took a couple of my extra jumper cables, snipped off the female headers, stripped the wires and soldered them into the circuit board-- a task that was a lot less painless than I originally expected it to be!



LED fail
Next up was figuring out whether I could now indeed control the LEDs by simply plugging the newly attached jumper cables into Ground & a GPIO pin on my Raspberry Pi. I hooked everything up, powered up, and connected the jumper cables on the tree to the 3.3V & GND pins and... nothing. I hooked up to a GPIO pin and tried a "blink" command and... nothing. I moved to a 5V pin and nothing. My dad, who definitely has more insight than I do into how these things work, pointed out that the tree originally was powered by a 9V battery. A 3 volt pin isn't going to provide enough power for all those LEDs. 

Ah, yes...

So I had to revise my original plan a bit. I did some more Googling and, lucky for me, plenty of others have blogged about their experiences with similar projects (hacking Christmas lights or 9V battery powered electronics). The missing link-- a relay board. My tree will still need to be powered by the 9V, but the relay board will act as a switch that will give me some control over the LEDs. And so, it was back to Amazon I went (those guys are making so much money off of me since I got my first Raspberry Pi!) to order my Waveshare Power Relay Board.


Day 3 (setting up the relay board)


I received my Waveshare relay board just before Christmas. There are a lot of relay board options available for the Raspberry Pi, but what I like about this model is the easy hookup; the Waveshare 3-Channel is a hat easily connected directly onto the GPIO pins of my RPi3. The hat also comes with extender pins already soldered onto the board, so I can still access the GPIO pins while the hat is on the RPi. LEDs on the relay board are another nice feature and provide visual confirmation that a channel has been turned on.

Although plugging in the relay hat itself was easy as, well, pie, installing the needed libraries for the relay board was not so intuitive for a beginner like me. The Waveshare wiki prompted a lot of downloading, copying and upzipping of files via the terminal, which I'm not super comfortable working in just yet. I had to do a little extra Googling to find some help and finally, almost 3 hours later (ugh), libraries were installed properly and my first relay board test was a success!

(Click here to view instructions on setting up the Waveshare relay board, rewritten by me for fellow noobs.)

Day 4 (officially a hacker)

Back at my parents' house for a second evening of hacking with dad, I unpacked all of my materials in my dad's shop for another round of play time.
Completing the circuit
  • The bad news-- I discovered that one of the jumper cables had come unsoldered from my tree. 
  • The good news-- I realized that I needed to remove that cable anyway to get the 9V back in the mix in order to power the tree.
So, next steps were to get the soldering kit out again, clear out the positive connection on the tree with the solder sucker, connect one end of a 9V battery snap to a jumper cable (we just stripped the wires, wrapped them together and sealed with painters tape), and solder the other end of the battery snap into the positive connection on the tree. The lengthened cable on the battery snap I put into the channel 1 "normally closed" slot on the relay and the ground cable we soldered onto the tree went into the channel 1 "common" slot on the relay.

Once all of the wiring was complete, it was time for a test. I powered up the Raspberry Pi and plugged the 9V battery into the battery snap and... blinking lights! So far, so good!


But now... 
I wanted to write a program that would control the LEDs!

(Side note-- while I was programming, my dad decided that my tree needed a tree stand, so he grabbed a piece of scrap wood in his shop and very quickly created a makeshift stand on his bandsaw. You'll see it in pictures below. The perfectionist woodworker that he is, he told me not to tell anyone because he said the work was sloppy, but I thought it was a cool addition to our hacking project anyway, and I wanted to give him credit. Sorry Dad!)

  • First, I moved the jumper cable from "normally closed" on the relay board into the "normally open" slot (I wanted to interrupt the circuit so that the lights would remain off until the board was programmed to close the circuit letting electricity flow back to the tree)
  • Then, I opened the sample Python program that I downloaded from the Waveshare wiki and cut and pasted the few lines of code that I needed to be able to control the channel that my jumper cables were hooked up to
  • I edited the sleep timing between "high" and "low" commands to control how long the blinky lights stayed on and then went off
 

The results? 

Success! It took a while, but my first hacking project is complete! Nothing fancy, but I'm pretty proud of my work. With this project I managed to learn more about circuits, what transistors and capacitors are, how to solder (and desolder) electronics, what a relay board is and how it works, and I was able to manipulate something electronic using just a little bit of Python. It is a pretty empowering feeling being able to tinker with something and use code to control, and change, the way that it operates. Not bad for a couple weeks work!


The code

Demo code on right; I copied/pasted what I needed on left



















My 1st working program on relay board! (I started editing & playing with this afterward)

How to set up the Waveshare Relay Board for Raspberry Pi

Just get a new relay board from Waveshare for your Raspberry Pi? Waveshare does a great job of posting all the resources that you'll need, but if you're a noob like me, with little experience working in the terminal, you might need a little more information, like I did.
I also discovered that with my Raspberry Pi 3, already updated with the most current version of Pixel, some of the steps on the Waveshare wiki were erroneous.

Below is a step-by-step on how to set up your relay board for use:

1) Start by running an update on your Pi:
  • Open the terminal window
  • Type in sudo apt-get update then hit enter to run
  • When updates are done type in sudo apt-get upgrade and hit enter to run
  • Install the python-dev package by typing sudo apt-get install python-dev in the terminal and the RPi.GPIO library by typing sudo python setup.py install in the terminal 
***The Waveshare site prompts you to install these packages that allow you to control the GPIO pins on your Pi, however Raspberry Pi already runs Python out of the box, so likely you don't need to run this install, especially if you have a RPi 2 or 3 with an up-to-date Raspian OS installed... unsure? Run the install and the terminal will spit out a note that lets you know if anything new was installed or if you already have all the updated packages installed.)
  • Install the library smbus to set up the I2C interface functions using sudo apt-get install python-smbus
  • Install the library serial using sudo apt-get install python-serial
2) Install the bmc2835 libraries
  • Go to http://www.raspberry-projects.com/pi/programming-in-c/io-pins/bcm2835-by-mike-mccauley (great directions here, but if you need more, keep reading)
  • In the terminal window on your RPi, type in wget http://www.airspayce.com/mikem/bcm2835/bcm2835-1.50.tar.gz 
    • (On McCauley's site you are prompted to replace XX in each step with the number version of the bcm2835 library that you want to download... it took me a long time searching around the web to figure out which version is the most current... as of this week, v50 was the newest I found)
  • Before moving forward, you'll want to make sure that the bcm2835 files are saved to your Pi's drive. Open the "downloads" folder on your Raspberry Pi and make sure that the folder, if it downloaded there, is moved out of "downloads" and into "home/pi"
  • Type tar zxvf bcm2835-1.50.tar.gz into the terminal to unzip the files
  • Now, change to the directory that we'll be installing by typing cd bcm2835-1.XX in the terminal (50 instead of the XX since that's the version we downloaded above)
  • On the next line type in ./configure and hit enter
  • Type make on the terminal line
  • Then sudo make check
  • Then sudo make install
3) Install the WiringPi libraries

  • Go to https://projects.drogon.net/raspberry-pi/wiringpi/download-and-install/ and follow the directions for downloading and installing using the terminal
    • (Step 2 prompts you to update your RPi, but we did that above so you do not need to do it again)

4) Configure the interfaces
  • Enable interfaces by going to Menu --> Preferences --> Raspberry Pi Configuration (enable SPI, I2C, Serial)
  • Update the configuration file by typing sudo nano /etc/modules in the terminal 
    • Make sure the following two lines are typed in the configuration file:
      • i2c-bcm2708
        i2c-dev
4) Restart Raspberry Pi to make sure all updates are enabled

5) Download demo codes for the relay board

  • Go to http://www.waveshare.com/wiki/RPi_Relay_Board and scroll to the very bottom of the page
  • Click on "demo code" then click on the RPi_Relay_Board.tar.gz link at the top of the page to download the demo files
  • Go to "downloads" folder on your RPi and open the demo codes folder. Double click on the Python file to open it and run the code to test the relay board.


Waveshare documentation for the relay board--
http://www.waveshare.com/wiki/RPi_Relay_Board
http://www.waveshare.com/wiki/Libraries_Installation_for_RPi