Python support please...

Hi guys,
got my MWCs and was realy excited at first. Android App worked like a charm and started playing around with the sample App.
Although fun, it's not what I have planned for the boards. I tried to connect it to my linux machine and tried to figure out how to read data.
After hours of trial and error I'm now frustrated that there does not seem to be an official way to connect the MWC to a linux machine.
Providing a Python API, even if it's just allows to stream sensor data would really be something. 

Do you plan to provide a Python package or are the boards only support iOS, Andoid and C++?




  • The C++ library compiles as shared library, which can be called into from higher level languages. Unit testing of the C++ library is done in Python.
  • ok, that's a start.
    are you planning on releasing an official python package that makes the whole dev process easier? => scanning/connecting/config/data read...

    you would make the MWC platform much more attractive if people had an easier start with python...
  • edited January 2016
    At this time, no, our primary focus is on the mobile platforms, of which Android and iOS dominate. We just don't have the bandwidth to support additional platforms. Some community members do help us out with some of these other development platforms such as @lgleasain combining the ios and Android apis in a Cordova plugin.

    The C++ library handles all the MetaWear related functionality, the user just needs to fill in the BTLE portions for his development platform.  
  • With the C++ library it is possible to bridge languages like Python and Ruby to the library.  Outside of the mobile development land I tend to favor Ruby and Javascript,  but if there was enough demand for Python..... might be worth kick starting the project.....would be a great open source type of project that would benefit everyone.

    There is a node-js adapter for the boards as well.  What kind of project are you working on?
  • @Igleasain: the filan goal would be to integrate the MWC platform into the robot operating system 
    As the hardware is affordable, I see a lot of potential within the robotic community. Small form factor is another point that makes it very attractive. I never used C++ libraries and Python and it's a bit hard to get started with so much new stuff (BLE, C++ sharded libs, figuring out the BTLE portions mentioned)
    Could you reccomend a good tutorial?
  • I could see using the board to get Bluetooth connectivity,  but even there ROS seems like it would be overkill for that kind of application.  One project that would be fun to do would be to hook up a few MOSFETS to the digigal I/O ports and use it to create a bluetooth controlled RC car.  

    From what I have seen with ROS the arduino's,  for example,  are usually used for controlling servos,  interfacing with sensors etc., but there seems to usually be another larger controller for the rest of the logic....such as a Rasberry Pi etc..

    Let's take a step back with this.  Do you have a project in mind using ROS that you want to use the board for?  If so can you give us some more details?  If not I would say to take some time to really understand ROS,  robotics and how they are integrated and to then see if the MetaWear platform would fit in to those needs.  Outside of the ROS site I really don't have a lot of information or recommendations with this because it hasn't been my specialty.

    I love this platform and board,  but,  like any tool the key is to use it for applications where it adds value.
  • I agree that ROS itself would be overkill, just to read the data. My idea would be to use the sensor data and sensor fusion to achieve localization of multiple robots. Furthermore adding other sensors to the I2C interface would be awesome aswell. The current problem is, that there is a need for such sensors but the implementation is done via arduino. The the arduino needs to be connected to the network/computer running ROS and at the end, the whole setup is just bulky, expensive and overly complicated. 
    Having the possibility to access the MW boards using python/C++ (I personally prefer python) would make them very attractive to the robotics community.
  • I've done some hacking with Python and Metawear.  Got some stuff to work such as turning on the vibrator, LEDs, and reading battery levels.  It's difficult to use the Metawear in this manner rather than using the iOS or Android APIs because I'm having to work at the byte level, reverse engineering the Android API to figure out the low level bytes, and sending those bytes to GATT characteristics.

    I'm actually trying to move away from Python and want to implement what I'm doing using the C++ API.
  • edited February 2016
    Also anyone wanting to work with Android / iOS with Python might want to peek in on the Kivy project... I've been poking around with it, and am now excited to see if I can get these SDK's working with the Kivy project.

    If anyone has already tried using Kivy I would be interested in any resources you found useful.

    All the best,
  • i'm fairly familiar with kivy and i think there could definitely be something there! write once deploy everywhere!
This discussion has been closed.