Track My Order
Frequently Asked Questions
International Shipping Info
Mon-Fri, 9am to 12pm and
1pm to 5pm U.S. Mountain Time:
Chat With Us
November 2, 2012
I’m trying to use this in python… and I am a bit confused. So far I have just been using the FSYS Linux I2C Commands (i2cdetect,i2cget,i2cset) based on the i2c registers of the PCA9685. For example its address is 0x40 and the four byte registers for led0 are 0x06 for ON_L, 0x07 for ON_H, 0x08 for OFF_L, and 0x09 for OFF_H. I see that ON is the value from 0 to 4095 corresponding to when in the period the pulse starts, and OFF is the value from 0 to 4095 of the period when the pulse ends. I also see that this is a hex value, not a dec value, and that ON_L is the last two digits of the ON value in hex while ON_H is the first two digits of the ON hex value.
Turn on the pulse at 10% of the period and turn it off at 30% of the period so the signal is on a total of 20% of the period.
ON_time = (.10)*4096 -1=409 = 199h = 1h,99h=0x01,0x99=ON_H,ON_L
OFF_time = (.30)*4096 -1=1228 = 4CCh = 4h,CCh=0x04,0xCC=OFF_H,OFF_L
Yet this isn’t working, though to my best knowledge this should work. I set the registers and that works. I read the registers and they are what I send them, but no LED light… Uising the GPIO Block I can set PWM and get the LED to turn on, but its 8 bit where this is 12 bit, so I like the resolution in this product.
Hopefully my board hasn’t fried itself in all my attempts to get this working….
Anyway, I have also tried to write a program in Python based upon the C++ programs and looking at i2c MRAA examples in python, but so far no dice. I am sure at some point I can get this working, but progress is slow. If anyone has gotten this to work in Python, please throw me a bone!
Note: I am new to Python and Linux and hardware programming in general, so any advice is appreciated.
about 4 years ago
Ok. So im an engineering student getting used to arduino and picked up this shield.to play with. After an hour i got it to display 8 lines of random generated data. Next I used that code to update an existing program which controles a dc motor and propeller to achieve some desired life using a pid… Silly me though I forgot to check and see if a pin is being shared or not, one was and as a result my uno is messing up calling an avdr error, i believe that my serial port is fried though I could be wrong. So i fixed the code and tried it on my mega and it worked fine for a few hours of use. Then I got random characters showing and now the lcd is not showing anything at all, after just 4 hours of use. My question is what could cause it to fail? Also i soddered pins 2,3,4,5,8,9,10,11,12,13,gnd(top right),the teo gnds on the left, and the 5 and 3.3 volt pins. Is this excesive or nessicary. It looked like the schematic called that these are used.
No public wish lists :(
Forgot your password?
No account? Register one!