Hi, I am very new cannybots I would like to know how to download programming from scratch to the cannybot . I have a mac on version 10.11 . When connect the cannybot to the mac it does not recognise there is anything connected . The cannybot works fine tracking any blck line by its self . I would be very grateful for any advice on how to get started .
Programming a Cannybots using Scratch works over a Bluetooth LE link, not the USB cable.
Please complete the following steps to get up and running as quick as possible (there are some important notes after you should also read):
1 - Download and open this example Scratch project on your Mac
2 - Open a Terminal and enter:
easy_install --user cannybots
3 - Once that has completed then in the same Terminal enter:
python -m cannybots.bleagent
4 - Open a second Terminal window (or tab) and enter:
python -m cannybots.scratchagent
5 - In the example Scratch project clicking on one of the colour squares will change the speed of the Cannybot when following a line
1) Bluetooth LE Hardware
Modern Macs come with Bluetooth LE, however older ones that can still run OSX <10.11 may not. (I happen to have to use a USB dongle for my MBP)
To test Bluetooth LE connectivity on your Mac search the Mac App store for: LightBlue (it's by PunchThru)
Once it's installed open the app and work thru any warnings about Bluetooth being disabled.
To see if your Mac can hear your Cannybot look for a 'Peripheral' with a 'Service' 7E400001-B5A3-F393-E0A9-E50E24DCCA9E, in the scanning window:
When you've found your Cannybots quit the LightBlue app.
2) Installer & Runtime
Please note that the currently Scratch and Python on Mac are in Beta so some things don't work properly (e.g. receiving colour events, only a single connection to a Cannybot is supported) and the software is not packaged as a Mac application installer or a system service.
3) Use the MacOS provided Python distribution
If you see this error "ImportError: No module named objc" then your PATH is picking up a non-Apple provided python distribution.
You will need to re-run the install and scripts in steps 2,3 & 4 above, prefixing the commands with /usr/bin/ e.g. /usr/bin/easy_install and /usr/bin/python
Does this work on Windows/linux as well?