This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

integer decoding via javascript?

on an arduino+redBear Shield 2.1, I read an analog port and write the value to the serial monitor and to my bluetooth connection with

ble_write(analogRead(0));
Serial.println(analogRead(0));  <--- the serial monitor result is like '790'

my bluetooth device receives a result like 'Fg=='

I think this is base64 encoded, but I can't decode it. What's the right approach in javascript? I did try to divide the analog value by 4, no luck.

my manual conversion of '790' to base64 yields 'Nzkw'

(and where is the Nordic documentation on encoding?)

Related