@krisztian
Hi krisztian,
the singleLED board - as its name suggests - features only one LED output. If you want to have a setup with multiple LED strips you need to design a board with multiple outputs. I have already designed a board with 4 outputs, but I haven't built it.
In terms of software you need to register multiple sensors in your program like this:
#define numCh 4 //the number of outputs
const byte ledPins[] = {9,6,5,3};
byte ledLevel[numCh];
boolean ledDimWay[numCh];
//in the setup function request the dim levels from the gateway
for(byte i=0; i<numCh; i++) request(i, V_DIMMER);
//in the presentation function register multiple lights
for(byte i=0; i<numCh; i++) present(i, S_DIMMER);
//if you receive a signal, you need to check for the sensor id
setLED(message.sensor, requestedLevel);
//to set the LED level (function: setLED) you need to use the sensor id to determine brightness and pin
//Fade LED to set level
int delta = (level - ledLevel[child]) < 0 ? -1 : 1;
//Write to LED
analogWrite(ledPins[child], map(ledLevel[child],0,100,0,255));
I will probably publish the whole code once I have built and tested the 4LED controller (i call it "MySensors rainbowLED")
Hope I could help you
ThetaDev
Added sketch, which also supports an additional mini PIR sensor. It's what I needed, you can comment to #define out.
Also changed the regulator to a smaller one, which supplies up to 100 milli Amp, which is plenty enough. That way I can keep the circuit smaller on the PCB. Which allows me to create a smaller housing.
New to electronics and progamming.... hence excuse rather dumb nature of my query .. recently purchase the Devduino V2.2 OTA version and am trying to figure out if the device comes pre loaded with the arduino bootloader. ??
@HouseIOT Sorry to trouble you, i use a mysensors-wifi-gateway with protocol 2.1.1 , and my homeautomation is home-assistant. I can't use your dimmer in my system.
After read the reference, there need to add V-percentage and V-status in the code, as a newbie , I can't do it myself. So I wondered,can you do me a favor?
Thanks a lot.
@mr_red
I have a zipped snapshot of all the 3d step/wrl models that I used to build my projects so far. It was quite some work to gather them all and align with the footprints using the kicad stepup tools. It's not complete - still needs some more work:simple_smile: but it should help you or anyone else to get started into MCAD integration using FreeCAD and kicad stepup tools. Maybe it's not very easy to start when using free tools but hey they are "FREE" so we cannot ask for more. But the nice thing is that once you get used it will be really easy to do your stuff and to go forward. Oh and FreeCAD can be so powerful after you learn it - I was really amazed what you can do with it(it has it's quirks and downsides but once you master it - oh, well...).
There's also: https://www.onshape.com/ - pretty powerful this one too and it has more advanced features than FreeCAD but the downside is that it's a cloud based solution: it's free for public documents but you never know when they will go to paid accounts only so yeah...I don't really like the idea to depend on something that it's hosted and the application is not on my PC along with the documents that I create with it. Cloud solutions have their flexibility but you're locked and you depend entirely on that hosted service.
Ok, enough talking...I uploaded the zip file here: http://www.mediafire.com/file/kzh1l9uo40cpj1u/kicad_stepup_packages.zip
Hi,
I finally received the boards from the manufacturer(big thanks to @Seeed-Fusion). I manage to assemble one board by soldering the components and such and...it WORKS(including OTA)! I will post the instructions on openhardware.io project page.