CoDrone Tutorials

CoDrone Tutorials

Getting Started


Basic Lessons


Intermediate Lessons


Missions


Documentation

Functions Guide

FAQ

Troubleshooting

Changelog

Facebook Q&A Group


CoDrone Lite FAQ

CoDrone Lite FAQ

Frequently Asked Questions

General Questions

The CoDrone is 133mm by 133mm, which is approximately 5.25 square inches.

CoDrone Lite uses the Snap! drag-and-drop block programming environment. Snap! was developed as an extended re-implementation of the popular project Scratch! and is specifically tailored for children and visual learning strategies.(https://snap.berkeley.edu/about.html).

Yes and yes.  The CoDrone is a completely module device and currently has a First Person View camera attachment and Drive Kit Wheel attachments.  More addons will be developed in the future.  

No.  The CoDrone was designed exclusively for indoor use.  The CoDrone is extremely light, and will be heavily affected by light breezes.  There are also visual sensors on the CoDrone that may not function properly in bright sunlight.


Teaching

Yes! The CoDrone was developed specifically as a teaching tool for encouraging students to program.  The east to use graphic interface of Snap! combined with easy to digest lessons and visual feedback make the CoDrone Lite a perfect introduction to programming and robotics.  

Very safe.  The CoDrone comes with easily replaceable and extremely durable propeller guards.  It also weighs less than 40 grams (including the guards), ensuring that the motors and propellers require a minimal amount of power to function and hurt much less when touched.  The CoDrone might sting a bit, but it is perfectly safe for use around children.  

As a programming teaching tool, the CoDrone is virtually limitless.  Beginners can learn the basics of variables, control statements, and automation.  Advanced users can learn feedback control and how to create their own blocks.  Even professionals can tap into the CoDrone’s internal functions and back-end scripts to develop new and exciting  features for the community. 

For large orders of CoDrones, please contact us directly at info@Robolink.com.  Please include the subject line “CoDrone Instructor’s Order” 


CoDrone FAQ

CoDrone FAQ

Frequently Asked Questions

General Questions

The CoDrone is 133mm by 133mm, which is approximately 5.25 square inches.

The CoDrone is programmable with the Arduino IDE which uses C/C++.  We also use a custom CoDrone coding library to simplify the coding for educational purposes. 

Yes and yes.  The CoDrone is a completely module device and currently has a First Person View camera attachment and Drive Kit Wheel attachments.  More addons will be developed in the future.  

No.  The CoDrone was designed exclusively for indoor use.  The CoDrone is extremely light, and will be heavily affected by light breezes.  There are also visual sensors on the CoDrone that may not function properly in bright sunlight.

The CoDrone can be remotely operated using the Petrone app on various tablets . However the Petrone app can not program the CoDrone Pro or Lite. The app is not Snap! or Arduino compatible.

The CoDrone can be updated using the Petrone app

  1. Go into the Petrone Application, pair with the CoDrone, then click on find “My Info”.
  2. Click on Check.
  3. Before hitting update make sure the CoDrone battery is fully charged as well as the mobile device. Then hit update, if for any reason it fails, just hit update again.Once done, exit the application and check the firmware version.

The CoDrone Pro can use Snap! you only need the bluetooth module, a micro USB cable and a CoDrone to use Snap!.

 FAQ document written by Arnold


Teaching

Yes! The CoDrone was developed specifically as a teaching tool for encouraging students to program.  The simplified CoDrone library along with the internal stability and durability of the CoDrone make it the ideal classroom instrument.

Very safe.  The CoDrone comes with easily replaceable and extremely durable propeller guards.  It also weighs less than 40 grams (including the guards), ensuring that the motors and propellers require a minimal amount of power to function and hurt much less when touched.  The CoDrone might sting a bit, but it is perfectly safe for use around children.  

As a programming teaching tool, the CoDrone is virtually limitless.  Beginners can learn the basics of variables, control statements, and automation.  Advanced users can learn feedback control and how to write their own programming libraries.  Even professionals can tap into the CoDrone’s internal functions to develop new and exciting  features for the community. 

For large orders of CoDrones, please contact us directly at info@Robolink.com.  Please include the subject line “CoDrone Instructor’s Order” 


BLE Guide

The CoDrone utilizes Bluetooth Low Energy communication.  This documentation offers information about existing and expected enumerations and functions.  Please note that not all of the functions in the documentation are currently implemented.  Also note that this documentation contains advanced material and will not be commented for users.

Download (PDF, Unknown)


SmartInventor Pin-Out Guide

The Smart Inventor board comes with an array of sensors and pins. A pin-out is provided here. Use this pin-out guide to write code involving the SmartInventor board’s sensors, or to attach any new sensors of your own.

Pinout


CoDrone Troubleshooting

A quick guide to common CoDrone problems

This guide will be routinely updated and expanded upon.  Please check out this document for more information on CoDrone. Community feedback is a crucial part of CoDrone development, so please voice any problems or solutions you might have on our Facebook page in the proper Support Format.

Motor Guide

Troubleshooting

1. Installation

2. Using the CoDrone

3. Using the Remote



Installation

Arduino IDE Troubleshooting 

https://www.arduino.cc/en/Guide/Troubleshooting

I can’t find the CoDrone library in my Library Manager 

Library Manager 3rd party support requires Arduino version 1.6.6 and higher.  Download the latest Arduino version (https://www.arduino.cc/en/Main/Software).

I can’t find the Rokit Boards in the Board Manager

Make sure you copied the .json url correctly into your preferences:

https://raw.githubusercontent.com/RobolinkInc/Robolink/master/package_rokit_index.json

Check your firewall/proxy settings or download the Smart Inventor board files manually.

Smart Inventor Board Files Manual Installation:

Download

https://www.robolink.com/wp-content/uploads/2016/07/Rokit_Manual.zip

And move the contents to your Sketchbook location in a folder called ‘hardware’.  You can find your sketchbook location by navigating to File > Preferences.  Your sketchbook location is located at the top.

For example, if your sketchbook location says: C:\Users\Justin\Desktop\Robolink

Then you need to create a new folder ‘hardware’ (some people may already have this folder) located at C:\Users\Justin\Desktop\Robolink\hardware.

Then place the Rokit folder into the ‘hardware’ folder:

C:\Users\Justin\Desktop\Robolink\hardware\Rokit

Error downloading http //downloads.arduino.cc/packages/package_index.json 

Your connection to the Arduino package index is being blocked. Check your firewall/proxy settings or download the Smart Inventor board files manually.

See Above

CRC doesn’t match. File is corrupted

Find and delete your \packages folder

(C:\Users\Your Name\AppData\Local\Arduino15\staging\packages)

or (C:\Users\Your Name\AppData\Roaming\Arduino15\staging\packages)   

or for mac (~\Library\Local\Arduino15\staging\packages)

And try to update the board files again.

Multiple compiling warning messages: ‘doesn’t define a ‘build.board’ preferences’  

These warnings do not effect the performance of your code or the success of the compiler.  These messages have been fixed by new board files since v1.01 .  Update your SmartInventor board files here.

Bootloader file specified but missing: ‘~\bootloaders\boot_SmartInventor.hex’ 

This warning does not effect the performance of your code or the success of the compiler.  This messages will be fixed by the next board files update.  This message can be ignored for now.

No Port options appear in my Tools > Port menu

You are either missing the Inventor USB Driver or not properly in Upload Mode.

To review installation instructions on how to install the USB driver, go here

To review how to get into upload mode, go here

My code isn’t compiling. Compiler Errors. 

Compiler errors can result from many different issues.  The most common of these is a problem with your code.  Be sure to look over your code and observe the error messages in Arduino’s debug console:

Error-console

The most common errors are:

Missing Semi Colons ‘;’ .  Semi colons should be at the end of ‘almost’ every line.  Some exceptions are function headers, control statement headers and #define.

Unmatched brackets ‘{ }’. Brackets must include ‘almost’ all of your code.  If you have a left bracket { , you need to make sure you also have a matching right bracket } for each one.

Missing Library Call.  If you have a lot of errors mentioning ‘CoDrone.h’ or ‘CoDrone.Something not found’, make sure you have #include <CoDrone.h> at the top of your code.  This allows the use of CoDrone libraries.

– Typos.  All code is Case Sensitive, which means capitalization matters.  Writing codrone is not the same as writing CoDrone.  Make sure you match the words exactly.

One error can cause multiple unrelated error messages.  If you are missing a semicolon near the beginning of your code, all the code under it will cause random errors.  Just make sure you fix all the mistakes in your code before looking into the error messages.  It’s also best to start at the very first error message, as this will usually be the most accurate one.

My code isn’t uploading 

If your code successfully compiles but won’t upload, there could be a few reasons:

Make sure your controller is in upload mode.  To review how to get into upload mode, go here

Try a different cable.  The upload cable is a standard USB to micro USB cable.

Remember to pick the right COM port.

Unplug and replug the USB cable and try again.

If your controller is having problems going into upload mode, refer to the Controller section of this troubleshooting page

“…/avrdude_bin: Read-only file system”  “…/avrdude_bin: Permission denied” 

You have insufficient permission to access your avrdude_bin file.  You will need to change the permission on the file by logging into your admin user account and change the file permission to 755 (chmod 755 avrdude_bin).  Support: https://github.com/arduino/Arduino/issues/4270

“…/EEPROMs.cpp:41: multiple definition of EEPROMClass::read(int)” 

An error with the EEPROM library occurs because two or more EEPROM libraries exist at once in your sketchbook.  This is probably happening because of our recent library update.  The fix is simple:

1. Open your sketchbook location

Open Arduino and navigate to File (Arduino for Macs) > Preferences > Sketchbook location is located at the top

You will need to open this folder in the normal folder browser

2. In your sketchbook, go to Libraries > CoDrone > Utilities.  You should see:
EEPROM.h
EEPROM.cpp
EEPROMs.h
EEPROMs.cpp

3.  Delete these two files:
EEPROM.h
EEPROM.cpp

Your code should now compile correctly.


Using the CoDrone

Setting Trim 

To review how to trim your CoDrone, go here

My CoDrone is always leaning towards one direction 

This could mean that your CoDrone needs to be trimmed.  To review how to trim your CoDrone, go here

You should also check your motors to see if there is any hair or debris slowing down the propellers.  Take off the propeller and inspect the shaft.

Make sure the propellers don’t have any chips or bends in them.

I replaced my propeller/propellers and now my CoDrone won’t fly

You may have installed the wrong propellers in the wrong direction.  Review how to replace your propellers here

My CoDrone won’t fly upwards and keeps bouncing along the ground

This could mean that your CoDrone needs to be trimmed.  You should add THROTTLE trim.  To review how to trim your CoDrone, go here

This could also be a result of a low battery.  Replace the battery with a fresh one and try again.

My CoDrone flies upward too quickly and gets stuck on the ceiling

This could mean that your CoDrone needs to be trimmed.  You should add negative THROTTLE trim.  Drones will always suction to the ceiling if they get too close.  To review how to trim your CoDrone, go here

One of my propellers seems to be spinning much slower than my other ones

This could be a trim problem or a motor issue.  You can test this by removing the motor and switching it with the motor diagonally opposite it (diagonally because adjacent motor’s propellers are oriented in different directions).  If the specified motor is still spinning slower, then it is a hardware issue and the motor should be cleaned or replaced.  To clean the motor, pull off the propeller and remove and hair or debris from around the shaft.

If the problem does not follow the motor but instead persists with the specific location of the CoDrone, the CoDrone should be trimmed. To review how to trim your CoDrone, go here

My CoDrone is using only the two front motors.  

The CoDrone is probably in Drive mode.  Include:

 CoDrone.DroneModeChange(Flight);

at the end of your setup code to revert the CoDrone to Flight mode.  You should only have to do this once

My CoDrone won’t pair.   

Remove and replace the battery and try again.  If the green light continues blinking and the CoDrone still cannot pair, check your controller code to ensure the AutoConnect command is being used properly.

One of my motors is weaker/won’t spin.

Remove the propeller and make sure there are no hairs or fibers obstructing the shaft.

If your motor is spinning sporadically or not spinning at all, try improving the connecting between the lead wires and the conducting surface on the CoDrone’s arms.  Take small pliers or tweezers and pull the lead wires upwards:

Before (Lead wires are laying flat)

zoom wires 2

 After (Lead wires are lifted)

zoom wires 1


Using the Remote

My CoDrone connects, but does not move or respond to the joystick controls 

Make sure your CoDrone is still connected to your controller (the light on the bluetooth should be green and the green light on the back of the CoDrone should be solid).

Some example codes do not contain joystick flight code.  Make sure your code has the proper controller input codes:

YAW = -1 * CoDrone.AnalogScaleChange(analogRead(A3)); // Set the A3 analog pin to control the Yaw
THROTTLE = CoDrone.AnalogScaleChange(analogRead(A4)); // Set the A4 analog pin to control the Throttle
ROLL = -1 * CoDrone.AnalogScaleChange(analogRead(A5)); // Set the A5 analog pin to control the Roll
PITCH = CoDrone.AnalogScaleChange(analogRead(A6)); // Set the A6 analog pin to control the Pitch
CoDrone.Control(SEND_INTERVAL); // Send the new flight commands at the SEND_INTERVAL (50ms)

Make sure your CoDrone controller is properly wired .

Upload this code to test your Joystick inputs:

Keep your controller plugged in and open your Serial monitor (ctrl + shift + M). Set the baud rate to 9600 (bottom right corner) and set the controller to normal mode (dipswitches down). The serial monitor should now be showing your controller’s analog joystick inputs and their corresponding control outputs.

My Joystick inputs are reversed or incorrect 

Make sure your CoDrone controller is properly wired.  If you are using a custom setup and would like to reverse or switch some of your joystick inputs, find this section of code and manipulate it:

To reverse an input, use a -1 * in front of that direction.  As you can see, the default setup has YAW and ROLL inputs reversed.  To switch which port is connected to which control, swap the A3, A4, A5 and A6 values until you are content.  A3 refers to the wires that are connected to the top PORTA pins, and A4, A5, and A6 are the next pins counting downward.

My controller IR sensor don’t work/aren’t triggering 

Make sure your code is correctly written to read the sensors.  Try adjusting the sensitivity of the sensors.  Learn more about sensitivity here.

To test your sensors, upload this sketch:

Keep your controller plugged in and open your Serial monitor (ctrl + shift + M).  Set the baud rate to 9600 (bottom right corner) and set the controller to normal mode (dipswitches down).  The serial monitor should now be showing your controller’s sensor values.  Bottom sensors should be 0 when not covered, and 1 when covered.  Top sensors should range from anywhere between 0 to 1023. Check to see if the numbers change when the sensors are covered.  If they do change, then the sensors are working and the problem is with your flight code.  If the sensors do not change then try slowly adjust the sensitivity until they do change.

The Controller doesn’t go into upload mode

If the SmartInventor board is in upload configuration (dipswitch 1 up) but not in upload mode, try hitting the reset button until it goes into upload mode.

If the bluetooth board does not enter upload mode, turn the controller off and on again and retry.

My controller does not run the default program and doesn’t show any LED lights

This probably means the board does not have a program on it.  Try Restoring the Default Flight Program.

My controller can’t go into upload mode and the LED lights turn on when the IR sensors are covered

This means your board was accidentally factory reset.  Due to the hardware and software requirements, the original firmware can only be uploaded on-site at Robolink.  Contact info@robolink.com for details on replacing your board.