@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
Does anybody have a link to a fixed version of this board? It's exactly what I am looking for form-wise, but I'd be nice if VCC was wired to 3.3v out of the box. Thanks!!
@zmatokan said in NModule:
@Nca78 Are you still working on this pcbs? i think it would be great to add a version that supports HiLink 220ac->5dc module on powerboard.
No I'm not working on NModules anymore, I have a few old nodes using atmega/nrf24 but I switched to NRF5 for "basic" nodes now, and to ESP32 for more "advanced" stuff.
NModule was designed for beginner and simple/riskless use, so I don't think adding high voltage option is a great idea, it's better to use an external power supply and connect the output to the powerboard.
Welcome to the club!
Regarding radio's: The RFM69's with a C in the type have a smaller form factor (which is pin compatible with the predecessor RFM12B). The the 'W' and "HW' versions are larger in size and have more programmable pins (which MySensors does not use) but have exactly the same functionality within MyS.
All the footprints on the boards available in OpenHardware.io are for the 'W' and 'HW' versions so I'd go with one of these.
The 'W' uses way less power than the 'HW' which would be good the for the battery life of your nodes. Sensors powered by the grid can be 'HW', but usually, in the house a 'W' delivers enough TX power to get the message across. It might be a good idea to make your gateway with a 'HW'.
Hope this gets you a bit further. Good luck and show us your results!