View unanswered posts | View active topics It is currently Thu Dec 14, 2017 8:27 am



Reply to topic  [ 1 post ] 
BGScript vs. BGLib 
Author Message

Joined: Mon Mar 17, 2014 12:41 pm
Posts: 4
Hello,

for my actual project I need to stream data from two devices (left, right) to an android smartphone.
Desired samplerate is about 100 values per second from each device.
First I tried to use the BLE112 as SoC and coded it with BGScript.
For timing I used "hardware_set_soft_timer" and used the "attributes_write" method to write the data to the characteristic.
The first result showed, it is possible to transfer about 95 values per second from each device.
The sequence of packets and the times between (left-left and right-right) recorded with an android smartphone looks like as follows
Left 8ms
Right 15ms
Left 15ms
Right 9ms
Left 20ms
Right 16ms
Left 1ms
Right 5ms
Left 9ms
Right 13ms
Left 15ms
Right 9ms
Left 10ms
Right 9ms
Left 5ms
Left 7ms
Right 14ms
Right 7ms
Left 15ms
Right 8ms
Left 8ms
Right 15ms
Left 15ms
Right 7ms

If you use the internal ADCs (7) the samplerate goes down to 40 values per second from each device.
To enhance speed, the Idea was to use an external MCU (Teensy 3.1) for ADCs and computation.
This time I used the BLE112 with the BGLib implementation from Jeff Rowberg.
Now I have a samplerate of about 60 values per second from each device.
But the packet sequence looks like as follows.
Left 47ms
Left 1ms
Left 1ms
Right 47ms
Right 1ms
Right 1ms
Left 47ms
Left 1ms
Left 1ms
Right 47ms
Right 1ms
Right 1ms
Left 47ms
Left 0ms
Left 1ms
Right 47ms
Right 0ms
Right 2ms
Left 48ms
Left 0ms
Left 1ms
Right 46ms
Right 1ms
Right 1ms

Any idea why the packets come clustered like this?

Best regards,
Ronald


Thu Apr 02, 2015 6:38 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 1 post ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software for PTF.