Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Android tablet - plotting data bytes coming through Bluetooth

Status
Not open for further replies.

atferrari

Well-Known Member
Most Helpful Member
I expect to take sequences of say, 50 temperature measurements expressed by a byte each with values ranging from 0 to 255.

The micro will transmit them through bluetooth to a tablet running Android 4.4 at a pace not decided yet. Say, for now, every 30 seconds.

I spent two days already, reading intensively about Android but still have questions:

a - What application (tablet side) could I use to receive and (save?) them?

b - What application is actually able to take the above data and plot the values against an X axis (time).

c - Initially I thought that a .bin file would be involved but it seems that in Android they are different than in Windows and maybe they are not needed at all. The .bin files seem to have a more or less specific use.

d - The apps I've read about up to now, they all seem able to graph functions but no data values.

Could anyone suggest how to handle this, based on previous experience. BTW, I am not Java, nor C conversant.

Gracias for any help.
 
Hi,

There is also something called DeReBasic, that is an Android app you download and install into the Android, then start typing in Basic, so there is nothing to compile. Has lots of sample Basic programs.
I think this is the main site but there is also a forum for this Basic:
https://laughton.com/basic/

I used this Basic a lot in the past but since my Android Tablet does not have Bluetooth i was not able to use that feature. I was waiting until i got another tablet with Bluetooth, but didnt have an immediate need for it.
 
There is also something called DeReBasic, that is an Android app you download and install into the Android, then start typing in Basic, so there is nothing to compile. Has lots of sample Basic programs.
I think this is the main site but there is also a forum for this Basic:
https://laughton.com/basic/

I have that on my Samsug tab 2... (Well her indoors has nicked it ).. But I didn't get on very well with it... It seems very hard to work with.... There are tons of examples so it must work okay, but it just wasn't me...
 
Have you tried Basic4Andriod ??? I have played with this and it has all communication ports covered!!!

https://www.b4x.com/b4a.html

So many names and things I do not recognize Ian!

I wanted a free tool but the only thing seem a trial version. Give me time to udnerstand.

Gracias for replying.
 
Hi,

There is also something called DeReBasic, that is an Android app you download and install into the Android, then start typing in Basic, so there is nothing to compile. Has lots of sample Basic programs.
I think this is the main site but there is also a forum for this Basic:
https://laughton.com/basic/

I used this Basic a lot in the past but since my Android Tablet does not have Bluetooth i was not able to use that feature. I was waiting until i got another tablet with Bluetooth, but didnt have an immediate need for it.

My tablet (Samsung Tab 3) is small. Typing any text there IS a pain. I do not see myself programming much there. Oh God.

Let us admit that being in bed after surgeries in both feet is not the best to feel akin to anything like this.

Like any gale at sea, the idea is: sooner or later it will be over....

Gracias MrAl for replying.
 
Last edited:
My tablet (Samsung Tab 3) is small. Typing any text there IS a pain. I do not see myself programming much there.
Hi Agustin. Providing you can get your Tab3 to talk to a PC you can develop apps on the PC and then transfer files to the Tab3.
 
Hi Agustin. Providing you can get your Tab3 to talk to a PC you can develop apps on the PC and then transfer files to the Tab3.

Yes, I found it is possible. Thanks for replying Alec.
 
Hi,

Yes you have a lot of options here. Let me try to list some.

First, if you have an HDMI output you can plug in a full size screen.

Second, if you have a USB OnTheGo connector (most do these days) you can plug in a USB 2.0 hub, then plug in a mouse and full size keyboard. So you can type AND use the mouse just like you would with a regular computer.

Third, if, as mentioned by Alec, if you have communication with your PC (WiFi and wireless router for example) then you can transfer files after you've typed them on the PC itself. If you dont have WiFi or dont have a wireless router you can still transfer via a USB thumb drive. Put files on from the PC, copy them into the Tablet. I actually prefer doing it this way myself.

The USB OnTheGo connector is just a USB connector with an option to go host or slave. But it works much like a regular PC USB connector/port because it accepts things like keyboards and mice. It does not recognize everything however, like possibly not a camera, as you probably need special app software for that.

I used to do this with mine a lot. Using a full size keyboard is really nice, and the mouse helps a lot too. Hopefully it works with most USB 2.0 hubs, as mine just happened to work with the hub i had.

If you do have USB OnTheGo then the tablet probably came with a connector cable that converts a USB device like mouse to USB OnTheGo connector, which is a USB connector only smaller (micro or mini). If it did not come with a connector cable then you'll have to buy one, but be sure it says "USB OnTheGo" when you buy it otherwise it might not work because there is a special pin that has to be grounded and that is not grounded on normal mini to USB connector adapters. I modified one to work, but it was a pain to do. So better off just buying the right thing.
 
HI, I enjoyed the ADK plugin for eclipse java, uploads and debug outputs over my usb charge cable (samsung tab2)

a)there are lots of bluetooth terminal apps on goolge play, for just raw bytes, maybe ascii

bcd) i'v never dealt with/seen a chart object/file but im sure you could do your own. In any file, its really just how you code your array & data, if that file type is common , that just means theres a common encryption method. But really when you do your own files for software with new extensions , your load method really is based on the save method , ie does you save data use just temp1,temp2,temp3 or do you save data as time1,temp1, time2,temp2 ect

with my experience learning java, the real trouble i had was really using objects, ya lang changes a little but lots of examples on web,
I found it hard to design, and edit my main windows, but plugins ie..like the bluetooth stack connections were extremely easy.

