Showing posts with label IoT. Show all posts
Showing posts with label IoT. Show all posts

Thursday, July 28, 2022

Jacdac and Micro:Bit 2.0–First Look

Learning about Jacdac devices was my incentive to buy a Micro:Bit 2.0 The Micro:Bit 2.0 has a number of upgrades and new features from the original. These include a microphone and a speaker among others. That is probably justification enough to get an upgrade but being curious about the Jacdac devices, which requires the newer model, was the deciding factor. I am really enjoying spending time with external devices and the Jacdac devices are really easy to use.

I purchased the Micro:Bit from AdaFruit (micro:bit v2 Go Bundle - Batteries and USB Cable Included) Actually I bought two  because, well, why not? I bought the Kittenbot Jacdac Kit for micro:bit V2 from KittenBot My hope is that more manufacturers and suppliers will be offering Jacdac over time.

The kit comes with:

  • Jacdac Adapter – connects with Micro:Bit
  • Slider
  • Rotary Button
  • RGB Ring
  • 2 Keycap buttons
  • Magnetic Sensor
  • Light Sensor
  • Hub – for connecting even more devices
  • 5 cables of different lengths

Each part is labeled and has a QR code that will take you to documentation for that device. I took full advantage of that. One thing I learned the hard way but would have learned if I read the documentation is that the adapter has a switch that determines if the Micro:Bit powers the Jacdac devices or if the Jacdac (and some external power supply TBD) powers the Micro:Bit. Things worked much better with the switch in the right direction.

Once I got everything out and read some documentation I had to try something out. I started with the RGB Ring and the Rotary Button.  I started with individual example programs and then created my own. I had the rotor determine which LEDs were lit. Going backwards (negative numbers) had some issues of course. I might leave solving that to students if I were doing this in class.

I recommend starting at MakeCode Integration before you get to far on your own. It will step you though adding the Jacdac extensions to MakeCode, connecting to your Micro:Bit, and  other helpful information.

BTW, from MakeCode you can program using blocks (very easy) as well as either JavaScript or Python. You can move back and forth between languages as well. A lot of potential for learners there.

Next up I will be trying to think of some larger projects as well as experimenting with other sensors and gadgets.  I may even cut some boxes with my laser engraver for some projects. Making boxes with 3D printers is also an obvious thing to do.

Tuesday, July 05, 2022

Teaching Computer Science–Moving atoms not pixels

On my first visit to the Lifelong Kindergarten Group and the MIT Media Lab, I notices a message on the windows. “Some people would rather move atoms than pixels.” That has stuck with my for years now. And it is quite true. Robots, game controllers, Internet of Things, and more are ways that computer science interacts with physical objects and not just pixels on a screen. These are ways that teachers can bring more students to more interesting (to the student) to get involved with computer science. But where to start?

Recently I posted curriculum resources that are especially good for teaching traditional computing courses. Well, cyber security is a bit new but anyway. Read that post at Welcome New Computer Science Teachers Today I want to provide some resources to bringing physical computing into the classroom.

Starting with a couple of devices that operate as “brains” for deeper involvement.

Raspberry Pi and the Micro:Bit are two of the most popular. Arduino and the Lego ev3 have been around for longer and are in wide use as well. One could get lost exploring all that LEGO Education has to offer. The Arduino Online Shop has a lot of resources as well.

Personally, I am a fan of both the Raspberry Pi and the Micro:Bit. Both the Micro:bit Educational Foundation and the Raspberry Pi Foundation have a lot of resources. Those are great places to start your exploration.

Ok, let’s talk hardware. While the sites for the Pi, Micro:Bit, Arduino, and Lego EV3 have a lot of links to resources there are more places to go depending on your interests.

Two of my favorites are AdaFruit Industries and Kitronik Ltd. They have devices that work with a lot of "brains." They have devices for all sorts of robotics or Internet of Things projects. I can spend hours looking through both getting idees for projects.

Also for the Internet of Things, I have bought a bunch of devices from Phidgets Education. I have been using these sensors and controls with Raspberry Pi in Python but Scratch, MakeCode, and Java are among other language choices. Speaking of MakeCode, that is an awesome platform for programming Micro:Bits.

I recently discovered Jacdac from Microsoft Research. Right now these devices only work with Micro:Bit but Raspberry Pi and a USB connection for laptops/desktops are projected for the future.

I could, and probably should do a post just about robots and robotics. But here are a few places to get started.

I promise a more comprehensive post of robotics soon.

Friday, December 31, 2021

Looking Back on Computer Science Education in 2021

