>
> Here's my current python code:
>
import Adafruit_BBIO.GPIO as GPIO
import time
import sys

import psutil, os
p = psutil.Process(os.getpid())
p.nice(-20)

GPIO.setup("P8_10", GPIO.OUT)
GPIO.output("P8_10", GPIO.LOW)
GPIO.setup("P8_12", GPIO.IN)


while True:

        data = []
        GPIO.wait_for_edge("P8_12", GPIO.RISING)
        for i in range (0,41):
                if GPIO.input("P8_12"):
                        data.append(1)
                else:
                        data.append(0)

                
                if (i == 0):
                        time.sleep(1.8*0.001)
                else:
                        time.sleep(1.2*0.001)


        print(data)


 
However it doesnt capture the bits correctly, the 5 first bits are *often* 
11011 
but not always (I changed the time.wait for very first bit but it didnt 
help much). How can I improve the reception speed?
I dont know assembly at all and very little C. Is there better python 
solution available?

-- 
For more options, visit http://beagleboard.org/discuss
--- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to