12bit PWMParabola?

Do you have a question on how to do something.
Ask in here.

Posts: 12327
Joined: Fri Mar 18, 2011 6:47 pm
PostPosted: Sat May 10, 2014 9:28 pm
There is no support for the 16 channel on our libraries. You need custom code as I mentioned before.
AlanM has started this though:
viewtopic.php?f=7&t=4543&hilit=16+channel
Take a look at this code to see how to do it without the libraries integration:
viewtopic.php?f=12&t=4532&p=38671&hilit=CustomExpansion#p38671
Roberto.

Posts: 20
Joined: Mon Mar 17, 2014 1:07 pm
PostPosted: Sat May 10, 2014 9:38 pm
Thank you!

Any sneaky pitfalls I should be on the look out for when I add in the custom code?

Posts: 20
Joined: Mon Mar 17, 2014 1:07 pm
PostPosted: Sun May 11, 2014 4:57 pm
Okay, I finally got my code to compile correctly using Kraven's library.

Code: Select all
     int i = 0;
   
    while (i < 100)
    {
      ReefAngel.PCA.SetAllChannelsPercent(i);
      Serial.println(i);
      i++;
    }
   
    while (i >= 0)
    {
      ReefAngel.PCA.SetAllChannelsPercent(i);
      i--;
    }



The problem is when I hook up my adafruit breakout chip to the i2c port on the relay, I get a steady blinking red light under status and it does not dim up/down like it should.

I have tried my best to diagnose the issue, but am failing to see what the issue is at the moment.

To verify: I did create my own usb to i2c cable, with the following configuration;
Black - Ground
Green - SDA
White - SCL
Red - VCC

Posts: 20
Joined: Mon Mar 17, 2014 1:07 pm
PostPosted: Tue May 13, 2014 7:49 am
Shameless bump to figure this out. Any help from anyone would be appreciated.

Posts: 12327
Joined: Fri Mar 18, 2011 6:47 pm
PostPosted: Tue May 13, 2014 7:59 am
Did you try inverting the SDA/SCL wires?
It's something in the bus that is causing this.
Roberto.

Posts: 20
Joined: Mon Mar 17, 2014 1:07 pm
PostPosted: Tue May 13, 2014 8:03 am
I did. The chip is set to 0x4e (I believe) so I set that in the globals and moved the PHProbe to a different address.

Could this be the source of the issue?
Last edited by Meldrath on Tue May 13, 2014 8:04 am, edited 1 time in total.

Posts: 12327
Joined: Fri Mar 18, 2011 6:47 pm
PostPosted: Tue May 13, 2014 8:03 am
Can you confirm the breakout board is working with another arduino board?
Roberto.

Posts: 20
Joined: Mon Mar 17, 2014 1:07 pm
PostPosted: Tue May 13, 2014 8:05 am
Not readily available.

Posts: 12327
Joined: Fri Mar 18, 2011 6:47 pm
PostPosted: Tue May 13, 2014 8:16 am
The address won't be the issue.
If the status is blinking, it means your bus is locked.
So, I know it is something in that cable you've made or it is the breakout board/chip that is non-functional.
Burned out chips can cause this too.
Roberto.

Posts: 20
Joined: Mon Mar 17, 2014 1:07 pm
PostPosted: Tue May 13, 2014 8:25 am
Is there a verify within reef angel or something to see if the chip is functional?
PreviousNext

Return to How do I code ...

Who is online

Users browsing this forum: Bing [Bot] and 1 guest

cron