I’ve never felt less prepared to write a look back on CS education than I do today. I’ve been retired from most of the year and the world has been changed a bit because of COVID. I have noticed some things have clearly happened. One is the increase in online development tools which I talked about a year ago. The other is an apparent growth in cyber security education.

I’ve also noticed some increase in virtual reality programming courses as well. How that will go is anyone’s guess. There are two barriers. One is that VR hardware is still expensive. It’s not just devices like the Oculus but also computers capable enough to support VR and its development. A lack of training is also a barrier. Most teachers seem to be learning on their own with help from documentation and videos from companies. That and some support through social media from other teachers.

The Unity Teach Community has well over 2,000 members and is very active. I highly recommend it if you are looking to get involved in teaching VR.

Online teaching and programming tools have really taken off. The code.org courses support this sort of thing but they are far from the only option. CodeHS for example shows up a lot in social media discussions. As does Coding Rooms. And repl.it. I should probably collect a list of them for a future post. Perhaps you could add your favorites as comments and help me out?

Cyber security has also seen a lot of growth. Cyber.org has a lot of materials and provide cyber security professional development. Social media support for teachers coming from teachers has also been growing. I recommend the Cybersecurity Educators Facebook group. Over 1,000 members and active and growing. This field is going to boom as security gets more attention all the time.

Every year I expect  the Internet of Things to take off but it never really does. The pandemic has made doing any sort of physical computing more difficult. But I keep hoping.

Machine learning and artificial intelligence didn’t seem to pick up a great deal but it is growing. AI 4 K12 has a lot of useful resources from teachers and I recommend checking them out. Most of what I see in K-12 AI is units in existing courses and not specific full courses. That’s probably best at the K-12 level. The math and coding involved in creating AI from scratch is intense. Learning how to use existing tools is both useful and age appropriate.

So progress has been made and that’s a good thing. 2022 should be interesting. Hopefully, in a good way.

Monday, August 02, 2021

IoT, Python, and Raspberry Pi–Oh My

Trying learn too many things can be a risky proposition. But sometimes it feels like the way to go. Regular readers of this blog know that I have been trying to learn Python and that I have been experimenting with the Internet of Things with Phidget devices. Mixing the two is a pretty obvious step but since I really want to set up some autonomous systems without tying down my laptop, it seems like the Raspberry Pis I have accumulated would be the way to go. So mixing a new programming language (Python), with a new development domain (IoT) with a new operating system (the Raspberry Pi OS is built on Linux) seemed like something I should give a try.

Fortunately for me, the Raspberry Pi OS installation comes with the Thonny, Python IDE for beginners and the Phidgets software has downloads and installation instructions for the Pi and Thonny. I had a little trouble getting the Phidgets library to install at first but the Thonny IDE had the ability to get the library and install it for me which was a big help.

Thonny feels like a very nice IDE for beginners BTW. I am surprised I hadn’t already known about it. It installs in Windows, Mac OS, and Linux. And it is free which is also nice. Visual Studio Code also installs on Raspberry Pi so if you are using that on other platforms it could be an easy move on the Pi.

My experiment involved using the Phidget Plant Kit because water and electronics go so well together. Seriously though I like the idea of having a computer controlled watering system for plants. That’s something I have wanted to do for a while. Plus it is something that lends itself to cross curricula work in schools.

Initially I plugged in a monitor, mouse, and keyboard. Not a bad desktop if a little slower than I am used to but fine for what I am needing. Next step was connecting over the network with VNC (Virtual Network Computing). This is the step I need for setting the Pi up without tying up my monitor, keyboard, and mouse.

Well, I have some more experimenting to do. More posts when I have some projects fully completed.  I’d love to hear what other people are doing with Raspberry Pi and IoT as well as where you like to go for connectable hardware.

Monday, June 28, 2021

Phun with Phidgets

Recently I requested a free (for educators) starter kit from Phidgets. Phidgets are small controllers and sensors that are easy to use and with a helpful API. The starter kit includes a bunch of things to introduce the platform.

The Getting Started Kit provides an introduction to students and teachers. We offer a self-guided, online curriculum with challenges and projects for students.

• Programming languages: Python, Java, C#, Swift
• Device compatibility: Windows, macOS, Linux, iOS, Android
• What's in the box: VINT Hub, Push Buttons (2), LEDs (2), Humidity Phidget and all required cables
• Suitable for school grades: 9 – 12

I spent some time with the starter kit today. What I was looking for was pieces that were easy to assemble and sample code that was reliable and easy to use. That’s what I found.

