Good explanation of the dmx protocol, thank you! For pin definitions in arduino I always use #define instead of constants, you can save a few bytes of ram that way.
#define is a preprocessor directive that will replace occurrences of the specified value prior to compilation (a bit like an automatic "search and replace"). But the value it references still has to come from somewhere - either as an immediate constant as part of an instruction, or from a program memory table, so it doesn't use any less memory than a const value declared in code (you can verify this by swapping your #defines for consts and recompiling your code - then look at the memory usage reported in the status window ;) ). And the advantages of using const are that your variable is explictly typed (and, potentially, scoped) - you're saying what it is and how it should be used, which leads to much more robust code both in terms of human-readibility and chances of unexpected behaviour.
great videos. Love how you created the chapters and they're visible in the youtube timeline. didn't even know how that was possible. going to figure that out.
I love how as he changes color on the wheel, the cameras auto WB is trying like crazy to correct it back to white. Turning off the auto WB might have helped with keeping the real color. Just found that interesting.
Could be possible to start differents effects of lights and sounds that you show in the video, using sensors, or time instead of click in the app? For me this would be very usefull, if i can make turn lights and sound on or off if the time search, for example 5:00 mins or if someone is near a door for example too
Yes, of course. Instead of using a button node to start the flow, you'd have an Arduino node that detects when a sensor pin is changed, or a Serial In node, or an MQTT message received node.... whatever you want!
Hey guys wondered if anyone had a similar problem, when i tried this I got an incomplete Input error code after it printed 1 255 3 128 in the serial monitor . Thanks in advance.
When sending a message from the serial I'm getting a "EmptyInput" error coming up after the output info appears, Does anyone know how to fix this? I'm currently using the CQRobot DMX Shield MAX485.
solved it was due to not having the jumpers in the correct position, if anyone else is in this positon, make sure your tx and rx jumpers are tx-10 and rx-10 position, the slave/de is on the DE side, and the EN/EN over score is towards the EN side.
When I send the json text via serial it has the same behaviour as the tutorial but _also_ prints this: *deserializeJson() failed: EmptyInput* Any idea to fix this? (I have no line ending configured like the tutorial)
I'd been getting this error every time too, and the issue was when I copy and pasted the values from the serial monitor, it was putting an extra space after the last { Double check that there's no space and I think it won't have that error.
Can you send color information to just one of the lights (or different informations - one lamp red, the other blue) or do they have in separate dmx-lines then?
Every device only has a single physical DMX line-in connected to it, but they typically have an "offset" that you can set which is the DMX channel that they start listening from. So let's say you have two lights, each of which had 3 DMX channel inputs: RGB. If they both listened with an offset of 0, then setting channels 1, 2, 3 would control the RGB channels of both lights together. But if you set the offset of the second light to "3", then its RGB components would be set by channels 4,5,6 instead. And if you had an offset of 1, then Channel 3 would set the B component of the first light, but the R component of the second light, say.