Small Basic 1.2 Released with Kinect Support and Bug Fixes
Michael Scherotter is a Media Experience Evangelist at Microsoft who works with media companies to help them build apps, works with 3D printer manufacturers to help them write drivers, and is part of the Small Basic development team who brought Kinect objects to Small Basic 1.2.
We are excited to announce that a new version of Small Basic is now available with some cool new Kinect objects, language improvements, and bug fixes. If you don’t know, Small Basic is Microsoft’s free BASIC programming environment for kids and is part of a family of easy-to-use free coding tools for kids that includes Kodu Game Lab and Touch Develop.
Kinect for Windows
If you are running Windows 8, Windows 8.1, or Windows 10, and have a Kinect 2 Sensor or Kinect for Xbox One Sensor attached to your PC, you will see three new objects available to you in Small Basic: KinectWindow, KinectBodyList and KinectFaceList. You can use these objects separately, with each other, or with any of the other Small Basic objects. Think of them as three new objects to program with that enable your body to become an input device for Small Basic. Each of the new objects are fully documented with code samples in the Intellisense window that you can copy/paste to the code window:
KinectWindow Object
KinectWindow is like GraphicsWindow or TextWindow in that it represents a window on the screen. It’s main use is to let you see what the visual sensors in the Kinect are detecting.
KinectWindow.Show(“Color”) |
KinectWindow.Show(“Depth”) |
KinectWindow.Show(“BodyIndex”) | |
KinectWindow.Show(“Body”) | KinectWindow.Show("Color") KinectWindow.IsBodySensor = "True" |
In addition to visualizing what the sensors “see”, the KinectWindow object also has the ability to remove the background and place people in front of other images in real time.
KinectWindow.IsBackgroundVisible = "False"
KinectWindow.BackgroundImage = "c:\temp\bridge.jpg"
KinectWindow.Show("Color")
There are even functions to capture an image from the Kinect window (KinectWindow.CaptureImage() ) and a cropped image KinectWindow.CaptureCroppedImage() .
KinectBodyList Object
Use the KinectBodyList to track the position and orientation of the bodies of up to 6 people (not dogs, I’ve tried). You can track the position of “joints” throughout the bodies being tracked, from the hands, to ankles, to heads. You get the position in 3D space using KinectBodyList.GetJointOrientation() and in 2D space on the screen using KinectBodyList.GetJointScreenPosition(). In addition to the joint positions, you can hand open/closed state with KinectBodyList.GetHandState() and the lean of the body using KinectBodyList.GetLean().
KinectFaceList Object
Use the KinectFaceList to track the orientation, expression, and position of up to 6 human faces. You use KinectFaceList.GetFaceProperty() to get aspects of faces like Happy, Engaged, WearingGlasses, LeftEyeClosed, RightEyeClosed, MouthOpen, MouthMoved, or LookingAway. Using the KinectFaceList.GetBoundingBoxInColorSpace() in conjunction with KinectWindow.CaptureCroppedImage(), you can detect where faces are in the scene and grab their images to use in your Small Basic program.
Give It a Try!
We are sure that you will think of something cool to do with Kinect and Small Basic as we’ve tried to make it as easy as possible to start programming with a Kinect sensor. If you have used the Kinect sensor already, you will probably realize that only a portion of its capabilities are exposed today in Small Basic 1.2. You can do even more with the Kinect for Windows SDK 2.0, like define visual gestures and use the microphones built into the Kinect sensor. We would love your input if you have any suggestions for enhancing the new Kinect objects or any other part of Small Basic.
KinectWindow.Show("Color")
TextWindow.WriteLine("What does a coder look like?")
TextWindow.Pause()
width = KinectWindow.SensorSize["Width"] / 4
height = KinectWindow.SensorSize["Height"] / 4
image = KinectWindow.CaptureImage(width, height)
GraphicsWindow.DrawImage(image, 0, 0)
Download Small Basic 1.2 today!
If you want to be a hero and start teaching Small Basic to kids, you can find tutorials, curriculum, community, and samples here.
Comments
Anonymous
October 01, 2015
I tried it....the installation went smoothly and Small Basic itself worked OK and I could see the new Dictionary options etc, but extensions didn't work. The kinect object wasn't available, which looks to be implemented via an extension, nor could I see my own extension or LitDev's extension, both of which were built against 1.1. I rebuilt my extension against the 1.2 SmallBasic DLL and then it showed up and worked OK. So it looks as if extensions will need to be recompiled, contradicting the info on the download page. This also means the included kinect extension will need recompiling. And what's all this 'smallbasic is for kids' propaganda :) I love smallbasic and am a long way past being a kid.Anonymous
October 01, 2015
Forgot to mention...I tried it on two different machines. One running Windows 7 Enterprise and the other Win10 Home. Both of which had functioning SmallBasic 1.1 installs prior, with the LitDev extension running fine. Have rolled back the Win10 device to 1.1 and the litdev extension is working fine again.Anonymous
October 01, 2015
OzJerry, you are right. Extensions should be rebuild for SB 1.2.Anonymous
October 01, 2015
Thought so as that is the way it's always been with smallbasic. However the download page states the following: Extensions built on 1.1 will work fine on 1.2. So that will need to be changed and it looks like the Kinect extension that is distributed with it will need to be recompiled.Anonymous
October 02, 2015
OzJerry, "Extensions build on 1.1 will work fine on 1.2." means that extensions depend on .NET framework I guess. But I confirmed that Litdev Extension 1.1 doesn't work with SB 1.2... So I can't understand what's happen.Anonymous
October 02, 2015
teaching with small basic at the moment, havent shown the students this working, just testing principle, will the extensions be re-compiled anytime soon?Anonymous
October 02, 2015
@OzJerry, @Nonki: when we compile an extension (which is a .Net dll) we reference the SmallBasic.dll. But a reference is a name AND a version (and more but it's out of our subject). The LitDev extension was compiled with the SmallBasic.dll 1.1, now the SmallBasic.dll is the 1.2 so when the LitDev extension is loaded the "SmallBasic.DLL 1.1" is not found and then the loading fail. @JPatrick we need to wait the extension owner recompile there DLL. Just be patient :)Anonymous
October 02, 2015
@Yan Grenier, i think it may be that i am running windows 7 64bit? have been able to get KINECT SDK 1.8 installed and sample viewer runs succesfully, do you thnk that it might be the windows 7 that is preventing SB 1.2 from not showing Kinect functions, in fact SB1.1 with extension also doesnt show kinect functions... oh well JAnonymous
October 02, 2015
@JPatrick, normally the OS have no impact in this context, if your SDK runs. I think it's more a problem between the SDK and the Small basic extension. But as I don't have a Kinect, I don't know the requirements and the behavior of the SDK and the extension. Perhaps @Nonki have more ideas because he test it.Anonymous
October 03, 2015
Here are some technical details about the requirements of the new Kinect objects in Small Basic 1.2: The Small Basic 1.2 Kinect objects use the Kinect 2/Xbox One sensor, not the original Kinect sensor. The Kinect 2/Xbox One sensor uses USB 3 to communicate with the PC. USB 3 was introduced in the Windows 8 timeframe so system that were built originally for Windows 7 or earlier cannot communicate with it unless they have a USB 3 port (USB with a blue interior).Anonymous
October 03, 2015
Thank you all. Looks like we'll need to update the details to show that extensions need to be recompiled. Thanks for helping us iron it out.Anonymous
October 03, 2015
JPatrick, can you join our special network for teachers? Learn more here: blogs.msdn.com/.../small-basic-teachers-and-educators-join-our-network.aspx Thanks!Anonymous
October 05, 2015
OzJerry: "And what's all this 'smallbasic is for kids' propaganda :) I love smallbasic and am a long way past being a kid." Ha! Good call. We usually say "for kids and adults" or "for age 8 to 108" or something like that. The goal being that anybody can use it learn language-based programming as easily as possible!Anonymous
October 05, 2015
It seems to me that as of October 6 2015 the downloads page (as accessed by the Download button) makes no mention of Small Basic 1.2. Is this possible?Anonymous
October 05, 2015
Please note that the EV3 extension that allows Small Basic to control or program the Lego Mindstorms EV3 robot has been updated for compatibility with Small Basic v1.2. See EV3Basic.com for details.Anonymous
October 09, 2015
Nigel, fantastic!Anonymous
October 10, 2015
Thanks Nigel. Nonki fixed that for us!Anonymous
October 10, 2015
Got the 1.2 release notes done: social.technet.microsoft.com/.../32436.microsoft-small-basic-1-2-release-notes.aspxAnonymous
October 22, 2015
Gosh! That Kinect function will defiantly out date the stuff I wrote for tracking movement! It would make auto turret Down-right simple!Anonymous
October 22, 2015
Zock, that would be pretty cool!Anonymous
November 30, 2015
The comment has been removedAnonymous
December 08, 2015
Zock, that's a good idea. I'll add it to the list. Thanks!Anonymous
January 09, 2016
DOESN'T look like this is available anymore.Anonymous
January 09, 2016
sorry I think I found itAnonymous
January 09, 2016
thank you. ill be sure to help others if I ever get to learn it.Anonymous
January 10, 2016
Jacinta, glad you found it! What was the issue? Anything we can do to make it easier? The Download page: social.technet.microsoft.com/.../30513.download-microsoft-small-basic.aspxAnonymous
October 29, 2016
Nonki released two new Kinect samples here: https://blogs.msdn.microsoft.com/smallbasic/2016/10/10/small-basic-kinect-sensing/#comment-65165Anonymous
December 21, 2016
The comment has been removed- Anonymous
December 30, 2016
Hello Jessica, how about using Clock.ElapsedMillisecond to measure exact time like below.ems = Clock.ElapsedMillisecondssec = Math.Floor(ems / 1000)ms = ems - sec * 1000- Anonymous
January 12, 2017
Hi Nonki! Thank you for the reply, but I ment the time where I capture the data. If I use another object to get the time, I will be using the time where I called the object clock, and not the time where the joints were actually captured.- Anonymous
January 14, 2017
Jessica, Kinect operations don't return the time information. I think we can get approximate time by using Clock.ElapsedMillisecond at Kinect events. My sample program is shown inhttps://blogs.msdn.microsoft.com/smallbasic/2017/01/09/small-basic-kinect-motion-recorder/
- Anonymous
- Anonymous
- Anonymous