title: How to render data from a buffer? React-Native Javascript
body: <p>i'm new to react-native and i'm using the library react-native-ble-plx to connect a Heart Sensor to my app and show it's values.</p>
  
  <p>At this point i managed to connect it via bluetooth and store the information on a buffer where i can see with console.log(buffer), as shown in next picture.</p>
  
  <p><a href="https://i.stack.imgur.com/QcGJx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QcGJx.png" alt="enter image description here"></a></p>
  
  <p>My question is how can i render this information to the application? I don't know how to handle it from that buffer.</p>
  
  <p>edit: I specifically want the 2nd value of that buffer (the one that normally is 70)</p>
  
  <p>Here is the code:</p>
  
  <pre><code>scanAndConnect() {
        this.manager.startDeviceScan(null,
                                     null, (error, device) =&gt; {
            this.info("Scanning...");
  
            if (error) {
              this.error(error.message);
              return;
            }
            console.log(device.name)
            //if (device &amp;&amp; device.name == 'Inspire HR') {
              if (device &amp;&amp; device.name == 'HX-00043494') {
              this.manager.stopDeviceScan()
               device.connect()
                 .then((device) =&gt; {
                   this.info("Discovering services and characteristics ")
                   return device.discoverAllServicesAndCharacteristics()
             }).then((device) =&gt; {
                   this.info("Setting notifications")
              ``return this.Async_setupNotifications(device);
            })
            .then(() =&gt; {
              this.info("Listening...")
             return this.setupNotifications(device)
  
            }, (error) =&gt; {
              this.error(error.message)
            })
        }
      })`
    }
  
  
  async Async_setupNotifications(device) {
   this.manager.characteristic  = device.characteristicsForService("0000180d-0000-1000-8000-00805f9b34fb");
  const buf = Buffer.from(characteristic.value, "base64");
  console.log(buf);
  console.log (buf[1]);
  
  
  this.manager.characteristic.isNotifying = true;
  this.manager.characteristic.isReadable = true;
  
  
   if (error) {
     this.error(error.message)
               }
  return ;
  }
  </code></pre>
  
  <p>Thanks a lot for the help so far</p>