BITalinoWorld / revolution-python-api

Python API for BITalino (r)evolution
GNU General Public License v3.0
21 stars 19 forks source link

Run Example code #7

Closed crcdng closed 5 years ago

crcdng commented 5 years ago

To run the example code included in the Readme, I needed to do three things:

  1. add to the top of the file:

    from bitalino import BITalino
    import time
  2. Maybe it could be mentioned that the dependencies must be installed by hand (they are not in setup.py)

  3. On my Mac (MacOSX14, Python 3.6.7) the name of the device is not correct. I had to change:

macAddress = "/dev/tty.BITalino-XX-XX-DevB"
# on Mac OS replace XX-XX by the 4 final digits of the MAC address

to this:

macAddress = "/dev/tty.BITalino-DevB"
# on MacOS,  "ls /dev/tty.*" lists the available devices 
# select the BITalino you want to connect, for example "/dev/tty.BITalino-DevB" or "/dev/tty.BITalino-XX-XX-DevB" where XX-XX are the 4 final digits of the MAC address
rfreixo8 commented 5 years ago

@i3games We changed the README example with your suggestions.