Learning with OpenSCAD

I’m currently teaching a class to pilot AP Computer Science Principles (will be AP for the first time in the 2016-17 school year). At the beginning of the second semester I decided to deviate from my planned curriculum and drop in a little 3D printing. I had students play with OpenSCAD. OpenSCAD is used to create 3D models with programming rather than more traditional means.
 OpenSCAD is really cool for a number of reasons. If students have any experience with writing code they can dive right in. They quickly realize there are many different ways to create the same part, just as there are always multiple ways to get any program to do what you want it to. Most of these ways will involve thinking in 3-dimensional coordinates while also thinking about positive and negative space. Depending on the chosen approach students may also need to bring in a variety of mathematical knowledge and skills they’ve developed over the years.

The task I gave my students was to develop a stand/holder for their own cell phones. It took them a bit to settle into this idea. I kept getting questions like, “Do I need to plan for a case?” To which I’d reply, “I don’t know, does you phone have a case?” I really wanted them to plan for a holder for their own phone.

In the future I’ll need to put some limits on their designs. Most designs were much bigger than they needed to be, many would easily hold an iPad. Maybe I’ll put a limit on the mass of plastic they could consume. I also need to make sure their design will fit the printer. I had one that would not.

After printing their stands they all realized there were problems with their designs, things that were not obvious before they tried using the physical objects. This was a great lesson and gave us a chance to talk about rapid prototyping and iteration. Each student shared their first designs with the class so everyone could learn from each other’s mistakes. The designs were then updated to fix the problems. In the redesign I also had students add in variables for phone size. This would then allow the program to be used to make a holder for any phone by simply changing the values of the variables for phone height, width, and thickness.

Overall I really liked this assignment. Students got to use their programming knowledge in a new way with a new language. I personally delivered no instruction in OpenSCAD. Students had to rely on the principles of computer science they’d already learned, tutorials found on the net, and each other, just as they would in the real world. The task was simple enough that I knew this would not be a problem. I will be doing this again as a planned part of the curriculum next year, but I’ll add in design constraints related to size and total cost of materials.

Arduino RC Car Part 2

Tony DiLaura asked me about tutorials for high school students to build Arduino controlled RC cars. I didn’t really know of any that I liked so I started outlining what one might look like. This is part two, you might want to check out part one first. This post will be about control mechanisms.

In my last post I said my students had never made remote controlled cars. It turns out this was not at all correct. I’m getting too old and the memory begins to fade. It’s a good thing the internet never forgets. In this post I’ll share some that my students have made in the past. In the next post I’ll dive into ones I’ve seen on the net but haven’t tried yet.

Wiichuck

WiiChuck carOK, this one isn’t radio controlled, but wired instead. It uses the Wii Nunchuck to control your circuit. I suppose if you have a wireless nunchuck you could also make this wireless. If you have to buy a nunchuck this might not be the cheapest option, but I bet one of your students has one at home in a closet somewhere. You can chop the end of the Wiimote plug or you can buy a cheap adapter

  • SparkFun $1.56 – Cheapest and I’ve used this one in the past
  • Adafruit $3.00 – Might be a better option. Looks like it’s designed to snap in and stay in a bit better.
  • WiiChuck Page – All about using a WiiChuck with Arduino including a library download
  • Lego – Lego Electronic GizmO – Lego robot controlled by Arduino and Wiichuck created by my students several years ago. Includes some sample code. Uses the joystick because the accelerometer was a bit too twitchy for them. That could have been solved with programming.

TV Remote

zwally-IR RobotWe’ve also had luck controlling Arduino robots with old TV or VCR remotes. Be aware that some work far better for this than others. The only way to know is to experiment. This is really in the same price range as the Wiichuck solution and makes your car wireless as long as you have line of sight. In theory, you could also create your own remote using a second Arduino and IR LED, but I’ve never done this.

Keyfob

rf receiverI’ve also had students use a keyfob transmitter and receiver. This uses RF and is probably the simplest from a programming standpoint. If your students can program an Arduino to respond to a button press then they know everything they need to to make this work. I don’t have any links to the modules my students used. I can’t remember where I bought them from. Which is probably just as well, they worked, but were not great. However, I did find virtually the same thing on Adafruit’s website. I trust Adafruit to have good stuff.

 

