Sub AStream_NewData (Buffer() As Byte)
.....
.....
.....
Dim prup(72) As UInt
For i = 0 To 71
prup(i) = GetUint(i)
Log("UNIT = ", GetUint(i))
Log("prup = ", prup(i))
Next
End Sub
Private Sub GetUint(Index As UInt) As UInt
Return RunNative("getdata", Index)
End Sub
#If C
#include <avr/pgmspace.h>
const PROGMEM uint16_t progup[] = { //change the data here
0x0000, 0x006D, 0x0000, 0x0022, 0x012F, 0x0098, 0x0013, 0x0013, 0x0013, 0x0039, 0x0013, 0x0039, 0x0013, 0x0013, 0x0013, 0x0039, 0x0013, 0x0039, 0x0013, 0x0039, 0x0013, 0x0039, 0x0013, 0x0039, 0x0013, 0x0013, 0x0013, 0x0013, 0x0013, 0x0039, 0x0013, 0x0013, 0x0013, 0x0039, 0x0013, 0x0013, 0x0013, 0x0013, 0x0013, 0x0013, 0x0013, 0x0039, 0x0013, 0x0013, 0x0013, 0x0013, 0x0013, 0x0039, 0x0013, 0x0013, 0x0013, 0x0039, 0x0013, 0x0039, 0x0013, 0x0039, 0x0013, 0x0013, 0x0013, 0x0039, 0x0013, 0x0039, 0x0013, 0x0013, 0x0013, 0x0013, 0x0013, 0x0013, 0x0013, 0x0013, 0x0013, 0x05DD
};
B4R::Object beo1;
B4R::Object* getdata(B4R::Object* o) {
return beo1.wrapNumber(pgm_read_byte_near(progup + o->toLong()));
}
#End If