Asked — Edited

Rgb Led Help Needed

Hi everyone, im having a great deal of trouble trying to sync 2 of the RGB leds i have for my robots eyes.

Just spent the last 2hrs, and some other days trying to get them to sync, so i thought it best i turn the ezb off and ask for assistance because its greatly delaying my current project...and meanwhile giving me zero confidence to start the next project for if i can't sync 2 leds... tired

Ive been close with it, but then they stray off and start to do their own thing, no matter what i do i just can't get them to join in holy matrimony.

Any help would be greatly appreciated, ive spent around 3-4 hrs total trying to figure it out as embarrassing as it is for me to say..and the more i try it seems to all go backwards and becomes much worse than when i started.


ARC Pro

Upgrade to ARC Pro

Stay on the cutting edge of robotics with ARC Pro, guaranteeing that your robot is always ahead of the game.

#41  

@PTP,

omg its 5am here now, just looked back at older replies and i never saw them PTP!

Funny thing is im very half asleep right now and my jaw dropped when i saw them...not sure what i did, but i never ever saw those replies, if i did i would have at first thanked you and then posted back with results!;)

Many many thanks for that PTP, greatly appreciated, i need to look at your posts after another coffee or2:P

#42  

@ptp,

after seeing your pics i never had them wired like that, but i also realized theres going to be too much wiring for 2 leds, ideally i really want to run 6-8 leds all up, with just 2 being rgb. I need to run 23 servos and i don't see there being any room for the leds, but please correct me if im wrong?

The coding you posted...is there a way i can just copy and paste that into the code box? I tried and it doesn't let me paste it in, so do i just manually type it in?

#43  

highlight the text, press CTRL+C to copy. open the new script, click in the script text eindoe, press CTRL+V to paste.

#45  

@PTP,

just tried running your code, all i got was blue and none of the other colors showed.

Is there something else i need to do to the code, edit something out, etc?

User-inserted image

User-inserted image

User-inserted image

User-inserted image

One of the leds looks more purple than blue i noticed. confused

#46  

I don't have RGB LED's to test with, but looking at the script in post 18, the one suggestion I would have is to increase the sleep time. It may be cycling too fast to notice the blink, but the fact that you are not blinking from orange to off but seem to be getting blue to violet makes me think you may not have the right pins connected to the right ports.

Before jumping into a script and trying to coordinate blinking, I would start by just creating a PWM slider and a Set Digital object for each of the ports and experiment with what each one does, and how they work in combination, and then take what you learn from that to adjust the script as needed (if you take notes, and tell us what the results are, we can help with the scripting, although using Blocky to learn to script is also a great exercise).

Alan

#47  

There are some people that, if they start to help someone, I don't jump in. The reason for this is that they are very knowledgeable and are able to assist in getting the issue resolved very well. PTP is one of those, along with Alan and some others. PTP is great at writing scripts, electronics, writing firmware for the EZ-B, coding plugins and a ton of other things. He will be able to assist in getting you going. Alan is also very good. I will stay out of that thread.

With that being said, is there anything else that you can be working on while waiting for the answer you are looking for? If so, don't stop here and go on to another part of the robot that needs to be completed until a solution can be provided or you find a solution. This is a minor bump for you. Don't let this be what stops you from learning and advancing.

#48  

@TTG,

many thanks for your reply.

I had the pins in the ports PTP had pictured, i then tried different ports and still had no luck.

I will look into it for my next project for sure, but the head of the robot has been changed now and recently painted so i can't change it back.

My next project is the Robi with the Lol Tiny and this is something i would really appreciate help with for syncing his eyes for emotion. Ive been using Blockly which i think is fantastic...even though im struggling to understand some of it.

Many thanks again.