I am an electrical engineer working on my senior capstone project. The project is a portable ECG device which uses an Arduino MKR1000. I am developing an Android application which I want to graph real-time data received from the Arduino using a TCP connection. I am not very familiar with coding and especially new to networking using TCP. Any help provided would be greatly appreciated.
there are a lot of things you should know for doing this. first you should know the concept of android programming specially with android studio. next you should make a simple TCP/IP connection with your board.first you make your board as a server and then try to connect to it as client.my simple AndroidClientSimpleMessenger and JavaServerSimpleMessenger should be useful for knowing base of this work.and at last you should draw a real-time graph. and GraphView library of appsthatmatter in github should be helpful. i used it and it is real-time.
Related
I have been looking around for a guide on how to implement socket in android development but could not find any. I am currently recalling my API on activity created to ensure that data is updated for my app.
Can anyone assist with a guide to help achieve real time update with socket on android.
There is a powerful library called SOCKET.IO that you could use for this purpose. It supports multiple languages for both backend and client applications. Please check this link for more info and also here is an android example.
Good evening,
i am trying to build an app that connects with an arduino uno with BLE. It is not the center of my project and i had to learn Android programming in a short amount of time. That is why i am mainly using the BluetoothLeGatt app as a reference. My question may seem obvious for some of you.
I've managed to connect to my device but i do not understand how to read/receive notifications.
I understand the link between the functions used : boradcastUpdate, onCharacteristicChanged, onCharacteristicRead... but do not understand how the process starts(e.g how to launch these functions). Am i supposed to call an action myself ? Is there a problem with my emiter ?
I find the documentation of Android unclear and have spent a few hours searching for solutions before coming here.
Thank you for your answers
The documentation about Bluetooth GATT is quite clear about how to setup a basic project and its basic elements. You shouldn't have any problems to read/write on any characteristics your Arduino announce just by adapting a sample project like this.
Basically all you need is work with BluetoothGatt class getting a specific BluetoothGattCharacteristic of a service, and write into it like this after you've done the scanning and connecting process to your Arduino BLE peripheral.
Today i came up with an idea to controle a arduino board or any other micro controller wirelessly using a java program. Im somewhat of an intermediate java programmer, meaning i can make basic applications. I know next to nothing about arduino, or the programming of microcontrollers in general, and i dont want to start to learn until i know i can link java with arduino, meaning running a program on the computer that, lets say, turn on a led. Ive done some research, and thats where i got the bluetooth from, but it seemed like the only videos were in spanish, and not much documentation about it, as far as i can see. I was just wondering how easy is it to link these two, is it possible, any links to tutorials of sorts, thanks. P.S. it doesn't have to be arduino, im just familier with that name, im just interested in controlling something physical through a java app, thanks.
Yes you can,
If you can program in java you will find arduino fairly easy but here is a arduino based tutorial with all the code your need:
http://playground.arduino.cc/Learning/Tutorial01#.UxClcvl_tFs
A majority of bluetooth modules will spit out serial data and this simply interacts with the RX/Tx (receive/transmit) inputs of the arduino. They are usually configured to standard board rates mainly 9600 to start.
All you have to do is spit a string out via bluetooth, an java based bluetooth example is below but you can also find bluetooth modules for PC that interact and install as a CDC (serial port).
Sending a string via bluetooth from a PC as client to a mobile as server.
Serial ports are a little easyier :)
http://www.java2s.com/Code/Java/Development-Class/COM-Port.htm
Cheers,
Chris
I am a highschool student working on a quadcopter project. I am using an android phone instead of a traditional microcontroller because of the phone's speed and other features. The main point of using android phone is for video transmission. I have knowledge in a wide range of programming languages but not so much with networking.
How do I transmit video data from the camera of one phone to another over the network?
If you can direct me on what classes or functions I need to look up on specifically it would also be a great help.
Since I am not that proficient in networking terms and ways it would be helpful, if you would assume that I have minimal knowledge on data transferring over network but I have been using java for years.
Some working example here:
http://code.google.com/p/spydroid-ipcamera/
An then, create a RSTP Client:
http://developer.android.com/guide/appendix/media-formats.html
The following network protocols are supported for audio and video
playback:
RTSP (RTP, SDP)
I am working on one android app. I want to connect my local PC to ANDROID device using Wi-Fi(Local).
just like this APP.
I am new to network programming.
Anyone help me to do this some architecture or example or code.
You could use the Server-Client architecture. Depending on what you want to do you could either set up a server in the phone and have a client on the computer that will connect to the phone. Or the other way around, server on the computer and let the phone connect to it.
Here is another thread that have some example code (there is a lot of other examples and tutorials):
Android - Server Socket
There's no way around this except by hard work. You are expected to read the documentation and work through the examples. There are heaps of tutorials on Programming on Android on the 'Net. Use them.