Page 1 of 2

How to take calibrate data in to a API using visual studio

PostPosted: 18 Mar 2015, 09:34
by 8484hui
Hi,

How to code a API console in visual studio? So to receive calibration data that can save into a text file. Need help please!

Re: How to take calibrate data in to a API using visual stud

PostPosted: 18 Mar 2015, 10:34
by Anders
Use the open source example available on our GitHub

Re: How to take calibrate data in to a API using visual stud

PostPosted: 18 Mar 2015, 11:54
by 8484hui
Hi Ander,

The open source example do not have any coding for the API console after i downloaded it. It only have calibrate and scroll projects. So can you help me out? Thanks!

Re: How to take calibrate data in to a API using visual stud

PostPosted: 18 Mar 2015, 17:31
by Anders
The open source example do not have any coding for the API console after i downloaded it. It only have calibrate and scroll projects. So can you help me out? Thanks!


I am uncertain what you are asking for? There is no open source code available for the API Console of the EyeTribeUI program. Implementing this yourself should be fairly simple if you have knowledge of C# WPF development.

Re: How to take calibrate data in to a API using visual stud

PostPosted: 19 Mar 2015, 02:36
by 8484hui
Hi anders,

Thanks! When i implement the codes from the tutorial for getting the the plain data, i could not figure out where isRunning and json comes from, my visual studio kept prompt me with error of this 2 word is not in the current context. Coding shown below


public event EventHandler<ReceivedDataEventArgs> OnData;

private void ListenerLoop()
{
StreamReader reader = new StreamReader(socket.GetStream());
isRunning = true;

while (isRunning)
{
string response = string.Empty;

try
{
response = reader.ReadLine();

JObject jObject = JObject.Parse(response);

Packet p = new Packet();
p.RawData = json;

p.Category = (string)jObject["category"];
p.Request = (string)jObject["request"];
p.StatusCode = (string)jObject["statuscode"];

Re: How to take calibrate data in to a API using visual stud

PostPosted: 19 Mar 2015, 09:46
by Anders
You code contains errors, therefore your code will not run. I suggest you revise your code based on the open source examples.

Re: How to take calibrate data in to a API using visual stud

PostPosted: 19 Mar 2015, 11:21
by 8484hui
Hi Ander,

The open source example is it the sample of the calibration and scrolling?

Re: How to take calibrate data in to a API using visual stud

PostPosted: 19 Mar 2015, 13:08
by Anders
Most of the projects that are based on C# in our GitHub contains code for calibrating. E.g. this Unity project

I advice you to clone the C# SDK and make sure you understand the source code before copying snippets into you own code.

Re: How to take calibrate data in to a API using visual stud

PostPosted: 20 Mar 2015, 06:26
by 8484hui
Hi anders

I am currently trying to get the API Console feature which displays the values of the eyetribe tracker, location of left and right eye and such. However, I am unsure how to. I am trying to get the data in plain text using the website example, with no luck. May I know how to do it? Thanks!

Re: How to take calibrate data in to a API using visual stud

PostPosted: 20 Mar 2015, 11:19
by Anders
I believe I already answered this question. You need to look into the open source code of the C# SDK, modify it to fit your needs and then implement the GUI you need using a presentation framework like e.g. WPF or Unity. You need to write this code yourself.