Eric

Do not send private messages with technical questions; they will be discarded. All technical questions must be posted publicly on the forum.

About

Username
Eric
Joined
Visits
9,275
Last Active
Roles
Administrator

Comments

  • Yes, you will do your calculation where your comment is. Before we get to that though, is the receivedDataValue callback function being called at all?  It doesn't seem like it is, otherwise you should be getting messages in Logcat.  What does your…
  • What I think is happening is the BluetoothGattCallback functions are still being called from one app even though another app is initiating the request.   Clients refer to activities (or fragments) that initiate a bindService request.  Under "Cr…
  • I updated the app to fix the crash.  Since it will take a few hours before the play store updates, you can get the APK from the GitHub releases page if you do not want to wait. https://github.com/mbientlab/Metawear-SampleAndroidApp/releases/tag/2.…
  • I just released a quick fix to v1.9.0.  A fix made in v1.9.0 wasn't properly working and I forgot to remove the launcher icons from the project, as mentioned in this thread: http://community.mbientlab.com/discussion/348/ic-launcher-png-duplicate-in-…
  • 1) I made a release (v1.9.0) with the additions for tap, motion, and shake logging. 2) The spec sheet for the MetaWearR accelerometer calls it "transient" so we have kept that naming convention. 3) Battey life can be retrieved with the readBattery…
  • Since you are have the source in hand, you can try replacing the single line while loop causing the error (https://github.com/mbientlab/Metawear-AndroidAPI/blob/1.8.0/app/src/main/java/com/mbientlab/metawear/api/MetaWearBleService.java#L397) wit…
  • The current MetaWearR board does not have a gyro.
    in Metawear(gyro) Comment by Eric July 2015
  • 1. What data can I retrieve in processData() from LogEntry for Activity ?  There isn't much information available other than which axes were above the movement threshold and in what direction (positive or negative).  I will do a quick release later…
  • The call to startComponents must be done in the connected callback function, after you've configured the acclerometer sampling.  You have the startComponents call inside the receivedDataValue callback function.Also, 200Hz is too high for streaming, …
  • Are you by chance periodically scheduling readRssi (or readBatteryLevel) function calls?
  • Hrm, off the top of my head, yes this should be possible.  For the old Android API, you can do this by utilizing the event and timer modules.  What you would do is program the board to respond to a motion event by setting the IBeacon major value and…
  • Can you consistently cause this crash?  The line in question is code that extracts the I2C data from the MetaWear response packet and the crash is caused the response being less than 3 bytes long.
  • After enabling IBeacon mode, you must disconnect from the MetaWear board for it to broadcast the IBeacon ad packets. http://tinypic.com/r/2j600tx/8
  • Sorry about the forum bug, we are in the middle of updating the website and the forums got caught in the path. Date routes simply tell the board what to do with sensor data; they do not poll or sample data.  Your code for the temperature route loo…
  • Yes, data processing is much simpler and more compact now. With the current beta 01 release, you can construct the activity chain in this blog post (http://projects.mbientlab.com/turn-your-metawear-into-an-activity-tracker-android/) as follows:  …
  • Motion detection is a feature of the the accelerometer that detects if the board is moving.  For example, if you pick up the board and move it to another spot on a table, you will get alerts for the initial acceleration from rest, and some alerts fr…
  • I set Accelerometer.Register.FREE_FALL_VALUE for Motions ?  Yes, the chip on the MetaWearR (MMA8452Q) bundles free fall and motion detection together.  Either one or the other is enabled. I missed something, I should stream to the mobile app t…
  • When you download the logs, you use the log entry ID to sort through which entry is for what data source.  For the orientation entries, you can use BytesInterpreter.byteToOrientation to convert the byte values to an orientation enum. Yes, the valu…
  • The MetaWear library has a background service that manages the Bluetooth LE connection, you do not need to create your own service for that task.  Your code looks good so what I would do next is add the MetaWear broadcast receiver to your activity a…
  • At the moment, no, the gist code is on its own.  As for your individual questions: - I assume I need a button connect/disconnect - I assume I need a button to write code This is the easiest way to set things up.   - Will the device always …
  • Yes, your steps outlined are correct.   I'd first start with a Hello World app.  In other words, start a new project in Android Studio, walk through the wizard to get simple app running on your phone.  Once you feel confident, please read our Andr…
  • Sample code for instantiating a BluetoothDevice given a MAC address is in the guide: http://docs.mbientlab.com/?page_id=40#post-83 The Bluetooth adapter does have to be enabled for the code to work.  The Android Bluetooth LE page has sample code …
  • The values reported as is are in milli Gs.  The plot and email features convert the values to G.
  • The Android guide has examples on setting up the callbacks for streaming accelerometer data: http://docs.mbientlab.com/?page_id=40#post-95
  • As far as I can tell, the only way to get the RSSI value of a bt device when it's disconnected is by doing a BT scan.  I suppose you could initiate a scan, pull the RSSI value out and then connect if it's within a reasonable range.
  • No, once the haptic driver starts, it will continue for the amount of time specified in the pulseWidth parameter.
  • The best you can do is periodically read the log count and start a download when the amount has exceeded your limit.  There is no trigger available for the log sample count.
  • Sounds like you created an Android library instead of an Android application.  The first line of the module's build.gradle file should be: apply plugin: 'com.android.application'
  • That line of code corresponds to code that is setting up the Bluetooth gatt descriptors.  It would appear that turning off the BT radio will return a null for getDescriptor method.
  • What you mean by shake frequency?  The only accelerometer frequency attribute is for the XYZ axis sampling