a1tD000000885elIAA

Course: Programming with CoDrone Lite
10-Resources for Teachers

  • 4-7 grade
  • Beginner

Lesson Description:

Here you will find all the essential resources for programming with the CoDrone Lite. As you work through the lessons, this is where you can access reference materials that you can use, such as the functions guide, troubleshooting and FAQ, and our support page.

image description

Lesson Modules


Teaching Tips:


Sometimes your CoDrone won't act the way you want it to.


1. Maybe it's drifting to the side or crashing into the ceiling every time. In these cases you will probably need to calibrate your CoDrone.

If at any point you need to calibrate your CoDrone, watch this video and follow the steps carefully. Also make sure that you are in a flat, spacious, and well-lit area as the CoDrone may not calibrate correctly otherwise.

The technical explanation for this issue is:

  • Your CoDrone has two sensors that it uses with the gyro and accelerometer to figure out if it is drifting.
  • One is the optical flow camera that measures the movement of patterns on the floor. If the room is not well-lit, the CoDrone will not be able to distinguish the patterns on the floor and will see only black.

The other is a distance/range finder which measures the distance to the floor. If something is below the CoDrone, it will adjust its height so it can maintain its constant distance.

Also, make sure to check that all the motors, propellers, shells, and guards are attached tightly, and there aren't any hairs caught in the propellers.


2. Is your CoDrone disconnecting after running one program?

We've identified an odd issue with the request block. When you select BATTERY_PERCENTAGE from the dropdown menu and run the block, an infinite loop occurs where the board will continue to request the battery percentage. If you're seeing that the board continues flashing multi-color even after you've stopped the block or even removed it, that means the bug is occurring.

What sometimes happens is that the request keeps happening in the background, so as soon as you run another command, it will end up overloading the board (because too many requests are happening) and shutting it off. Of course, this means your CoDrone will get disconnected if the board shuts off.

The best way to resolve this is to just restart Snap and not run the request block if this issue is happening. This bug is currently being fixed, where the request only runs once and won't run in the background.

I will let you all know when the new version is out!



Do you still have some questions or problems? Contact us at support@robotLAB.com and we will answer you as soon as possible!


Teaching Tips:


Before you start, you will need to program your drone to fly! You'll be using Snap! for Robolink, which is a block-based programming language. This module will walk you through installing the Chrome app on your machine. The Chrome app is still in beta testing, so many features may not be working as expected. If you're having any trouble, please contact us via the forum or e-mail.

Download the Chrome app

Depending on what machine you're using, the download process is different.

If you have a ChromebookCHROMEBOOK DOWNLOAD

In the Chrome Web Store, click the "+ Add to Chrome" button to add the Chrome app to your Chromebook. You can skip the next steps and continue to the next tutorial.

OR

If you have Windows or MacWINDOWS AND MAC OS DOWNLOAD

For Windows and macOS, you’ll need to download a .zip file above and unzip it to get the .crx file. Once you have the .crx file, install it to your Chrome browser by continuing to Step 2.


(Windows\macOS) Install the Chrome app file

NOTE: Google is slowly phasing out Chrome apps for Windows and macOS, so we need to do some workarounds to get the Chrome app installed on your Chrome browser.

Unzip the file to access the .crx file contained within. Then navigate to "chrome://extensions" in the address bar in your Chrome browser. Drag-and-drop the .crx file that you just downloaded into the browser until you see "Drop to Install" box. Drop the .crx file into the box.

NOTE (again!): You may need to turn on the "Developer Mode" switch in the top right, then refresh the page. Otherwise you won't see the "Drop to Install" message when you drag-and-drop the .crx file.


Launch the Chrome app

Navigate to "chrome://apps" in your Chrome browser by typing the address into the address bar, and voila! You'll see the Snap! for CoDrone icon added to your Chrome apps. You can go ahead and click the icon to launch the Chrome app. This will walk you through connecting and updating your CoDrone.

We recommend that all first-time users update their CoDrone to the latest firmware, which will help with some flight stability issues that older versions had.




Observations: please keep your app updated to avoid bugs in your programs, and improve your experience with CoDrone Lite. 



Teaching Tips:


If you want your CoDrone to fly, it needs to be connected to Snap!. This lesson will walk you through how to do that.

Connect to computer

To connect your CoDrone to Snap!, you need to open Snap!. Next, connect your Bluetooth board to your computer by plugging one end of a USB cable into your board and the other end into your computer.




















Put it into connect mode

Press the reset button on the Bluetooth board to set the board to connect mode. After this happens, the LED light should start blinking red.


Connect

Go to the CoDrone tab on the lefthand side of Snap!. Then click “Connect to nearest drone" so you can connect to the CoDrone with the strongest signal.

However, If you have previously connected to your CoDrone and it was the last CoDrone you connected to, then you can use “Connect to the connected drone”. This will connect you to the last connected drone.


Select port

Snap! will then ask you to select a port, so choose the correct one- (which is usually the last port on the list). It might take a minute to pull the available ports up, so be patient. Don't pick COM1 because it won't work!



Connecting

Snap! will connect to the board and try to find a CoDrone to connect to. Make sure your CoDrone is on (battery is in) and trying to pair (blinking green light on the back). Once Snap! finds a CoDrone, it will ask if you want to connect to it. If the CoDrone that "has been discovered" is the one you want, click “OK”.

If your CoDrone is the only one in the room, the first CoDrone it finds is the correct one. If there are several in the room, you will need to figure out which one is yours by connecting to it and seeing which one it connects to. The connected CoDrone will have a solid green LED on the back.







Teaching Tips:


Your CoDrone needs a program to fly! In this lesson, you'll learn how to create programs in Snap!.

Connecting blocks

To make a program in Snap!, find the menu that you want on the left hand side. While using the CoDrone Lite, you will constantly use the following options: Motion, CoDrone, Control, Operators and Variables. Next, search for the block that you want, click and hold it, and then drag it to your coding workspace in the middle.

The blocks fit together like puzzle pieces so if you want to add more, you can drag and drop them into place. Blocks can be added at the bottom of another block, but if you need to rearrange blocks, or add more at the top or middle of a series of blocks, you can do that too!

Image result for rokitbrick codrone

You can create different flight events, moving your drone in different directions, and use the LEDs from the CoDrone. You can also create conditionals, loops, variables in order to make more and more complex programs with your CoDrone. 


Do you still have some questions or problems? Contact us at support@robotLAB.com and we will answer you as soon as possible!