I want to receive data from Matlab via Bluetooth, but it seems not possible because my mobile phone doesn't support SPP. I read somewhere that I could make it with a MIT App Inventor Bluetooth extension but I don't know how. Did anyone have the same problem? How can I receive data from Matlab?
The data I need to receive is a list of 1, 2 and 3s. My app is a game where I control a character. This character is going to jump, go to the left and go to the right depending if It detects a 1, 2 or a 3 from the list. It means the app needs to read 1 by 1 the digits from a .txt. So, in case the connection with Matlab is not possible (forget about the Bluetooth connection), How could I store the numbers of the .txt (now in my mobile phone), for example in a list, and read them 1 by 1 with a delay?
How do you expect to communicate with the Matlab software is running on your computer. Perhaps you can communicate with Matlab using FTP to get your list of data. What you seem to need to do is get your Android to read a file that resides on your PC.
Where did you find this in formation that you could receive Matlab data via Bluetooth?
Perhaps what you need to do is explained in this search
When I install the app in my mobile phone, my intention is to connect the app with my computer via Bluetooth and send some data that I'm acquiring and then proccesing in Matlab, trying to make it kind of "real time system", that is why I thought about communicating via Bluetooth.
About that search, there appears what I said previously, my device does not support SPP, so I can't establish conection.
I don't know if It would be possible to create an extension with this because this is my first contact with Java and App Inventor and I need some help.
Did you read that " * On the Android phone you will probably need to run an application that initiates the service over SPP." and you do not have that capability on your phone.
That means to me you cannot use the implied method in that post. I suggested FTP to communicate with your PC instead of BlueTooth. There are several extensions that use FTP (File Transfer Protocol) that might be able to read Mathlab created files stored on your PC.
You need to understand how App Inventor works. Here are some resources to help you learn to use the AI2 tools. A very good way to learn App Inventor is to read the free Inventor's Manual here in the AI2 free online eBook http://www.appinventor.org/book2 ... the links are at the bottom of the Web page. The book 'teaches' users how to program with AI2 blocks.
Because my idea is to control the character by biosignals, doing 3 different moves with my hand to get different amplitudes and be able to differentiate them from each other. For that I have to take the samples, process the signals and characterize them with 3 numbers depending on the amplitude.
That is why I need Matlab because We are talking about 400 numbers, I took one sample every 100 ms and every time I start the game I am going to have new samples/numbers.
I hope you understood me
About the FTP solution, if I want a "real time game" I guess is not the best option but I am going to take a look anyway because It would be helpful in the second scenario that I described in the first post.
You might use the AccelerometerSensor tool to generate your List of hand attitude position and it might work. It would be difficult to have AI interpret that pattern (guess why you are suggesting Matlab to analyze the data stream)