I am very new to codeing and was wondering if there was a way to easily change what the encoders do. I would like to be able to make one do intensity and one color as I don’t need to use pan and tilt.
This is for Lighthack box one of that helps!
Here is a code of my project which allow using next/last button to toggle thru a parameter list. It is limited because of USB of Arduino.Try it and let me know if works.5432.lighthack_box_2.zip
Ok thanks! I’ll give it a try tonight!
So I just tried it and it somewhat works. So right now only red and blue can be controlled for some reason. Like for intensity for example it shows the current intensity but it can’t be changed... If there is a way for all the parameters to work please let me know!
Good to know, I will investigate the next days. Thank you for the fast response.
I found the general problem. The code works on a Teensy 3.5 with no problems.The problem is the slow USB of the Arduino UNO. I will have a look how to make some improvements.
The only way I found to get the code running is using PlatformIO https://platformio.org instead of the Arduino IDE.There I can change the size of the ring buffer of Serial as a compiler option. Let me know if I should send the project file.Maybe you can also change manual the size in HardwareSerial.h of the Arduino IDE in line 51 and 53 to SERIAL_RX_BUFFER_SIZE 256
I forgot, maybe the code will work on an Arduino Leonardo board. I will test it tomorrow.
The code works for Arduino Leonardo boards or other with an Atmel 32u4 chip without problems.
Ok thanks. I have an UNO so that could be why. Could you possibly send me those files though.
Here is the code for use with platformIO#lighthack box2.zip
im getting a compile error at line 203 'int8_t index' redeclared as different kind of symbol
so im running 1.8.8 ide and a teensy 3.6 every time i try to verify i get the above error. but if i switch to something like a nano or uno and verify it goes through with no error.
Is this with an unmodified light hack sketch? I'm currently on 1.8.7 IDE and not getting any errors on a build for teensy 3.6.
I realized you were working with the box2 code. I got the same error compiling for teensy. "index" is used in a library for teensy somewhere else is in that code it is a char instead of an int. I simple changed the name from index to attribIndex wherever appropriate and the code compiled. I haven't tested it on any teensy hardware yet but will attempt that sometime this weekend.
Hope this helps.