What have you tried so far and what are your error messages?
Have you added the .cpp and .h files from the library into your project in Web IDE?
Make sure you only have one example in a project in Web IDE.
In theory, you should be able to get it to work, but it will take some effort.
If you want an alternate, you could try searching for libraries that work the for chip on the Driver board… there is at least one mentioned on this forum.
Yep, I added cpp and h-files into my procet in webide.
I set //#include Arduino.h in remark in the .h-file.
After verifiying the code I get this error:
RGBdriver.cpp: In constructor 'RGBdriver::RGBdriver(uint8_t, uint8_t)':
RGBdriver.cpp:22:20: error: 'OUTPUT' was not declared in this scope
pinMode(Datapin, OUTPUT);
RGBdriver.cpp:22:26: error: 'pinMode' was not declared in this scope
pinMode(Datapin, OUTPUT);
RGBdriver.cpp: In member function 'void RGBdriver::ClkRise()':
RGBdriver.cpp:38:24: error: 'LOW' was not declared in this scope
digitalWrite(Clkpin, LOW);
RGBdriver.cpp:38:27: error: 'digitalWrite' was not declared in this scope
digitalWrite(Clkpin, LOW);
RGBdriver.cpp:39:23: error: 'delayMicroseconds' was not declared in this scope
delayMicroseconds(20);
RGBdriver.cpp:40:24: error: 'HIGH' was not declared in this scope
digitalWrite(Clkpin, HIGH);
RGBdriver.cpp: In member function 'void RGBdriver::Send32Zero()':
RGBdriver.cpp:50:27: error: 'LOW' was not declared in this scope
digitalWrite(Datapin, LOW);
RGBdriver.cpp:50:30: error: 'digitalWrite' was not declared in this scope
digitalWrite(Datapin, LOW);
RGBdriver.cpp: In member function 'void RGBdriver::DatSend(uint32_t)':
RGBdriver.cpp:81:29: error: 'HIGH' was not declared in this scope
digitalWrite(Datapin, HIGH);
RGBdriver.cpp:81:33: error: 'digitalWrite' was not declared in this scope
digitalWrite(Datapin, HIGH);
RGBdriver.cpp:85:29: error: 'LOW' was not declared in this scope
digitalWrite(Datapin, LOW);
RGBdriver.cpp:85:32: error: 'digitalWrite' was not declared in this scope
digitalWrite(Datapin, LOW);
make[1]: *** [../build/target/user/platform-6RGBdriver.o] Error 1
make: *** [user] Error 2
I’m using an grove-shield and put the LED Driver on D4.
I suppose that with the pins definition of #define CLK 2 and #define DIO 3 has to do.
#include "RGBdriver.h"
#define CLK 2//pins definitions for the driver
#define DIO 3
RGBdriver Driver(CLK,DIO);
void setup()
{
}
void loop()
{
unsigned int i;
while(1){
for(i = 0;i < 256;i ++)
{
Driver.begin(); // begin
Driver.SetColor(0,0,i); //Blue. First node data. SetColor(R,G,B)
Driver.end();
delay(10);
}
for(i = 255;i > 0;i --)
{
Driver.begin(); // begin
Driver.SetColor(0,0,i); //Blue. first node data
Driver.end();
delay(10);
}
}
}
I dont know how I can define that the LED driver is on D4 (have a button on D6 on my grove shield)?
At the moment the power circle is closed and light is shining (but I havent control over the driver to put on/off with button).
´´
// #define CLK 2//pins definitions for the driver
// #define DIO 3
Dear Community,
I solved it with Arduino Uno, Grove Base Shield and Grove LED Strip Driver and documented it here: MyPIR Sensor activate analog RGB Stripe
Thx for support!