I have modified the OrientationSensorExample from androidplot website and currently able to plot some dummy waves sourced from my /res folder.
I would like to now implement Bluetooth function for my application but I do not know where or how to start, please give me some advise. Thank you to all who reads this thread.
For communicating with Bluetooth devices, I would recommend you to read the Bluetooth Dev Guide firstly
http://developer.android.com/guide/topics/wireless/bluetooth.html
Then play with the Bluetooth Chat sample.
http://developer.android.com/resources/samples/BluetoothChat/index.html
For real time plotting, I am currently struggling with this problem. Once you can communicate via bluetooth, what you need to do is draw the graph dynamically (real time), I don't know if androidplot support that.
Please let me know if you have solved the problem.
I'm currently working on a solution to do this as well. Communication is based on the Bluetooth Chat sample. It works great with my Arduino Uno and a Bluetooth Mate module. I will do the plotting with the AndroidPlot libraries.
You can get a copy of my code at:
https://bitbucket.org/SmallJoeMan/serial-log/
https://bitbucket.org/SmallJoeMan/serial-plot/
The serial-plot is not fully functional just yet. I'm currently writing the code to make the plot dynamic although progress is slow as the AndroidPlot website is currently down gah!
Related
I want to implement a simple ble python program that will allow me to use my raspberrypi4 as a peripheral and my manjaro laptop as a central entity so I can send messages back and forth. Preferably both of these endpoints would be written python. I'm quite new to Bluetooth programming so I have tried to use the examples at pybluez (the refcomm server/client).
https://github.com/pybluez/pybluez/tree/master/examples/simple
After taking a closer look I saw this it doesn't use ble at all. Any good alternatives?
I need some help because I don´t know how to approach this challenge.
I want to build a device, that's receiving a Bluetooth audio signal and is forwarding it to a Bluetooth speaker. It´s also running some algorithms with the audio data and also simultaneously sending results via UDP to a different device.
I already thought about using two or three ESP32s, using one with an extra Bluetooth module, or searching for a whole different MCU with Bluetooth 5.0 or higher and Wifi 5GHz. But I don´t know approach the best is, or maybe a completely different one.
Some context, why we want to do it:
We want to create a real-time light show, based on the current playing song. It is already working for PC, but also want to make it accessible for phone users. Sadly there is no way to capture the internal audio on iPhone or Android phones. Our Idea to make the music sync with the phone possible is that you are connected with the phone via Bluetooth to our "sync box" which is then connected to the speaker via Bluetooth or AUX. The "sync box" is running our algorithms for creating the light shows and then sending the data to the microcontrollers from the light strips.
So maybe you have an idea how we can sync the lights to the music completely differently or how I can approach the challenge with Bluetooth.
Any help is highly appreciated.
Thanks a lot.
I have trouble finding devices from the market that send live data of heartrate via bluetooth.
Getting SDKs from big companies is a tedious task, and therefore I need just a simple device, which is possible to pair to native Android or to Unity via plugin.
Any suggestions?
All Polar products will fit your needs. I recommend the Polar H7, H10 or OH1.
I'm currently thinking of developing chess code with multi-player facility connected and played via bluetooth. For that I need to chalk out the phases, i mean systematic modules, that I should follow to develop the game. If anyone can state it or have any link that can help it out, it would be great.
Another thing I am developing this in J2ME, so can anyone give me an idea about the way to connect the game in two mobile devices through bluetooth in J2ME. I mean to say the class or file that is used to connect the gaming devices.
For the second part of your question: you need to make an SPP (serial) connection between the two devices, with one acting as a client and the other as a server; see this tutorial for more information.
Then you need to create your own protocol to allow the two devices to communicate everything they need to.
This will only work on handsets with JSR 82.
which API or library on which mobile OS is to be used when one needs to write a code to use the phone's IrDA to create the necessary impulses to remote control consumer electronics e.g. a HDD media player?
Is maybe a certain mobile OS better suited for that kind of application than others?
First you need to know that IrDA is not the best choice for remote control. It can be done, but IrDA is by design high speed/low range, you can emulate low speeds but ranges (IMO) are far from practical usage (Nokia e50 is able to control digital camera shutter from 2-3m... with very, very careful aiming). The amount of hacking needed to achieve this is shown here, you basically need to trick IrDA to send correct impulses with correct frequency.
The second thing is that CIR remote control is not as simple as you might think. There are countless standards that differ in used frequency, modulation, wavelength, command codes and so on. You need to know what you want to support. LIRC site can be very helpful in determining that http://lirc.sourceforge.net/remotes/. Approachable explanation of what it all means is available here: http://www.sbprojects.com/knowledge/ir/ir.htm
As for ready made libraries and platforms... I honestly don't know. I've seen it done on PocketPC (nevo among others) and Symbian S60 (irRemote). Haven't seen working J2ME app yet.
Last time I needed the IR remote I hacked it together using IR diode, AVR ATTiny and surprisingly short piece of assembly :)