The first thing I did was assemble a sort of control box with two push buttons and two LEDs. I plugged the controller in to my laptop with a USB cable and fired up Visual Studio.  There are samples and tutorials in Python, Java, Swift, and C#. The systems work with Windows, Mac OCS, and Raspberry Pi. Projects are available in a wide variety of IDES including Processing, Eclipse, NetBeans, and Visual Studio among others. That;s a lot of options. IT looks like more languages are supported less directly.

So anyway, I followed the starter tutorials to get a feel for both the type of tutorials supported and to get a feel for using the Phidgets themselves. They were very easy to follow with a lot of code you can copy and paste to get started. In a classroom I would spend some additional time explaining the code in more detail. Students could use this on their own but would really benefit from the sort of deeper explanation a teacher can provide. I do like that there are suggestions of next steps without sample code for the student. That should encourage students to experiment a bit. Solutions are available to educators on request though.

Besides the buttons and lights I ran though the sample code for the temperature and humidity device as well. Equally easy to use. I was gifted a couple of other devices – a Power Plug Phidget and a Distance Phidget. I have some Raspberry Pis around here somewhere so my plan is to try these Phidget devices with one of them. That will give me a chance to learn something about the Pi devices as well. I can see a lot of potential for interesting projects combining Raspberry Pi and Phidget devices.

These feel like the sort of devices I have been looking for to do a variety of hardware and software mixes. In other words, physical computing. There are classroom sets available that while not cheap are in range for a lot of schools. You can’t give hardware away for free and these devices are high quality and well worth the prices. IMHO.

Note that I got the kit and devices for free but without any expectations of quid quo pro. I really like this stuff.

Monday, October 12, 2020

Thinking About the Algorithms in Our Lives

My wife and I use these fitness trackers, ours are made by Garmin, to keep track of our activity during the day. Each day the devices give us a goal for how many steps we should take that day.  The goal goes up or down depending on how many steps we did on the previous day. I think. Maybe.

Being the computer guy that I am I keep thinking about how the algorithm actually works. Is it a simple algorithm based on some sort of average or does it have some amount of smarts? Does it take several days activity into account or just the previous days? Like so many things in our lives the algorithm is completely opaque to users.

Google Page Rank, the algorithms that run on the computers controlling our cars, and the software John Deere uses to control the equipment they make. (see article linked below for way this opacity is a problem for some) are all secret. Why?

Well, various companies have various reasons for keeping their algorithms secret. Competitive advantage is the reason for some. For many it is to keep people from “gaming the system.” Google, and other search engines, don’t want people to find ways to get unfairly high placement in searches. I suspect some of that is involved in my Garmin’s secrecy. For others, it is about keeping control of the how the systems them make are run – often for the sake of safety. That’s why many companies don’t want their software “messed with.”

How good or bad this is for the consumer is quite up for debate. There are solid arguments on both side. Arguably, the right thing depends on the situation in many (perhaps most) cases. These are issues we need to think about going forward. People who write software and create algorithms have a responsibility to make the right decisions about secrecy or openness. The decisions have to be about more than just money as well.

Do you discuss these issues with students? I think we need to do so.

Farmers Fight John Deere Over Who Gets to Fix an $800,000 Tractor

Thursday, October 01, 2020

MicroBlocks For IoT and other Physical Computing

Well, there is a new tool in town for programming micro devices like the Micro:bit and the AdaFruit Circuit Playground Express and many more! It's called MicroBlocks and was created by a rock star team with experience with creation of such tools as Scratch and Snap!. It’s pretty exciting for a number of reasons. One of them is the wide variety of devices it works with. Another is the Natural Languages it supports.

Live Coding is another interesting feature.

MicroBlocks is a live environment. Click on a block and it runs immediately, right on the board. Try out commands. See and graph sensor values in real time. No more waiting for code to compile and download.

And Multi Tasking.

Want to display an animation while controlling a motor? No problem! MicroBlocks lets you write separate scripts for each task and run them at the same time. Your code is simpler to write and easier to understand

I played with it a bit and it looks pretty intuitive especially for those with previous block programming experience. I made the mistake of trying it without having a device to use with it handy. I have several at home and so I’ll be trying them next week. But I wanted to get the word out so that if people want to try it over the weekend (yeah, I know you don’t have as much free time as you want) or have some students try it out you could.

Sometime next week I want to do a side by side comparison with MakeCode which supports several of the same devices. Some obvious differences are that MicroBlocks supports running the exact same app on different types of devices and that MakeCode has emulators. Since most people only use one type at a time and have physical devices the impact of those differences will be different in different environments.

We are living in exciting times!