Tutorial for an Arduino RC Car?

A buddy of mine recently sent me a tweet:

RC Arduino Tweet

This is an interesting question the short answer I have is, “No.” The longer answer is a bit more nuanced, so I asked for a little clarification. This is what I got back:

RC Arduino 2

Now I had a lot more to go on. With this in mind I have something to sink my teeth into. Now we have something, so now my response is, “No, I haven’t seen anything that would fit.”

OK, now that that’s out of the way lets cover how I would tackle this problem. Tony is an awesome math teacher in Zeeland, Michigan. He co-teaches a project based math/physics class. I’m going to work from the assumption that he’s working with students starting with little previous knowledge of electronics and Arduino programming, and that he’d like to leave as much room as possible for students to explore. Everything I cover will be with that in mind.

With a project like this you need break it up into pieces. I’m going to think of this as a robot even though it won’t be autonomous because we still will have a computer controlling an independently moving device. As with any robot type project you have three fundamental challenges, the programming, the electronics, and the mechanics. However, with this project we’ll need to consider a forth part I don’t usually think about with a robot, and that is the control mechanism.

Mechanics

You could go crazy with this and start with a platform like Tuggy from the very cool OpenRC Project. While totally awesome I think this takes all of the thinking away from the students and simply turns them into mechanics. Which is fine if that’s your goal. Instead I’d start with ThinkFun’s MakerStudio collection of building sets.

macaroni box car

You can buy sets or download and print from the Thingiverse. I’d start by having students play with the gears and such and make simple cars with parts available, then begin thinking about what their RC car needs. They’ll need to make a variety of decisions. How will their cars be steered? Will they use skid steering (like a tank) or rack and pinion (like a car)? What sort of  platform will they need? I’m not sure a Mac & Cheese box is the best choice. How many motors will they need? Will they use gearbox motors or simple DC motors and then use the gears in the set? Some of these decisions might be made by the teacher and some or all might be left out the students. I’d probably go with simple DC motors and use the gears from the set.

Once these decisions have been made students can then think about the parts in the MakerStudio kits they don’t have but need. Things like motor mounts, rack and pinion mechanisms, bits to mount the gears to the platform of choice, and such. These could should all be designed and 3D printed by the students.

Electronics

Tony asked for Arduino, so we’ll stick with that. It also doesn’t hurt that I know a lot about using Arduinos with high school students. Unfortunately, you can’t run any sort of reasonable motor directly from an Arduino. You need some sort of transistor or h-bridge. Digital outputs on your Arduino only put out 40 mA, this is woefully inadequate to power a motor.


Students can wire an h-bridge themselves, but I highly recommend using a motor shield. I’ve had many students use an h-bridge and breadboard their circuit which mostly works. There are a lot of connections that need to be made and by the time students got to soldering stuff together numerous problems would typically crop up. In order to get around a lot of headaches I now have students use motor shields and skip all the complex wiring. You can buy shields from China really cheaply, but I like to use SparkFun Electronics. SparkFun is based out of Colorado and they offer an educator discount of 20% and allow you to easily set up payment accounts allowing you to pay via purchase order. The other thing I really like about SparkFun is that they include code example and/or tutorials for almost everything they sell. So I can hand a shield to a student and then point them to the product page and step back.

Most motor shields will allow you to control two motors, perfect for skid steering. If your students chose to go with rack and pinion then you can get away with one drive motor, but you’ll need a servo-motor for steering. There are lots of tutorials for controlling servos with Arduino and ideally where ever you get your motor shield will tell you how to wire your motors to it and give you a simple program to control your motor(s).

Other Stuff

At this point we just have programming and control mechanism left. I have some ideas about control mechanisms, but I haven’t done any of these in the past. When I say “I” that really means my students. So, I’m going to do a little more research and then another post. More than likely I’ll be looking at some sort of the cool BlueTooth module and an app running on a cellphone or tablet. There are other ways, but controlling a robot with your phone is just too cool.

Working with Cub Scouts

Last night the Divine Child High School Robotics club gave a short presentation to Cub Scout troop 1127. The presentation covered their participation in the Square One Autonomous Innovative Vehicle Design Challenge. Last year was our first year and it was so much fun we decided to do it again. The competition involves transforming a power wheels jeep into an autonomous car. The club members also showed off our new Polar3D printer.

