My goal is to flash lights around the house on and off to the beat of a song.
When doing this with a mini LED and an arduino, it works perfectly with a "flash_time" of ~.1 seconds.
This means every .1 seconds a new signal (1 or 0) is passed from the arduino digital pin 3 based on a numerical analysis of the song data I preformed previously.
However, I tried it with a solid state relay and a strobe lights and its not working.
The problem is, I can't flash on and off the lights every .1 seconds. In fact, from testing it, the most I can do is ~every 1 second on and .2 seconds off. Otherwise, the "on" information is too late getting to the lights and finally turning on when it is supposed to be off, and this delay increments making the whole thing a mess.
Hardware:
Lights - LE Globe String Lights with Timer, 33ft 100 LED, Multicolor, Plug in Twinkle Light, 8 Modes
Arduino clone - Elegoo EL-CB-001 UNO R3 Board ATmega328P ATMEGA16U2
In regards to the code, I used Python through Pyfirmata:
from pyfirmata import Arduino, util
from time import sleep
pin=3
board=Arduino('COM3')
ledPin=board.get_pin(f'd:{pin}:p') #digital, pin, pwm
it = util.Iterator(board)
it.start()
for i in range(10):
ledPin.write(1)
sleep(1) #these values I adjusted and visually determined the minimum
ledPin.write(0)
sleep(.2)
Clearly, I am new to electronics. So please try to spell out all terminology and concepts the best you can.