[NETWORKS] FIN Beacon Game

So, I looked back the code that I made for the midterm, sensor tag easter egg.

I looked through the noble and sensor tag library to get the last piece of information, the decimal.

I did not want to run a javascript code with light blue and match the decimal(point) to the server.

I tried to use scan example and it did not work out.

So, I kept searching on the noble library, trying

console.log(peripheral.advertisement);

console.log(peripheral.advertisement.characteristic);

console.log(peripheral.advertisement.value);

console.log(peripheral.services.characteristic);

console.log(peripheral.advertisement.data);

console.log(peripheral.advertisement.attributes);

All the possible attribute terms to get the decimal(point).

 

And after trying codes from https://github.com/sandeepmistry/noble/wiki/Getting-started 

it could get  decimal value, 18,12,10.

screen-shot-2016-12-06-at-18-41-33

 

Now I can play the game basically plug in the valuse what I am scanning to the server.

screen-shot-2016-12-06-at-19-09-44

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s