I have purchased a Ticwatch which is running Android wear OS. I want to read the heart beart data from the device over bluetooth using raspberry pi. I found no resources to do so. But I found a tutorial to do so using Polar H7. Link below:
https://github.com/danielfppps/hbpimon
But the same thing is not doing anything with Ticwatch wear OS.
Can anyone even tell me if this is even possible ?
I haven't done this myself - it's quite likely that nobody has, it's a real corner case - but I have no doubt that it's doable.
Getting the heart rate data on Wear is pretty easy; there's an API to do just that. Here's a SO Q&A with some basic code to do so: How to read Heart rate from Android Wear
Transferring that data to your RasPi is going to be more work, but it's still eminently possible. Both devices support a full Bluetooth stack, but there's no simple API for this, so you'll have to build this piece more-or-less from scratch. On the Android side, a good starting point is Google's Bluetooth Chat sample: https://github.com/googlesamples/android-BluetoothChat
In summary: Anything's possible. Many things are difficult.
I ended up creating my own app on Wear OS. Thanks for all help.
Related
I'd really love to learn to program cheap sensors and modules such as this one:
barometer sensor nRF51822 bluetooth module ibeacon LPS22HB, CR2032 battery holder, specifically to use within iOS and Swift.
I reached out to the company who makes them and tried researching how to get started multiple times, but I really can't figure out where to start. There are also pre-programmed modules, but my interest is programming these cheap ones to fit my needs.
I have the linked module, and a few others, and they appear and can be connected to using beacon detector apps, but display no understandable info.
I'd like to read the barometer pressure reading to start. Help is highly appreciated, I'd love to start working with these.
EDIT/UPDATE: I was able to read the modules manufacture name on one of many iBeacon scanner apps I tried and their name is Yunjia. With this information I am able to find alot more details online about what I have. One website says for these chips I can use LightBlue (the app I used to find the manufacturer name) to modify, read, and write to the module. Any additional advice is welcomed, I'll be researching and testing things out.
I also found the Schematics along with some additional info hidden in the seller website.
Edit 2: I found the manufactures little YouTube channel with some info, looks like I just have to do lots of research and testing and learn everything. https://www.youtube.com/channel/UCvqhWNqDE-v0je0X8XAEF2Q It contains some video instructions.
Edit 3: My short term goal of reading the barometer data was a success! After tons of digging I found I just had to write a value of 0x01 to turn on all sensors, then I was flooded with data and the barometer pressure in bytes which could be translated to the actual amount. Write 0x00 to trun off all sensors.
Apple's iBeacon framework is dirt-simple and very easy to use. It allows you to listen for beacons based a unique UUID, major id, and minor ID. It lets you know when a beacon enters or leaves range, and provides crude (immediate, near, medium, and far) distance values. You can create "beacon regions" that will notify your app when you enter or leave them. That's about it.
If you want to do something like read barometric pressure or temperature readings, you will need to either write your own low-level BLE code or use an existing library. My guess is that these modules are using very standard hardware and that you should be able to find libraries to read their specialized data.
Failing that, you will need specifications on their BLE interface and need to learn how to write Apple Core Bluetooth code. (The link you posted has zero specifications for the units. The only thing it provides is the numbers "nRF51822 bluetooth module ibeacon LPS22HB" (It's not in well-formed English so I don't know how to parse those descriptive terms. I'd google those numbers) Note that Core Bluetooth is a fairly low-level framework and not very easy to learn.
EDIT:
Googling "nRF51822", that is apparently an ARM based chip that includes radio hardware that supports BLE. It sounds like that is a general-purpose chip that vendor would use to build a BLE module. Given that, you'd probably have to reverse-engineer it to figure out how it works.
The "LPS22HB" appears to be a solid state pressure sensor that can be used to build a barometric pressure measurement device. It's no doubt interfaced with the "nRF51822". Without specs you're going to have a very hard time figuring out how it's interfaced however.
I am trying to get the Movesense to work with a Unity BLE asset as originally I thought MS would be simple enough. I have managed to connect to it and subscribed to the "61353090-" starting service and the "34802252-" starting charasteristic. I think I even got some notifications. Now the problem is, that I am not receiving or able to decode any data from there.
I also ended up reading the example codes and found out the complex system the Movesense uses and the "whiteboard", which I am unfamiliar with. I cannot find anything sensible by googling, as whiteboard is a whiteboard :)
Now my questions are:
What should I do to progress? Do I need to write something to the "17816557"?
What is the "whiteboard" actually?
Would it actually be smarter to just make a Unity plugin for the Movesense?
Thank you
Your are quite right that the answer is in the "Whiteboard" component. Whiteboard is the embedded REST framework (Note: it is not over HTTP!) that Movesense uses to implement REST services within as well as inter device (e.g. over UART or BLE). As you can imagine it is not a simple component, so decoding the traffic without Amersports'/Suunto's help is quite a big challenge. The actual BLE layer is simple: one characteristic to each direction (write & notify), the complexity lies in what goes inside that data pipe.
However, if you are trying to use Unity to make a mobile app the situation is not so bad. There has been a prototype of Movesense mobile library integration for Unity (Android) that uses the existing Movesense mobile library. If you ask Movesense team (info (at) movesense.com) they might be able to help you further. For Windows (Unity or plain) there is nothing done (at least not yet) mainly because until Windows 10 there was no official BLE API for Windows.
Full disclosure: I work for the Movesense team
For a project at my university I need to create a Unity3D application on my laptop, in which the camera is stationairy and can be controlled to rotate in any direction using the gyroscope of my Android smartphone (Nexus 5), wirelessly or through usbcable.
I've looked at the possibility of OSC or the Unity Remote 5 App, but up till now haven't found a way that works in order to obtain this result.
Any help or advice would be hugely appreciated - I don't have much experience yet with all this.
Thanks!
If i was going to do this then I would use UNET (Unitys built in multiplayer networking API) and have the rotation sync over LAN.
On the camera I would have a Network Transform and a script to control its rotation based on accelerometer input.
The version on the phone would be the authority and sync it's rotation over the network to the client on the laptop.
Pros: Wireless, fast (over wifi), very little code required to make it work, lots of documentation available online.
Cons: Relies totally on your network situation, you will have to do a lot of trial and error to get a smooth experience (not jerky) i think.
As for getting the tilt input on the device, Unity have a great tutorial here: https://unity3d.com/learn/tutorials/topics/mobile-touch/accelerometer-input
It's pretty straight forward.
Sound like a fun project, good luck!
It's possible to do this via cable, WiFi, Bluetooth 2.0 or Bluetooth 4.0 (BLE). I have implemented what you need in WiFi and Bluetooth 2.0 for my current work.
It's pretty easy to get rotation values and stream them from Android but I don't think you will need to do anything because you can just use this!
https://play.google.com/store/apps/details?id=de.lorenz_fenster.sensorstreamgps&hl=en
So the question is how do you receive the data this is sending on Unity's side. The answer is the UdpClient class.
If you need more reliability because every second student in your uni library is torrenting Mr. Robot and your getting huge lag then I can tell you how to implement the same thing in Bluetooth, which is not super trivial as .NET 2.0 (which unity uses) doesn't support bluetooth libraries, but there are solutions...
I've seen a lot of projects, tutorials and how-to's on the web regarding the Raspberry Pi.
I've just received my first Pi in the mail, and I can't wait to get tinkering with it.
Of course, doing any of these things is going to be a difficult process, however, as my experience with the Pi is next to none, I wondered about the capabilities of what I want to do with my first major project.
I'd like to be able to build an on-board computer for my car. I've seen several projects regarding this, and I've seen some good guides online.
However, none that I have seen will do EVERYTHING that I can think of....
I'm assuming that my 8GB SD card will be limited to only a selection of these specifications, however, here's a list of what I'd like the solution to be capable of, and if anyone knows any reason why this isn't possible, please give me a heads up :)
So...
I'd like a front-end GUI (on a 7" touchscreen monitor) with a menu to navigate the options, which will include
From this menu, I'd like to be able to select (and of course, run) the following:
Media center (I've seen things like XBMC etc.) - I'd like this to be capable of taking over the radio unit and playign mp3's etc (possibly from my iphone!?)
GPS/SatNav - I don't know how possible this is and I assume i'd need a 3G card or something...
Reverse parking camera (stick a webcam in the rear view window) etc (I've seen good tutorials for this)
Connect my phone with a bluetooth thingy(?) so that I can add a USB mic and play the receiver audio through my speakers (acting as a hands free kit)
I'll add more ideas too...
I'm not questioning if each of these individual specifications are possible, I am asking if they are all possible through one solution as a whole, with a GUI to navigate through them?
Thanks for any help.
Cal.
It is all possible, all in one bundle. 8gb is more than enough for everything, it'll only limit your music collection. The only question is: how much work are you able/capable of doing. That will be the limiting factor, not your Pi.
Short answer is yes, all exist and the pi can handle it. But you'll be writing a lot of custom software to make them interoperate.
Ok, so I've never done anything with serial connections before. But...
I just got an Arduino that I am trying to use to remotely launch model rockets. I have a 5 volt relay that I can control with the Arduino's digital out.
Now, I want connect my iPhone's Tx to the Arduino's Rx and vice-versa. I would buy the iPhone breakout board from spark fun so I could connect it to the Arduino. (http://www.sparkfun.com/products/10645) I was thinking something along the lines of: when the phone gets a text or a call from a certain number, or maybe even just a bluetooth signal, it would tell the Arduino. But those are just ideas.
How can I actually send a signal from my iPhone? Are there xCode libraries to do this? My phone is jailbroken, so I am open to other non-apple ways for sending signals. But I am a novice programmer.
Thank you.
P.S. I'm new to Stack Overflow, and I would appreciate if you could help me. The first time I posted a question someone told me it wasn't on the right site. So please bear with me.
EDIT #1: Haha, I just read over this and it sounds like a cell phone bomb from a terrorist movie. I swear that's not what I'm doing. Just look at my avatar.
EDIT #2: I also have a Bluetooth dongle for the Arduino. But I honestly have no idea how to interface that with anything, it was $10 from China, so I thought I would buy it to keep my options open. But, regardless, it would be really cool to plug an iPhone into an Arduino.
You could buy a Redpark Serial Cable for iOS to connect the iPhone to your Arduino board over RS-232.
This book also seems to be helpful: iOS Sensor Apps with Arduino
EDIT:
Redpark FAQ: http://redpark.com/c2db9_FAQs.html
There is a SDK available for this serial cable.
You will have trouble writing communication software when trying to connect directly to the dock connector! The External Accessory Framework wont help you here unless your Arduino board has a special decoding chip for dock connector communication.
Have fun!
All I think you need to do is utilize the External Accessory framework. I'm not sure how well it will work for you, the library is meant to communicate with MFi approved accessories. I'd really like to hear how your results went, I am going to be conducting an experiment of my own using a break out board
I am in a similar boat as you, and I have successfully built my own serial cable using the podbreakout, and have implemented a serial class that supports reading / writing. I can confirm that I have read working, as I have tested it with my RFID reader. I am in the process of writing code that will send a command to the Arduino from the iPhone, and then have the Arduino perform a task based on the command.
Here is a document I put together on iDevice serial com,
https://docs.google.com/document/d/1Yi9_hcw8XSyYNCG2OJT9oHlTG-dC-Dnuc58VIULa81Q/edit?usp=sharing
and the serial class can be seen in the project I am working on.
https://github.com/ipatch/KegCop