title: Bluegiga BGScript: How to show uint8 value on display?
body: <p>I'm using the BGScript for Bluetooth program. BGScript provides H/W interrupt listener API. The listener API name is <code>hardware_io_port_status(delta, port, irq, state)</code></p>
  
  <p>What I want to see the value are irq and state. BGScript can display value by using the SPI interface. The API interface is <code>hardware_spi_transfer(channel, data_len, value_data)</code></p>
  
  <p>I can display a string value like this </p>
  
  <pre><code>call hardware_spi_transfer(0,15,"Button 0       ") # OK
  
  call hardware_spi_transfer(0,15,state) # NG Build Error
  </code></pre>
  
  <p>According to API Reference, I have to set the uint8array formatted value as the value_data. But I have no idea about converting from unit to unit8array.</p>
  
  <p>API Reference</p>
  
  <p><a href="http://ezoelectro.narod.ru/doc-pdf/ble112/BLE_Stack_API_reference_v2.2.pdf" rel="nofollow">http://ezoelectro.narod.ru/doc-pdf/ble112/BLE_Stack_API_reference_v2.2.pdf</a></p>
  
  <p>Can you help me? Thanks.</p>