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

Forum for C#/Windows development

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

Postby 8484hui » 18 Mar 2015, 09:34

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!
8484hui
 
Posts: 16
Joined: 12 Mar 2015, 03:04

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

Postby Anders » 18 Mar 2015, 10:34

Use the open source example available on our GitHub
Anders
 
Posts: 124
Joined: 29 Oct 2013, 16:23

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

Postby 8484hui » 18 Mar 2015, 11:54

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!
8484hui
 
Posts: 16
Joined: 12 Mar 2015, 03:04

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

Postby Anders » 18 Mar 2015, 17:31

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.
Anders
 
Posts: 124
Joined: 29 Oct 2013, 16:23

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

Postby 8484hui » 19 Mar 2015, 02:36

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"];
8484hui
 
Posts: 16
Joined: 12 Mar 2015, 03:04

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

Postby Anders » 19 Mar 2015, 09:46

You code contains errors, therefore your code will not run. I suggest you revise your code based on the open source examples.
Anders
 
Posts: 124
Joined: 29 Oct 2013, 16:23

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

Postby 8484hui » 19 Mar 2015, 11:21

Hi Ander,

The open source example is it the sample of the calibration and scrolling?
8484hui
 
Posts: 16
Joined: 12 Mar 2015, 03:04

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

Postby Anders » 19 Mar 2015, 13:08

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.
Anders
 
Posts: 124
Joined: 29 Oct 2013, 16:23

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

Postby 8484hui » 20 Mar 2015, 06:26

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!
8484hui
 
Posts: 16
Joined: 12 Mar 2015, 03:04

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

Postby Anders » 20 Mar 2015, 11:19

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.
Anders
 
Posts: 124
Joined: 29 Oct 2013, 16:23

Next

Return to C#



cron