After the presentation the club led the scouts through building bristle-bots. We’ve done this with middle school students in the past and we’re happy it was just as big a hit with younger students.

Apparently I’m a Total Nerd

So today I’m geeking out a bit. The school’s 3D printers are in another room on the other side of the building from my office. If you’ve ever used a desktop 3D printer then you know they have a tendency to fail. This can be a problem when you are not near the printer. A while ago I figured out that I could use a cheap webcam and stream the operation of our printers live to YouTube. It’s not riveting video, but it lets me keep an eye on things. However, when things go wrong I still have to run down the hall to stop the printer.

Enter Chrome Remote Desktop. This lets you use Chrome to remotely access a computer that you are signed into. It’s pretty easy to set up and I can even access it from outside of the school building. If I use the same computer that is running the 3D printer I can cancel the print job remotely. This means I could start a long print job and still monitor it from home. If things go wrong I can stop the printer from making a pile of spaghetti.

Is Keynote the best app to create widgets for your iBooks?

The cool thing about eBooks created with iBooks Author is they can be interactive. However, most of the traditional publisher offerings are only slightly better than their print counterparts. By and large, they don’t do a good job capitalizing on the features offered in this relatively new medium.  Most teacher created textbooks, by contrast, do a much better job using interactivity and are therefore much more compelling.

This interactivity typically comes in the form of widgets. The widgets built into iBooks Author will only take you so far. Before long teachers are looking for ways to create their own widgets. I’m going to contend that Keynote is the best app you can get to create custom widgets for your iBooks. That said, I should also mention that I’m a big fan of Tumult Hype, but I believe Keynote is the best place for most teachers to start. There are lots of great general tutorials out there for learning the basics of Keynote, some created by me and some created by other very talented people. These will get you up and running in Keynote, but are not focused specifically on using Keynote with iBooks.
I’ve created a number of posts showing how to use Keynote to enhance your iBooks. So, in an effort to win you over to my way of thinking, here are a variety of ways you can use Keynote to enhance your students’ learning.
Creating Interaction:
  • Interactive Maps – Create maps like the ones showed off in E.O. Wilson’s Life on Earth books. The same technique could also be used in a variety of widgets where you want to highlight or contrast various parts of an image.
  • Math Practice Widget – Build something like Tara Maynard’s ultra cool math practice widget. This is set up to allow students to get the level of help they need while working on problems.
  • Interactive Videos – Have a dialog with your students through video, where your students’ answers to questions lead to different responses from you. Get your students think, not just watching.
Creating other Cool Stuff:
Keynote is not nearly as powerful nor versatile as Hype, iAd Producer, or straight HTML and JavaScript. It is, however, much more accessible. In most cases if you have a Mac it’s most likely already on your hard drive and you’ve probably already used it.

Downsize Your iBook using Keynote

I like to embed a lot of videos in my iBooks Author projects. These videos can often push the size of my iBooks up to an unacceptable size. One way I get around this is to create YouTube widgets in a program like Hype or using a web service like Bookry. However, this means students must have in internet connection to view the videos. Requiring the internet can sometimes be a problem which is why I like to try to include full videos when possible.

As it turns out, many of my videos are screencast tutorials. These often simply show a static screen with my mouse moving to and clicking a button to bring us to the next static screen. This can easily be reproduced with a series of screenshots put into Keynote. I use an Animate Action or Magic Move Transition to move a cursor from one location on the screen to another, or to highlight a a particular item.  Then all I need is a voice over.

Currently audio files will not autoplay on the iPad, but videos will. So in-order to add a voiceover I need to add in a video. Now this seems like it might be a bit counter productive as I was trying to not add a video in the first place. The video I make for this is tiny, consisting of only a solid background and recorded audio. I make these using Quicktime. Simply select “New Screen Recording” from the “File” menu and then drag a rectangle over a plain white portion of your screen when prompted. I discussed using a video for a voiceover in my video on Tara Maynard’s Interactive Math Practice Widget.

You can see some examples of my finished video replacements in an iBook on using Google Drive in education I made for my school last summer. The content is slightly outdated now, but you can still see how I used Keynote to replace screencasts. In this iBook I didn’t use a single video nor HTML5 widget.

