Not satisfied with the brightness of the bicolour LED I have lowered the values of the resistors but unfortunately the load was too high for the pin 13 (clock of the HC596) because this pin have already an LED internally.
I have used a neopixel on the pin DATA but it did not worked well because the colour of the neopixel kept changing with the normal data flux (to the HC595). I did nod expected that because the timing is completely different from what the neopixel expects.
I have used then the only remaining pin - TX that so far I have saved for debugging. The solution was to use the #ifdef and #ifundef directives to select either print the debug data on the serial terminal or drive the neopixel
#define _LED 1
// #define DEBUG // uncomment this line to debug on serial
#ifndef DEBUG
Adafruit_NeoPixel pixels(1, _LED, NEO_GRB + NEO_KHZ800);
#endif
...
#ifdef DEBUG
Serial.begin(9600);
Serial.println("Debug");
#endif
...
I have updated the schematics and the PCB to include the changes.

Video showing the mode change
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.