My first app was Bluetooth data port related, where i Rx numerous values, and TX some as well, took about a week or 2 to learn the lang and develop app. To me it was alot like using vb with a few differences... but thats just me
 
Hola Alec, Mr and Dr. Gracias for replying.

I am in bed recovering from feet surgery so had time to use may daughter's laptop (albeit the required position becomes quickly a painful one).

The Laptopt USB tablet seems to be enough (hopping here).

For the moment starting with MIT's Appinventor which resembles to VB's forms and resides in the cloud.

I am trying to avoid any "file" here. What I Rx at the Bluetooth client should be the value immediately used in the plotting.

Problem is that for graphics the sole components available seem to be: balls, canvas (sensible area) and sprites. Nothing to draw lines (!). Not very inspiring for now.

Luckily, inputs as 1, 2, 4 signed/unsigned bytes are considered.

Let us see what this day holds for me.

/Edit

Exploring the 'canvas' found it has circle and line methods. Good!

/Edit
 
Last edited:
WOW!!! That MIT app is awesome....

I have just run through several tutorials... I have done the "Whack a Mole" game.... Instantly updates on my Samsung Note 2.... You can test immediately....

Cheers Agustin... Get well soon buddy!!
 
Gracias Ian! Time and patience.

Drawing something simple now.
 
Hola Ian,

Today I finally started to delve into graphics with App Inventor 2.

My initial attempts failed because I expected I could use a "canvas" of 1.024 x 600 pixels, as per the specs of my Samsung Tab3 (model SM-T210).

In actual practice it seems that I cannot go farther than 500 x 260 pixels (actual values to be checked but sure they are much less than the above). In simple words, lines or points drawn with higher X or Y values are not in the screen at all.

Is it possible that I am "zooming in" somehow and I loose the rest of the pixels? I say this because the graphic quality of this machine seems much better than what I get by drawing a point or a line.

Much too new to tablets, Android and associated concepts myself.

What adds to the (my) confusion is that I use my tablet in "landscape" position which seems not to match the "view" proposed by the App Inventor IDE.

Any suggestion to sort out this? Gracias.
 
The canvas can only be the size of your screen... If your screen it is set to "Automatic" it should give full size..

The screen can be portrait or landscape... This can be changed at run time, but you will need two designs.. One when you are in portrait and one when you are in landscape.. when the accelerometer reports the change, your application can swap screens to suit...

You don't have to use 1024 x 600, most apps will be designed for multiple devices so keeping the basic size is more portable.. They recommend not to use actual values for width and height... If it is set to automatic it will work on the tab 3 and a smaller 5" or 7" screen...

As the app is yours and yours alone you can specify the pixel size ( It's in the "screen1" properties )..

I'm really enjoying this thing!! I'm trying to do a ball / maze type of app at the moment...
 
The canvas can only be the size of your screen... If your screen it is set to "Automatic" it should give full size.

My tablet's screen? Found no setting to select as Auto. Otherwise, if you are talking of Screen1, I found no settings at all that I could change.


The screen can be portrait or landscape...

I've set that within "Properties".

You don't have to use 1024 x 600, most apps will be designed for multiple devices so keeping the basic size is more portable.. They recommend not to use actual values for width and height... If it is set to automatic it will work on the tab 3 and a smaller 5" or 7" screen...

As the app is yours and yours alone you can specify the pixel size ( It's in the "screen1" properties ).

Three questions then, Ian: who recommends that, where I can read it and what dimensions should I use then?

BTW, I am in doubt because when setting the canvas, there are three options:

Automatic - results are strange. I cannot see what I draw.
Fill parent - seems coming close but not filling up my screen (tablet) completely.
Pixels - not sure how to use it as per all done up to now.

As the app is yours and yours alone you can specify the pixel size ( It's in the "screen1" properties ).

You mean what also controls the line's width?

Please be patient. Uncharted waters for me.
 
Right!!! Lets say you have Screen1 and you place a couple of horizontal layouts...

You can specify the pixels of the width and height... Automatic will just resize the layout to the controls you place on them... If it's that app you are trying to design make sure you check "Scrollable" when you specify 1024 for your width (landscape) and make the layout " fit width"... You should see it all on a samsung tab 3 but you will have to scroll when using a smaller screen...

Remember the vast majority of android's are 5" and smaller! So if you were t develop an app to suit everyone, you would use a standard screen size..

Also remember, I too have only just started playing with this... I have been trawling the forums for answers I do not know... The problem here is.... Taking advise from idiots and passing that advise to you!!!
 
Hi all:
I have a need to send data comms from a micro monitoring some sesnors to Android/iOS and Windows Smartdevices.
Blue tooth seems to be the way to go, although direct jack connection is possible but not desirable.

I'd like to have alerts and perhaps some real time graphing on the app.

I'm willing to buy a full version of a developer tool , do you think App inventor is up to the task?
 
I'm willing to buy a full version of a developer tool , do you think App inventor is up to the task?
???? Android developer is free...
https://developer.android.com/samples/index.html
It is quite a good tool but Inventor is a front end "easy peasy" tool... Like I said above, I;m toying with Bluetooth at the moment!!!

There are several Arduino examples to speaking via Bluetooth to Andriod... I'm going to be sending clumps of data from a little touch screen driven from a pic32 to my Samsung note II... Once its running I'll do a little blog!!
 
Status
Not open for further replies.

Latest threads

Back
Top