A While loop is a part of software that allows a single piece of code to repeat until some condition is met. The condition is put into the argument of the While loop.
While loops are useful because if they did not exist the only option would be to copy code over and over again hundreds or thousands of times. And there would be few ways to change the number of copies that there are easily if the code needs to adjust.
Below is the standard graphical definition of a while loop.
Since the LittleBot Budget is a based on arduino it use a while loop as defined in the C programming language (which is what all arduino boards use). To learn even more about arduino while loops you can visit this page.
The syntax for a while loop is shown below
The "condition" must be a Yes/ No or True/False question. These are called Boolean formulas. If the Condition is TRUE then the loop will run again. If the condition is False then the code in the loop is skipped and the rest of the program runs. A While loop can be described as an IF statments that just repeats until its condition is true.
For example 1<2 in the "condition" would always be TRUE so the loop will run forever, this is called an infinite loop, a loop that never stops. These are bad.
It is better to use a variable that can change in the condition. So that when the variable changes to somthing that is not true then the loop will stop. Generally this is used to have the loop run only a certain number of times.
Let's create an example for the LittleBot using Loops to show this. We will make the LittleBot Turn right then turn left and repeat 5 times. The Full Code is shown below
First create the variables for the While Condition. The Count is the most important. The numberOfTimes is what is considered good coding style rather than simply putting 5 into the while argument
Now you can create the while loop. So if we want the loop to only repeat 5 times. Then we have to create a condition.
The most common type of condition is a count the slowly adds numbers to itself until is makes the condition untrue. In this case each time the loop runs count will add 1. (students can experiment with this by changing that number added to see how it affects the number of times the loop runs). Once the count becomes greater than 5 the loop will stop and the rest of the code in the program will run.
Running the code should result in the robot turning right and then turn left 5 times, then pausing for 10 seconds. Students can change the motions inside of the loop and import actions from thier "One Step at a Time" code.
More advanced students can create more while loops. And maybe even try nesting loops, but that is a more advanced topic. A simple set of experiments is for them to try different conditions and different iteration amounts.
Projects from This
The LittleBot Budget is made with an ultrasonic sensor for eyes. These "eyes" send out pings of sound waves that humans can't hear that bounce off of object and come back to the robot. Based on the time of the waves to leave the eyes and return the robot can measure its distance from an object and students can program a reaction for the robot to have.
Here we will walk through how to activate and read distance from the ultrasonic sensor on the Littlebot Budget robotics kit.
How to Activate the Ultrasonic Sensor on the LittleBot Budget
In order to activate and read the ultrasonic sensor on the LittleBot Budget all you have to do is use the ultraSensor() function that is provided in the LittleBot Budget code.
The ultraSensor function needs only two inputs the trigger pin of the sensor and the echo or reciever pin. On the LittleBot Budget both of these are already defined and ready to use so all you have to do is enter the function:
Calling that function will return the distance the sensor reads in CM, which can then in put into a variable by setting the function equal to a variable.
A simple example is attached below.
In this code sample, all students have to do is upload the code to the LittleBots Budget or add in the ultraSensor function on their own with any other code they want.
When the code is uploaded students can open the serial monitor (seen on the right below) in the Arduino Software to read the distance that the sensor is reading. (This distance is in Centimeters)
Projects for the Students with the Arduino Ultrasonic Sensor
Buddy, our new Arduino Robotics kit, has had a strong start on Kickstarter. We are nearly 75% funded and still going strong.
Buddy will be our 9th robotics kit to be launched on Kickstarter. And It looks like it will be the 9th to be fully funded also.
We are very proud of our latest robotics kit and hope that it will lead to even bigger and better devices in the future with increasing capability. We hope that you will consider supporting us. The Buddy will be on Kickstarter through to the middle week of October 2019. After that it will not be available until about december.
There are a lot of Robot Kits and Toys out there. But they all are basically RC cars or just have a few pre-recorded motions that get old. We wanted to make a robot that really seemed alive and spontaneous. And we did it.
LittleBot Buddy is the 9th robot that we have made at LittleBots. We have been working to make robotics and STEM exciting and fun. And it hasn't changed with Buddy. Except now anyone can enjoy this robot. Whether you are a builder or not. You can just "hang out" with Buddy.
When we started looking for what our next robot would be, we wanted to start moving closer to home. We wanted a make a robot that wouldn't just be for the classroom or workbench. We wanted a bot that we would enjoy just having around all day at our desk. A robot anyone can enjoy. As we worked on it we knew that we had to make a bot that you could fall in love with. It couldn't be an arm, or a little rover that would run out of battery. It would have to be a guy that you could interact with naturally and was always ready. We also knew that he couldn't be a robot, he had to be Alive. Alive, that was hard. We had to create a robot that would be spontaneous. that you could interact with and feel like he was listening to you and talking back.
How Buddy Works
This was hard. The software is what makes Buddy come alive. It defines how he moves and responds. It is pretty cool.
The standard software that Buddy Comes with allows him to interact with you. He will see you and react. And he will be curious about his surroundings. He does this by constantly updating a map of his surroundings. So he will notice when you place an object near him. He will inspect it and figure out how big it is.
Expanding on this, you can surprise and play with Buddy by placing and removing objects inside his space. Depending on how he is feeling that day we can be surprised, angry, or excited when he discovers the changes.
Buddy generates all of his actions spontaneously. They are not prerecorded or predefined. He literally decided every single motion on the fly. And it is based on how he "feels" at any given time.
How Buddy Sees
Buddy sees by updating certain waypoint in his area, And then inspecting items that pop up as he looks around. His eyes are not camera. They are a simple proximity sensor. But he uses to build a simple 3D map of the area around him.
When he sees something in the worldview change. He will react to it. It is a simple system that we had to use some clever pieces of psychology to make it appear alive and more complex.
Apps, Arduino and Blockly
There is no app for this version of Buddy (though there might be one in our stretch goals). When he is built or pulled out of the Box he is ready to go. Just plug him in and then have fun.
But Buddy is a STEM kit. He is meant to teach robotics and engineering and the psychology and interaction that comes with those in a way that is fun. What is better than building a robot that actually seems alive.
Buddy can be reprogrammed. We will be posting code samples in Arduino and he is compatible with graphical systems like makeblock and Scratch. We want it to be easy to work with this little guy in and out of the classroom.
Cute. That is how we wanted him to be described. Cute. We wanted you to say "Awwww" when you see him. He's like a potted plant that happens to be alive on your desk.
There are few bells and whistles. The entire kit has fewer than 15 screws. Less than 25 parts total.
This helps him stand up to the rigors of the classroom STEM groups. He can be picked up by his neck (not recommended) and likely not damaged. Buddy is really an exercise in minimalism. This makes him very robust.
Top Quality parts
There is nothing "cheap" about this kit. Every decision was made to make a top quality product.
The main board of Buddy is manufactured inside of the US and is a system that we have used in the last 8 of our robotics kits. It is solid and battle tested.
The motors through Buddy, are top quality metal-geared servos used in performance RC aircraft. They are not typical off the shelf items. They are precision devices that can stand the test of time and the abuse they might suffer at the hands of kids.
Buddy is fully 3D printing. We made this choice because is allows Kids to do more than just program the robot. Seeing that he is 3D printed invited them to print accessories or redesign him and then print those parts at school or a library. 3D Printing opens the doors for more engineering thinking, which is the whole point of our kits..
We hope that you like Buddy and all we have done to make is a top quality STEM learning kit. If you would like to be one of the first to recieve Buddy you can support our kickstarter. Orders are slated to go out by Christmas
We have created a new arduino kit. His name is Buddy. He is a DIY social robot to serve as a replacement for jibo, cozmo, or any of the other bots that are no longer available. Fully 3D printed and supported he adds much more to our series of arduino STEM robotics kits.
Buddy will be coming to Kickstarter in September.
Buddy is able to look around and map his surroundings and react to changes within them. He can be surprised and he will always have a unique reaction to changes.
The kit can be built very easily in less than an hour. It is even robust enough to take the abuse that kids can give it in a classroom. Or he can sit safely on a desk.
Buddy is an arduino social robot that is meant to get kids excited about the possibilities of robotics and technology, not just how they consume it. He is a robot kit that doesn't just teaches the physics of robotics but also the psychology and interactions of it. He will be a great addition to any STEM classroom or nerd collection.
We have a new kit available for preorders with deliveries starting at the end of September. Meet Walker.
Walker is an arduino Biped Robot Kit. He is design to walk on two legs and can be reprogrammed or modifed with 3D Printed parts.
We have been working on a walking arduino robot for some time. But we finally went ahead and did it. Based on the Otto DIY project, Walker is cut from similar cloth. But as always we have designed him specifically as a STEM robot kit.
The Arduino Board in his head is the same board used in all of our other Robotics Kits. This makes him easy to assemble and easy to program. The entire kit only has 4 screws.
All of the parts of the Walker Biped are 3D printed. So they can be modified and reprinted with a school 3D printer. Giving students the chance to program AND build.
The full kits will start shipping at the end of September 2019. This will be our 9th kit to be released. All the rest are used in Schools throughout the world. And we are very excited to be adding this one to it.
In today's world technology is progressing faster than the blink of an eye. Our technology is used make our lives, our jobs, everything faster, cheaper, and more efficient. And when it comes to learning technology there is no age limit. Kids can be learning it and certainly adults should be learning it. And it can't get much easier.
When you were a child didn't weren't you a fan of robots? Something that thinks and moves that you built? Those actually exist. There are a number arduino kits and general robot kits that you can build, program and modify. So if you are a fan of robots its never too late to build your own. And here are the "Top10 Arduino Robot For Adults" that we think you will enjoy the most. And yes, a couple of our kits are on the list. Because we do a good job.
Makeblock Ultimate Robot Kit - $349
The is the fully stocked MackeBlock Kit. Hence the name ultimate. This robot kit has everything that you need to make 10 robots from the single kit. If you are not good at soldering that is alright. This kit doesn't need any soldering. It also comes with bluetooth and an smart device app so you can control your creations with your phone.
If you are a beginner tutorials are available to get started.
The LittleArm Big is a 3D Printed robotics kit. With 6 joints and controlled by the arduino it is both fun to build and to program. You can use the accompanying apps to teach it motions to repeat over and over. Or you can use any arduino tool to program reactions and add sensors.
The LittleArm big is really a good surrogate for real life robots. With many similar capabilities this kit is really just a scaled down version of the Giant robot arms you see in Tesla Car Factories. Practicing on this robot could get you ready for working with the big boys someday. Or just have fun putting sugar in your coffee.
The Bioloid STEM Kit is a robot kit with 7 example robots. But what really sets this STEM kit apart from other educational kits is the fantastic curriculum guide. These guides are far from a simple assembly manual - the 2 workbooks represent 21 weeks of comprehensive educational training. The STEM kit breaks each chapter into three phases: the Basic Phase, the Application Phase, and the Practical Phase.
While this kit is targets at classrooms, adults can have a lot of fun building the kits also.
The Crawling Quadruped Robot Kit for arduino included everything you need to a build a walking quadruped robot and control it via wireless remote control.
The four legs of this mobile robot each have 3 joints driven by servos. You may use sample sketches to control and upgrade the robot. This a small-type arduino project and can be put together relatively quickly. And then you can easily add more code or 3D print covers for the robot as you go along.
Alophabot2 Arduino Robot - $83
A very condensed arduino robot this kit has everything you need already on the robot. While there is not a lot to built the Alphabot offers a whole lot to program. With many many sensors to choose from and nice compact setup the Alphabot is a great kit for more advanced users to get cheaper into robotics. It is certainly an advanced robot kit, which makes it great for adults.
The Littlebot Budget is a kit that is the simplest of all. Meant for beginners who just want to start learning arduino this kit is the basics. The kit starts with a main arduino board and a basic distance sensor for his eyes. Then he drives around bouncing off the walls or you can control him with a simple Android app. From there you can add on line following sensors and all all sorts of 3D printed accessories. He really is an expandable robot. and with a lot of tutorials on Youtube you can find help for all of those sensors.
There are not many arduino robot kits available. Especially ones that can roll around and easily be reprogrammed. But here are a few kits that are easy and fun to build and can take a student from novice all the way to expert.
The Mbot STEM Robot Kit is a simple programming robotics toy. The kit can be assembled in about an hour and then programmed with the mBot graphical coding tools. The Mbot is also expandable using new sensors. But the kit is a bit difficult to change physically. Mounting new components can be difficult with the steel frame.
mBot costs 39-95 dollars.
The LittleBot Budget is a simple Arduino programming robot kit. It can be 3D printed from scratch or built from a kit. Once it is assembled the kit can be programmed with Arduino or Scratch Tools.
As the students' skills grow the LittleBot Budget can have accessories added that can add new skills and programming challenges for kids to try. The arduino kit is also supported with a number of tutorials for assembly as well as the various expansions for the kit.
The LittleBot Budget costs 35-79 dollars
The Zumo 32U4 Robot Kit is a highly integrated, user-programmable and customizable tracked robot. It is a metal framed robot and can be programmed with the Arduino Environment with little difficulty.
The robot is small and packed with power. Designed to be used in robot sumo competitions this little arduino robot can pack a punch.
The Cost of the Zumoe is $140
So many arduino robot kits have hundreds of screws, that get lost in a classroom, and no resources at all when it comes to tutorials for building the kit or programming it. When they do they are just a large bill for the school. The Littlebot Budget is an arduino robot kit that was made to be easy. Easy to build, easy to program, easy to pay for.
The LittleBot Budget is a basic arduino robot kit. It is designed to have the minimum needed to teach kids the basics of robotics. An arduino brain, some basic eyes, and a means of locomotion. From that basis kids can learn basic programming skills, and even go up into more advanced projects
While the bare minimum LittleBot Budget is an arduino board with eyes and wheels, more can be added. The kit has been designed to to take on new attachments and sensors. And we are working hard to put together the tutorials and resources needed to make it easy to add those expansions.
Currently we have a number of Arduino Code Samples we are building out the circuit diagrams and will be posting videos of these demos as time passes.
If you would like to learn more you can visit the LittleBot Budget Main Page.
The LittleArm 2C is a 3D Printed Arduino Robotics Kit. We have just released a new video tutoriorial about how to build the robot arm. Check it out below.
LittleArm 2C Arduino Robot Arm Full Kit
The best Arduino robot arm on the market. Fully 3D printed and with only 31 parts total in the entire kit it is ideal for a beginner roboticist or lower-level STEM classes. More details here.
This is a DIY kit which requires basic assembly skills and basic understanding of how to use the Arduino IDE.
LittleArm 2C Arduino Robot 3D Printing Kit
Only a few left!
3D Print your own parts. This kit contains all servos, fasteners, and electronics you need to put together a LittleArm 2C with your own 3D printed parts. More details here.
LittleArm 2C Assembled Arduino Robot Arm
This version of the LittleArm 2C arduino robot arm kit is fully assembled. Just take it out of the box and either use the demo apps in windows or Android (Help resources here) or immediately start programming it from scratch using the the provided Arduino Sketches as resources.