Problems with my BS2
Agent Cobalt
Posts: 88
Before I begin, thank you to anyone who helps me out. I'm using a TAB robot kit for my engineering final project. It has 7 LEDs, and an output to an LM386 audio amplifier. I wrote code to blink the LEDs on and off pseudo-randomly as the Stamp is outputting a simple Christmas tune. The problem is, the LEDs are behaving rather strange and in a matter that is unwanted. Two of the LEDs are bi-color. Here's what's happening. The LEDs are blinking on and off randomly, but their intensity is varying randomly as well. The two bi-color LEDs are switching colors (unwantedly) and varying their intensity as well. I've tried disconnecting some of the LEDs (current draw) as well as the amplifier circuit, but the LEDs keep behaving the same way. I'm also using a 470 ohm LED. If anyone can offer any help, it would be appreciated as the presentation of our projects is in 7 hours and I need sleep beforehand.
LED Flasher code:
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Truth can be dangerous... Trust can be deadly.
LED Flasher code:
rndVal VAR Byte Init: OUTL = %00000000 DIRL = %11111111 Main: RANDOM rndVal OUTL = rndVal // 128 PAUSE 250 GOTO Main
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Truth can be dangerous... Trust can be deadly.
Comments
Adding to what Forrest has already said (my presumption as well - power supply problem), you might consider adding a separate power supply (additional battery pack), remembering to connect both grounds together, and use that for powering your LED's.
Regards,
Bruce Bates
blink 1 led on and off for a few seconds
then 2 then 3 etc...
If its power, this will show
Also , I am not familiar with the robot, but if you wired your LED's do they all have their own resistors?
Perhaps the LED wiring is not correct.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Truth can be dangerous... Trust can be deadly.