I should note that videos playing in a Keynote widget will not have video controls, so there is no way to pause them nor replay them. With this in mind I’d recommend adding linked buttons to replay a slide as well as buttons to go forward or back as needed. The replay button was not something I added to the Keynotes in my book, but I will in the future.

I wouldn’t replace all of my screencast videos but I will be using Keynote more and more in the future to replace videos. One of the things I like about replacing videos with Keynote is you can easily have playback require student input to progress. This is important for two reasons. First is the student is more likely to pay attention if they have to click to continue and secondarily the passes can give time for reflection or note taking.

CK12 to iBooks Author

Finding the perfect textbook for your class really is an impossible task. Each one you look at is missing some critical component or if one does have everything, it uses an approach that you think won’t work with your students. Even if you somehow find the perfect book, it is typically the most expensive book you’ve looked at. In the end you end up selecting a book that is the best compromise of several competing factors. Not the best but instead, the least bad. The alternative is to not use a textbook or to create your own textbook.

With this in mind I encouraged the teachers of our freshman Integrated Science Class to create their own textbook for the first year of our 1:1 iPad deployment. This was a huge undertaking so I encouraged them to dive into ck-12 to assemble a series of books to use with their students. The books were saved as ePubs and distributed through iTunesU.

The ePubs, while very nice, have some limitations. The ck-12 materials often have videos and interactive elements scattered throughout. In order to use these, the students must leave their book and go onto the web. Not a big deal, but often once students leave their books many never make it back again. For next year we want to make the books more encapsulated, removing the need for students to leave the book to work with the interactive elements. Enter iBooks Author. The last update Apple gave iBooks Author the ability to import ePubs. Now we can take the work that was already done and repurpose it.

Workflow:

  1. Create flexbook on ck-12 and download as ePub (done already)
  2. Import into your iBooks Author template of choice. All of the content will come in as a single chapter.
  3. Create a new chapter for each of the chapters in your original ePub
  4. From your chapter with everything copy all of the content for a chapter and paste it into the chapter you created for it. Keep going until you’ve done this with all the chapters.
  5. Work on Formatting: All of your images are “inline” you might want to use the Inspector to change them to Floating or Anchored so you can put them where you want them to be.
  6. More Formatting: Edit the text/paragraph styles used by ck-12 to be something you want (totally optional)
  7. Create Widgets for interactive content.
  8. Export as iBook and distribute or publish
Point 7, “Create Widgets” is the hard part. iBooks Author doesn’t give you the ability to embed most web content directly. It does, however, give you the ability to add in HTML5 widgets. I typically build my HTML5 widgets in Tumult Hype. Totally awesome program. I haven’t looked at the newest update yet but I will probably buy it. They do offer an educational discount, making it much more affordable. A less nerdy, as well as free, way would be to use Bookry to make your widgets. Once we get some of the books converted I’ll post them here.
Below is my walkthrough of using Hype to embed a YouTube video in your iBook. You could use the same process for a lot of other web content as well.

Presentations for Mercy TechTalk

I’ll be giving to presentations today at Mercy Tech Talk. Here are the links from my presentations:

3D Printing in Education – 11:10 in N-17
Curious about 3D printing? We will walk through the basics of 3D printing and introduce simple programs for creating 3D models suitable for printing. No previous 3D modeling experience is needed. We will also look at some ways 3D printing can be worked into the curriculum and for fundraising.

Flipping with an iPad – 1:00 in Drama Studio
Have you thought about making videos to support your instruction? Maybe even a full flip? With an iPad you can create and distribute videos for your students. We will investigate several apps and accessories you can use to make compelling content for your students without the need for a computer.

Interactive Maps with Keynote and Gimp

When people are learning to make iBooks with iBooks Author they often want to have cool widgets for their students to interact with. As I’ve shown in previous posts, you can create some pretty easily with Keynote. I really like showing teachers how to use Keynote to do this because if they use a Mac they already have it. When you couple this with a free image editor, Gimp, you can do some really cool stuff.

The example here is not one I’ve used to teach my students, but one I used at last year’s iBookHack. From a teaching standpoint it might not be very good, I’m not really sure since I don’t teach social studies. It’s just an example of how you might create an interactive map to use with your students. The first video below walks you through using Gimp to create your maps. The second shows you how to use Keynote to bring them together as an interactive widget you can drop into an iBook.