Monday, November 28, 2016

Teaching Programming to Kids (Cont'd)

After much struggle to select a microcontroller and programming system for teaching programming to my 5th grade club, everything suddenly came together.

In a flash I remembered PICAXE, which are low cost BASIC-programmable microcontrollers.

Even better, since all the kids have Chromebooks, PICAXE can be programmed with a Chrome App using the Google Blockly graphical programming framework.

For example, an LED blinky program looks like this:


As pointed out by my SHARC pals during a lunch discussion, 5th graders aren't expert typers so this kind of graphical block system sidesteps a lot of frustration. And I feel this system is better suited for robotics than native Scratch is.

The PICAXE Blockly IDE has some neat features.


First, the IDE includes a simulator so kids can run their code safely before trying it on the robots.

Second, they can see the BASIC language program by clicking a tab so they can get an introduction to standard programming languages.


My sample PICAXE-14M2 is now successfully blinking an LED on pin B.5. Soon I'll be prototyping motor control using the Pololu DRV8835 driver breakout boards I bought during the Black Friday sale.

And, I'm almost done designing a baseboard, similar to my PIPduino, that uses a Pololu step-up/step-down regulator (S10V4F5) for power, also a Black Friday purchase.


Since the PICAXE programmer cables are too costly for our budget I'm going to find or make cheap FTDI breakout boards or else put an FTDI and USB connector onboard.

It feels good to have finalized the MCU and programming system for the kids' robots. I'll order the baseboards soon and hopefully I won't have screwed up anything so we can get started programming in 2-3 weeks.

Wednesday, November 23, 2016

Black Friday / Cyber Monday

Here's a list of sales you'll want to check out this Holiday:

Pololu Black Friday - already started! And an awesome sale with great deals once again. My order is placed :) Switching power supplies, robots (Zumo, 3pi, and the new Romi chassi); IR rangers from Sharp, Polou, and a time-of-flight breakout; wheels, motors, motor controllers, the cool A* ATmega32U4 controllers, and lots, lots more. Plus freebies and free(ish) shipping.

Sparkfun Black Friday / Cyber Monday - a wide range of items on sale this year. I'm eyeing the ESP8266 boards, MicroView, as well as the HackRF and RockBLOCK Iridium SatComm module. The FLiR Lepton board is on sale too.

BGMicro has a sale going right now, too. Take 10% off your ENTIRE order by using the code TTM at checkout through 11/23.


Parallax has a sale going too. Save $30 or more on:
Trossen robotics: 
We're taking 20% off RobotGeek and Interbotix products! Use coupon code "Friday16" at checkout.

Newark has tons of overstock stuff for sale


Tuesday, November 8, 2016

On Teaching 5th Grade Programming

I know that 5th graders can code. 

The kids last year did a great job programming their Lego Mindstorm NXT robots in LabView, although I witnessed some confusion about the graphical representations. Perhaps Scratch, specifically Scratch 4 Arduino (S4A), might be an option. MiniBloq would be another possibility.

Still, I feel it will be easier for kids to learn a syntactically simple text-based language, like Python, Lua, BASIC, or SPIN. Why not C-syntax languages? I have witnessed too much time wasted on syntax problems--semicolons and braces--which I think distracts from core learning.

It is a bit of a quandary for me. What do you think?

Microcontroller Board

Low cost is a key factor. We'll have 5-7 teams, so anything that costs $25 or less would be affordable.

With DIP microcontrollers, we could use breadboards (adding slightly to cost) but kids may spend more time troubleshooting loose wires than solving the problem so I'd prefer to build a baseboard.

I am a huge fan of 3-pin servo-style connectors for my robots which greatly simplifies wiring, but non-reversable connectors would be better.

There's always the Raspberry Pi Zero at only $5. The cost is right but the kids may have to learn some basic Linux and we'd need a baseboard with serial or bluetooth. And honestly a Pi is way overpowered for what I have in mind.

Python

Since learning Python, it feels like the BASIC of the new century. It's way more powerful, but simple to learn the basics, is wildly cross-platform portable, hugely popular, and much more. 

And of course I'm a big fan of MicroPython, which powers OpenMV Cam.

However, it is quite a challenge to find an suitable microcontroller board with a full MicroPython port that doesn't cost too much. PyBoard is over budget and requires a baseboard too. Teensy 3.5 and is powerful and low cost, but requires a baseboard and the port isn't done yet. 

Lua

Seems good for education and the interpreter is somewhat lightweight like MicroPython but, similarly, choices of microcontroller boards appear to be limited. And Lua is nowhere near as popular as Python so they might struggle more to find help after the club.

BASIC

This old language lends itself well to education. It's about as lightweight as interpreters come, so I should be able to get a BASIC implementation running on my PIPduino, which would be free for the club (thanks to glacially slow sales).

Coridium's $10 ARM-based BASIC Chip, which is an LPC1114, is designed for embedded use and even the cost of fabbing a baseboard wouldn't kill the budget.

But BASIC isn't standardized across platforms so I'm not sure they could readily apply what they've learned on their PCs like they could with Python or even Lua.

Monday, November 7, 2016

Teaching 5th Grade Electronics

I'm pleased to say that I'm shaping young minds into engineers, leading an after-school club called Technology - Robotics - Innovation at my daughter's elementary school.

Week 3 is coming up this Thursday.

Week 1 was introductory and included a fun bridge-building team exercise where we got to flex our teamwork and problem-solving muscles. 

Week 2 the kids had fun learned about electronics: voltage, current, LEDs and built their own LED circuit on breadboards. 

Great news: half the kids build non-working circuits. Exactly what I'd hoped for! See, I didn't tell them that LEDs conduct current in one direction so that they could learn through thinking and discovery. 

Students came up with great ideas on what might be wrong and some discovered that flipping the battery connections lit the LED (nice!). When I told them about LEDs and diodes, they fixed their circuits by flipping the LEDs.

We'll build on the LED circuit and their light-sensing soldering kit circuit to develop sensors for line following. After Thanksgiving, they'll build team robots. Then we'll start on programming!

I plan to publish the curriculum and materials as open source / creative commons for others to use and help us improve it.

This is a dream come true. I've been wanting to teach these things for several years now and I'm super excited to finally have that opportunity!