home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
MediaPortal 1 Plugins
[New Plugin] Atmolight Process Plugin **Update 25.05.2010 V1.9**
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="bob808" data-source="post: 1057235" data-attributes="member: 77243"><p>I am struggling to program my arduino uno v3 - getting the following error</p><p></p><p>AtmoDuino:27: error: no matching function for call to 'CFastSPI_LED::setPin(int, int, int)'</p><p>C:\Program Files\Arduino\libraries\FastSPI_LED/FastSPI_LED.h:125: note: candidates are: void CFastSPI_LED::setPin(int)</p><p></p><p>Can anyone help me get this working? I am using a string of 50 ws2801 lights and trying to get the following config to work</p><p></p><p>[CODE]#include <FastSPI_LED.h></p><p></p><p>//Set the number of leds in the strip.</p><p>#define NUM_LEDS 50</p><p></p><p>// Sometimes chipsets wire in a backwards sort of way</p><p>struct CRGB {</p><p> unsigned char b;</p><p> unsigned char r;</p><p> unsigned char g;</p><p>};</p><p>// struct CRGB { unsigned char r; unsigned char g; unsigned char b; };</p><p>struct CRGB *leds;</p><p></p><p>#define PIN 4</p><p>void setup(){</p><p> Serial.begin(115200);</p><p> FastSPI_LED.setLeds(NUM_LEDS);</p><p></p><p> //Change this to match your led strip</p><p> FastSPI_LED.setChipset(CFastSPI_LED::SPI_WS2801);</p><p></p><p> //Change datarate to match your led strip as well</p><p> FastSPI_LED.setDataRate(0);</p><p></p><p> //If non-default SPI pins have been used change this.</p><p> FastSPI_LED.setPin(PIN,11,13);</p><p></p><p> FastSPI_LED.init();</p><p> FastSPI_LED.start();</p><p> leds = (struct CRGB*)FastSPI_LED.getRGBData();</p><p> clearLeds();</p><p>}</p><p></p><p>int readByte(){</p><p> while(Serial.available()==0){</p><p> FastSPI_LED.stop();</p><p> }</p><p> FastSPI_LED.start();</p><p> return Serial.read();</p><p>}</p><p></p><p>void clearLeds(){</p><p> for(int tmpChannel=0; tmpChannel<NUM_LEDS; tmpChannel++){</p><p> leds[tmpChannel].r = 0;</p><p> leds[tmpChannel].b = 0;</p><p> leds[tmpChannel].g = 0;</p><p> };</p><p> FastSPI_LED.show();</p><p>}</p><p></p><p>void loop(){</p><p> if(readByte() == 0xFF){</p><p> if(readByte() == 0x00){</p><p> if(readByte() == 0x00){</p><p> int channels = readByte();</p><p> for(int channel=0; channel<channels; channel++){</p><p> leds[channel].r = readByte();</p><p> leds[channel].b = readByte();</p><p> leds[channel].g = readByte();</p><p> }</p><p> FastSPI_LED.show();</p><p> }</p><p> }</p><p> }</p><p> else</p><p> {</p><p> //clearLeds();</p><p> //FastSPI_LED.stop();</p><p> }</p><p>}</p><p>[/CODE]</p></blockquote><p></p>
[QUOTE="bob808, post: 1057235, member: 77243"] I am struggling to program my arduino uno v3 - getting the following error AtmoDuino:27: error: no matching function for call to 'CFastSPI_LED::setPin(int, int, int)' C:\Program Files\Arduino\libraries\FastSPI_LED/FastSPI_LED.h:125: note: candidates are: void CFastSPI_LED::setPin(int) Can anyone help me get this working? I am using a string of 50 ws2801 lights and trying to get the following config to work [CODE]#include <FastSPI_LED.h> //Set the number of leds in the strip. #define NUM_LEDS 50 // Sometimes chipsets wire in a backwards sort of way struct CRGB { unsigned char b; unsigned char r; unsigned char g; }; // struct CRGB { unsigned char r; unsigned char g; unsigned char b; }; struct CRGB *leds; #define PIN 4 void setup(){ Serial.begin(115200); FastSPI_LED.setLeds(NUM_LEDS); //Change this to match your led strip FastSPI_LED.setChipset(CFastSPI_LED::SPI_WS2801); //Change datarate to match your led strip as well FastSPI_LED.setDataRate(0); //If non-default SPI pins have been used change this. FastSPI_LED.setPin(PIN,11,13); FastSPI_LED.init(); FastSPI_LED.start(); leds = (struct CRGB*)FastSPI_LED.getRGBData(); clearLeds(); } int readByte(){ while(Serial.available()==0){ FastSPI_LED.stop(); } FastSPI_LED.start(); return Serial.read(); } void clearLeds(){ for(int tmpChannel=0; tmpChannel<NUM_LEDS; tmpChannel++){ leds[tmpChannel].r = 0; leds[tmpChannel].b = 0; leds[tmpChannel].g = 0; }; FastSPI_LED.show(); } void loop(){ if(readByte() == 0xFF){ if(readByte() == 0x00){ if(readByte() == 0x00){ int channels = readByte(); for(int channel=0; channel<channels; channel++){ leds[channel].r = readByte(); leds[channel].b = readByte(); leds[channel].g = readByte(); } FastSPI_LED.show(); } } } else { //clearLeds(); //FastSPI_LED.stop(); } } [/CODE] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
MediaPortal 1 Plugins
[New Plugin] Atmolight Process Plugin **Update 25.05.2010 V1.9**
Contact us
RSS
Top
Bottom