It looks like this onscreen when I move my finger on the mobile device with the app:
Output from App (phone#, 100's of milliseconds, x-position on screen: [5551212,2276.639892,249] [5551212,2276.537952,249] [5551212,2276.442852,251] [5551212,2275.867848,275] [5551212,2275.832444,277] [5551212,2275.210072,299] [5551212,2274.950404,318] [5551212,2274.793408,325] [5551212,2271.274288,268] [5551212,2274.621032,335] [5551212,2274.609068,338] [5551212,2271.561424,305] [5551212,2275.341676,285] [5551212,2274.077036,353] [5551212,2271.694492,327] [5551212,2274.4738,347] [5551212,2274.48674,342] [5551212,2274.206684,352]
Looks like array values. Well, I don't seem to be able to access the elements of the array with normal array syntax like tst[i]. I've tried creating as separate array name, setting the values and doing a loop with document right like document.write("the x position is", tst[i]") but that doesn't work.
Here is the sample smoothie chart example:
The smoothie library is really small. There is an overview here: http://smoothiecharts.org/ and the library can be downloaded here:
I'm not sure that tst in the original script is actually an array and if it is I'm not sure how to read it into smoothie much less just print each array element using document.write.
Guy, I am getting null for input variable:
var box = pn.$('box'), input = pn.$('input'), channel = 'z';
Is something missing here?
Here is the modified code: Output from App (phone#, 100's of milliseconds, x-position on screen:)
about the the pn.bind code I was referring to which contains the publish code?
Hi Craig. The app only needs to subscribe and print a graph. Unfortunately I can not post the corrected code in a readable format. If you cut and paste my last comment into a good editor it should format out correctly. I took all the publish part out of the code. I get no errors when I run it. I can send you the apk file for Android to test the app if you want. I really appreciate your input very much. - Thanks, Guy
But I thought the issue was with the data being received? How can I troubleshoot without the data being published?
I have an apk for Android that sends the data. What I am trying to do is pass the data to the smoothie library. I can also provide the Corona SDK source if there is a way to send it.
I am sending data now: