How to speed up Beaglebone Black

165 views
Skip to first unread message

Vitali Coltuclu

unread,
Dec 3, 2014, 2:49:54 PM12/3/14
to beagl...@googlegroups.com
Hello Everyone,

I am trying to build a sensor using Beaglebone Black (BBB) and Python and I would like to get as many data points as possible from the sensor. Using the code below, I get around 120 000 points per second.

import Adafruit_BBIO_GPIO as GPIO
import time 

GPIO.setup("P8_11", GPIO.IN)

def get_data(n):
    start_time = time.time()
    my_list = [GPIO.input("P8_11") for i in range(n)]
    end_time = time.time() - start_time
    print "Time: {}".format(end-time)
    return my_list

n = 120000
get_data(n)

I am wondering if it is possible to speed up BBB, ideally to get the rate of 1 MHz. What are the options to do that?

Thanks,
Vitlai

Robert Nelson

unread,
Dec 3, 2014, 2:53:40 PM12/3/14
to Beagle Board
If your just reading a gpio pin, use the pru...

Regards,

--
Robert Nelson
http://www.rcn-ee.com/

Vitali Coltuclu

unread,
Dec 3, 2014, 2:57:09 PM12/3/14
to beagl...@googlegroups.com
Hello Robert,

Thank you very much for the fast reply. I am new to electronics so could you please tell me what pru is? Thanks



--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to a topic in the Google Groups "BeagleBoard" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beagleboard/P4Syb8hIPOg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beagleboard...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jerry Davis

unread,
Dec 3, 2014, 6:23:40 PM12/3/14
to beagleboard
Vitali,

just google for this: beaglebone black pru gpio

you will find a ton of info

You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Extra Ham Operator: K7AZJ
Registered Linux User: 275424
Raspberry Pi and Arduino developer

The most exciting phrase to hear in science - the one that heralds new discoveries - is not "Eureka!" but "That's funny...".
- Isaac. Asimov

If you give someone a program, you will frustrate them for a day; if you teach them how to program, you will frustrate them for a lifetime. 
- Anonymous

If writing good code requires very little comments, then writing really excellent code requires no comments at all !
- Anonymous

Vitali Coltuclu

unread,
Dec 3, 2014, 6:26:08 PM12/3/14
to beagl...@googlegroups.com
Thank you!

Vitali
Reply all
Reply to author
Forward
0 new messages