Hi @mntrunner ,
Could you attach a screenshot or a video of the issue?
In the meantime, you can try the following:
Install the Chrome app instead of the native app
If you are on Mac, you may need to install the Legacy version of the driver twice.
Double check that the BLE light is flashing red and your CoDrone back light is flashing green before you attempt to pair
Let me know if any of these solve the issue.
It looks like your SmartInventor board is having a problem and you will need to send it back for a repair. I will have someone email you so that it can be arranged
When you get your new board, make sure you also update your CoDrone library. It seems like you have an old version. In Arduino, go to Sketch>Include Library>Manage Libraries...
Search for CoDrone and make sure to click "Update" to the most recent version.
Sorry for the delay! Just checking up on you to see if you are still experiencing the same problem. Did you install the driver? Sometimes with Mac OS you need to install it twice. If you switched the USB cable with a different one it may also not work. Let me know if you continue to experience issues.
Hi @rhavlick ,
Take a look at this diagram and make sure you are using a digitalRead() from the bottom IR sensors. I've included a link to the lesson here so you can take a look. If you still want to use the ones on the side you will need to write some different code because those are analog pins, which means they return a value from 0-1023. The code would look similar to this but replacing the motor commands with CoDrone commands. Hope this helps!
Thanks for your questions!
CoDrone is equipped with an accelerometer, barometer, optical flow sensor, and more. It can be programmed to fly autonomously or with remote control. However, the front IR transmitter and receiver on the CoDrone can only send and receive messages and will not detect obstacles. For autonomous flight, you can program a flight pattern in our Snap! block program, Arduino, or Python. There is an optical flow sensor onboard that you can use to estimate position and displacement from the origin. As for the battery, flight time is limited to keep the drone small and lightweight. If you want to upgrade, we currently do not offer support for adding extra sensors but here are some links that may be helpful on the technical specifications:
This lesson briefly goes over all of the components and assembling CoDrone Pro
For technical specifications on the SmartInventor Board and Bluetooth communication, check this documentation site
Here is a function guide with code examples for requesting sensor data
If the above links did not answer any your questions you may refer to ByRobot's documentation
Let me know if you have any more questions!
@ahudson the following link is the hardware files. Please download this file -> DOWNLOAD <- and set your directory path as the folder labeled Step_2_Addons.
To change your directory you have to locate it using the preference tab.
File > Preferences > Sketchbook location: C:\Users\username\Documents\Arduino.
The above should be changed to Step_2_Addons.
For reference please use Lesson 1C.
If this does not work, please try deleting files located in: C:$Username\AppData\Local\Arduino15\staging
Then try checking if it works again.
I would recommend using the Chrome app if you're using Snap, since we are updating that one most frequently. Otherwise, for the native application, the latest is 1.1.7, which are linked in the Basecamp lessons.
Were you able to figure out what the issue was?
@javiste That's great to hear! I was going to check in with you today to see if the reboot had helped, but I'm glad you were able to find that the solution was something else.
I'll make sure to keep this as reference for other users with the same issue.
Hi @javiste, just got off the phone with you.
It seems like the trim code you'd mentioned on the call came from an old page. I've unpublished that page, since it was using a function that we found wasn't working particularly well. The old Trim() functions were more confusing to explain than just simply running the recalibration.
When we ran the recalibration on a dark black mat during the call, it didn't work well. This was likely because the black doesn't reflect the IR as much as another pattern. Seems like when we ran it on the plaid blanket, it performed significantly better. So just keep in mind to try to use a surface with a distinct pattern that isn't too dark.
Lastly: you're correct! If the drone doesn't remote control well, then the coded sequences will also most likely not perform well. And the errors along the way in running a sequence would end up compounding.
Hopefully that helps!
Hi @chnadell! Sorry didn't get back to you sooner.
Looks like the page you linked is an old page. Thanks for pointing that out, I'll make sure to take down the old page. You can reach the newer version of that page on our Basecamp page located here.
We found an error in the library that was caused by a missing semicolon, which, I believe is the error you're seeing. We fixed that one just a few days ago, so the error you saw should've been right before we fixed that bug. If you go to the Arduino Library Manager and make sure to go to version 2.0.4, the error you pasted should no longer occur.
If it's still occurring, let me know, and we can investigate further.
Hi @javiste! We just finished our call, but wanted to list this out here for others as well.
All the things you listed are definitely good things to look out for and implement. One more thing that will cause the drone to drift is if it hasn't been calibrated for the environment. Lighting and the pattern of the floor, if very different from where it's been calibrated, can cause the drone to drift, especially if you flew the drone elsewhere.
Here's the tutorial about recalibration. Here are the steps, just to clarify.
Insert the battery
Hold the drone updside down
Press and hold the side button until the drone's arms blink
Immediately place the drone on the ground and stand clear for it to take off and run the calibration
One thing to note, make sure the surface is not too dark or not too glossy/reflective. The optical flow sensor works best on a carpeted surface with a distinct pattern. This will help the calibration process.
We would say expecting a margin of error of about a 2 ft x 2ft square is reasonable, or about 60 x 60 cm. And definitely take into account cumulative error. So because it's using dead reckoning (i.e. doesn't have sensors than can tell where it is positioned in space relative to the room), the more it veers off or changes course during a flight sequence, the larger the error will be further along the sequence.
So we tend to keep our obstacles relatively simple, like a take off pad, 3 hoops, and a landing pad. For more complex courses, we'd recommend mixing portions that are remote controlled, and portions that are autonomous.
Hopefully that's helpful!