Counting Reps with the Adafruit Circuit Playground!
Apr 2, 2020 00:43 · 2295 words · 11 minute read
Hey everyone! Big news- you may have noticed I have over one million followers now. That means…you got it- my YouTube Play button. They wouldn’t give me one at one hundred thousand, and it looked like they were going to refuse the one million button also, but thanks to a lot of community support they finally agreed to send me not only the one million follower button, but also my one hundred thousand. Those are going right up on the wall. There are too many people who have helped for me to thank them all, but thanks to Serpentza, Makers Muse, Becky Stern, Julie Sage and Joel Telling for supporting me, featuring me and talking about me on their channels. Hacksmith for teaching me how to actually earn a living at this- giving me encouragement but more than that giving me advice with hard numbers so I knew what to charge sponsors. Thanks to Creality and JLCPCB for not just being great sponsors, but being the kind of sponsors who I can genuinely believe in.
01:22 - But most of all thanks to Limor Fried and Phillip Torrone at Adafruit. Absolutely 100% I would not be here without them. They encouraged and supported me from the beginning, spoke up for me, sent parts and work when I needed it to keep the channel going. Almost everything I know about electronics I learned from Adafruit tutorials, many of my own projects are based on projects from the Adafruit site. It’s impossible to overstate just how much Limor and Phillip have done for me.
01:58 - And there’s the problem, it’s just overwhelming. Every time I sit down to shoot a video with an Adafruit product I get absolutely paralyzed trying to make it good enough. I did one video for them, a while ago, and it was the most disliked video they had every posted on their YouTube channel. It’s pretty hard to get past the pressure when it’s someone who’s opinion you value so highly and you’ve already failed so badly once. They sent me a whole box of stuff for free almost two years ago, this is the fifth time I’m trying shoot a video with some of it.
02:42 - But I’m going to keep it simple and hopefully do right by Fried Laoshi this time. One of the areas Adafruit focuses on, is technical education. And that’s something I get asked about a lot. STEM education products are a huge industry, every parent is worried their kid is going to fall behind, and parents they keep asking me how they can get their kid interested in STEM. Unfortunately very few take the time to wonder “if I’m not interested enough to learn how to use these products, why would my kid be?”.
03:18 - So first things first, if you can’t learn to use a STEM education product, or don’t intend to use it with your child, or think it will teach them without the aid of you or a teacher- you’re in for a bad time. You don’t buy your kid a violin and a book and expect them to become a musician without lessons, or expect them to suddenly be passionate about the violin. Sure, the tech industry is full of people who were passionate about tech as kids and were self-motivated learners. Every field has people like that. But you can’t expect all people to be that way. Imagine you tried to recruit for medical school only with people who were passionate about medicine as children and always wanted a career in that field- they would probably be amazing doctors and nurses but there would never be enough of them. Likewise with technology.
04:19 - Children do as they see, before they do as they’re told. They mimic the people around them. If you want your kids involved in STEM activities, the best way is for you to be involved. Sit down with your child and do it together, or at the very least have them do it in a classroom. As a rule, if you as an adult can’t use the product, then they probably can’t use it either. If you or a teacher won’t do it with them, they probably won’t be any more interested than you are.
04:52 - As I’ve mentioned previously, I think the first, second and third most important thing to buy for technical education- at any age, is a used laptop. I recommend the ThinkPad x220. It will take you an hour to learn to install Linux, and you’ll never be without a reliable,m cheap computer again. You can learn to code, learn infosec, hardware development, network engineering anything else you can think of, all with free, Open Cource software. A used laptop with Linux is by far the highest ROI learning tool out there and the variety of tutorials available is huge. You already have a fancy new Mac or Windows machine? Great, still get an old clunky ThinkPad with Linux and learn it anyway.
05:43 - No, dual-boot really isn’t the same but if you insist it’s better than nothing. A second laptop is handy since you can watch videos and tutorials on one and follow along on the other even if you’re disconnected from the network. You can check out my video on installing Linux on a used laptop in the description box. But what comes after a used laptop with Linux? Single Board Computers like the Raspberry Pi are a popular option, you’ll already have a good working knowledge of Linux from your used laptop and an SBC let’s you control lights and buzzers and things like that. This is enormously powerful but the components you’ll need aren’t really standardized for education, and while there are a ton of tutorials out there the quality varies and you can spend hours following bad instructions step by step and getting nowhere, which can be quite frustrating.
06:46 - It’s absolutely something worth doing eventually, but in my opinion probably just a little down the line. So if not an SBC next then what? My recommendation is the Adafruit Circuit Playground. No, this isn’t sponsored or anything, and it’s not because of the high esteem I hold Limor and Adafruit in. Here’s why I like the Circuit Playground so much: In my opinion, Adafruit has the absolute best curriculum of any STEM education company by far. The Microbit is also very good hardware, but on its own it’s much more limited than the Circuit Playground and the tutorials are no where near as good.
07:28 - My own educational board that I developed, the Sinobit, is specific to Asian educational requirements it’s 12x12 display allows for Chinese characters, but is not all that useful in countries that use the Latin alphabet. The Circuit Playground has the right combination of components built right in to be engaging on its own without additional parts needed until you move onto very advanced projects. The second reason I like it is that it supports and teaches Micro Python. In tool terms Python is like a hacksaw, drill press and a good set of files. It will never be a milling machine, but given enough time you can make darn near anything.
08:19 - Python is simple, and can also do almost anything- just often not very efficiently. But a little Python goes a long way. I would consider the Circuit Playground a purely educational tool I probably wouldn’t use it for prototyping, but the code you learn to run on it, can be used on lots of other things. I recommend just working your way through the different projects and tutorials, then you’ll have an idea of what board would be suitable for an actual project. So right now I’m going to plug it in, and run you though a simple tutorial. This video is made possible by the generous support of JLCPCB, China’s Largest PCB manufacturer.
09:06 - With JLC you can have your PCB manufacturered in under 24 hours all while you track the process in real time. Prototype boards start at just $2 in any color. Check the description box for more info. One of the best ways to support me is to support the companies that fund this channel. Okay, so if this is your first time coding here’s how it works. First time you just use someone else code. Second time you make a small change.
09:33 - To be honest lots of people just keep doing that- you don’t really have to write anything from scratch until you are doing something very tricky. Still, eventually you need to be able to write your own. The best way to learn how to do that is with my friend Anne Barela’s book, “Getting Started with Adafruit Circuit Playground Express”. You might see the book offered online with a different first name for the author don’t worry about it, that’s the right Barela, one of the best teachers I know. But for now, we’re going to start with a fun project from Jacklyn over at the SciJoy YouTube channel.
10:14 - Check out their link in the description box, they’ve got a lot of great videos. Jacklyn made a really cool project to count her punches when she exercises. I’ve already done a build that involves punches- my HIC15 sensor project. So I’m going to use her code for something else. This is a stone lock, a traditional Chinese exercise tool. It’s a little bit like a kettlebell but there’s a lot more throwing and catching. It’s a pretty well balanced form of exercise. You need strength, endurance, speed, timing and hand-eye coordination. So it’s been a favorite of martial arts practitioners for thousands of years. These days you’ll see aunties and uncles in the park throwing around unbelievable weights.
11:11 - You can’t do that unless you have been training for years- decades even. So if I want to be a strong auntie one day, I have to start with the very light weights now. The stone version is beautiful, but I don’t want to risk dropping it on my head or foot until I get much better. So I have this modern version covered with dense foam. While it is a traditional tool, and I’ll be training with in the traditional Chinese way, that does not mean I can’t add a little tech to it.
11:46 - What I’m going to do is use the Circuit Playgrounds built in accelerometer to help me count reps, so I don’t lose track. Let me show you how. So we are in the hackster.io page. This is the Counting Punches Project page with Circuit Playground Express. Let’s scroll down, things used in this project and there is a link of the Makecode. Let’s open it because we are going to use Makecode to do this. It’s kind of like Scratch, you can use their block code, you can add more if you want to do different things.
12:48 - So this is the code that Jacklyn put in and we are going to download it and load it on our circuit playground express. What you are going to do is to press reset button twice until all the light lights up. That’s when you are going to see the, when it happens, the CPLAYBOOT is here and we are going to download it, download the code. And I am going to save it. I copied it and then you just paste it to the folder. Now let’s take a look. So I already loaded the code, right? I think for every set, if you shake it one time the purple light will stay lit, every time you shake it, it counts.
14:03 - And when you finish one set, the red light will light up. One, two, three, four, okay, the second set is done. One, two, three, four, the third one is done, right? You can see there are three LED lights. One, two, three, four and at the end it will make a sound that means you completed a whole session. I just keep shaking it. You can’t just shake it randomly I guess, you have to really actually throw an accurate one.
14:38 - One, two, three, four, Okay so now is one, two, three, four, five, five LED red lights light up, that means I’ve completed five times. Six, One, two, three, four. Two more then I will finish the first section. And then the music will go off. You hear the sound? That means I finished it. And then just reset. So that’s pretty much it. Easy and simple now let’s go upstairs, go to my balcony and let’s try it. Wait, first I have to put it in my 3D printed enclosure then we will try it. Alright, now let’s test it upstairs.
16:24 - Because it is during the day so it’s probably a little bit difficult to see the LED lights up in the sun. But let’s give it a try. One set is done. Okay, almost done. So once I complete the set, it will set off the sound, beep beep beep beep beep I don’t know if you can hear it and then the LED light goes back to zero and if I do a couple more swings, the LED completes one set turns to red and if I want to restart just hit restart button. It goes off again and then we can restart. But now I need to catch my breath and take a break. There we go, fast and simple. Please subscribe, I’ll see you all next time and remember if I can do it, anyone can do it! .