Welcome to Synthiam!

The easiest way to program the most powerful robots. Use technologies by leading industry experts. ARC is a free-to-use robot programming software that makes servo automation, computer vision, autonomous navigation, and artificial intelligence easy.

Get Started
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.


Upgrade to ARC Pro

Your robot can be more than a simple automated machine with the power of ARC Pro!

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).

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.

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.
Just to clarify, the script in post #18 is the one you should try, and it is specific for a common anode LED's which we think is what you have. It won't work for common cathode LED's, and in fact, seeing nothing but blue may be exactly what you would get from that (again, I don't have any to play with, but it kind of fits the symptom), thus my suggestion of testing the ports directly with controls before trying to script.

The code in post #15 is not a script, it is a listing of the individual relevant script commands. Trying to run that will absolutely not work.


thanks so much. Im very hard on myself, and not being able to do what i wanted really deflated me for ive seen others robots with their rgb eyes perfectly in sync here.

Ive been working on many other things, building a humanoid for the first time is actually quite a task, well i wouldn't call building a robot a task, its too much fun to call it that..but that programming yes what a task...but i built it from scratch and it has been a blast to build, but very time consuming, you build it, strip it down, mock things up, remove, cut, trim, trial and error...i love all that, but having trouble programming something you want so badly to come to life, and spending hours trying and not getting anywhere is deflating...but i have to remember i only joined here 2 months ago...i think im expecting way too much way too soon...you guys agree..?


ah i see....omg no wonder it wasn't working...hehe.

Im going to have my humanoid finished by this weekend, so will start a Robi thread next week and will be asking for assistance for that, thanks very much again for your help TTG.
Programming is simply a different mindset than building. I am a better programmer than builder, so I have been focusing on Building more than programming lately. I enjoy the building because it is on the fringe of my knowledge. Programming is understood so it becomes boring for me most of the time. I could get better at it for sure, but the building is setting there waiting for my attention.

It is easy to see results when building. It is not as easy to see results when programming so it feels like you slow down. Believe me when I say that you have the right platform for programming your robot. It just takes time to understand how to script things together properly.

Copying and pasting code is probably the best way to stay unfamiliar with programming. I tell my guys this all of the time. It is better to take the time to type out the code and try to understand what is going on while you are typing it. This will get you more familiar with the language much more quickly than copying and pasting it. Copy/paste is a quick solution to a problem, but it isn't the right solution to the problem, and often times isn't the correct solution to the problem.

Start with something familiar, learn the syntax and then push yourself to learn more. Its a process, but definitely doable.


you guys agree..?

Yup... I have been here 4 years, and am still mostly playing with Revolution bots. I have grand plans to make a robot steampunk dog from scratch, but every time I think I am ready to start, I see someone do something new and incredible here and rethink all of my plans. However, that means I have been able to spend a lot of time learning the programming and scripting, which is my core competency, while I slowly learn the construction and electronics, neither of which I have much experience in.

For instance, when I started, I could barely solder two wires together, I have now added a laser diode to my Roli's camera, which required both a 5v regulator and a transistor since it needed higher voltage, and higher amperage than the EZ-B digital port could provide, but lower voltage than the 7.4 v LiPo powering the robot. I used a combination of different posts and tutorials here to figure out how to build and program it.

Start things in little steps to understand how each part works, then take on the big task. Like with your RGB LED. Figure out how to get one to light in every color and how to control the brightness, then building a script to coordinate two of them together will be easy because you will understand what every line of the script does, and when it needs to execute.


100% agree with that, i use Linux and teached myself terminal commands which i like to use time to time, i type them out from memory now...if i could do that with programming that would be fantastic.

When you said i have the right platform for programming your robot...do you mean the Blockly interface, ARC?


yes i keep telling myself baby steps, but forget all too easily it seems. :P

Thanks for your help, im not going to showcase my first project, but for Robi i will and will ask for help then. At least for now i have one led(red) for an eye....i can control the brightness of it, thats something at least...oh my.:)
ARC in General. Here is why I say this. There is a level of progression that you can benefit from.


I know of no other platform that allows you to start from no knowledge of programming through some advanced programming. At first, there was only scripting. Those who have been around here a long time prefer to use scripting because that is what we learned with. Now, you can be eased into Scripting, but for those programmers out there, you can make ARC into anything you want it to be by the use of plugins.
I been on and off with conference calls...

Thanks for the kind words, although i don't have:


while (!isSolved)

in other words i don't own an exclusive lock for this thread:)
So feel free to jump in, correct me or suggest other ideas:) sometimes i fail to identify very simple details, and i always go for inner details:)

Alan's suggestions are good, instead of jumping to script you can try:
1) ON/OFF control to identify the led color legs
2) Once you know the leg color, wire them in a logic way, e.g. RGB (Red,Green,Blue) to ports D0,D1,D2. (is easy to remember a sequence) also combine the cable colors.

For example, i try to keep red and black for power, and blend colors (white,yellow,grey) for input signals and strong colors (brown, blue, green, purple) for output signals, that way i know easily connecting two strong colors (two outputs) can cause a short-circuit.

So colors, sequences, etc help you to remember.

3) with 3 on/off controls you can toggle 7 (2^3 -1) different combinations/colors
4) add 3 pwm slider controls one for each port, now you can control the color brightness, now you will have more colors.

if everything is good, start with the second RGB led.

Scripting is a different thing, try first the visual tools (Blocky), to visualize control flow, individual actions etc.

Only then you should start with the EZ-Script tutorials.
I'll share view about robots:

Start with EZ-B, follow all the relevant tutorials and aim low your expectations or in other words define your goals only after you learn/accomplish something.

First you need to build your confidence, you need hands-on, try-failure-success.

The first time i bought a robot kit (6 years ago) i had huge expectations:
navigate around the house, use the arm to pickup stuff, talk, voice recognition etc etc.

After i assembled and i run the first script, the robot could not drive a straight line, then i could not combine an IR Remote with a servo within the same micro-controller, than my code logic was to slow... etc etc.

So after 3 months i gave up, without knowing anything about the platform, i thought everything was easy and plug play.

Fast forward to the present moment, EZ-Robot makes your life Easy ...

but the reality is: robotics is more software than hardware, so after a few hardware combinations you need to use software (scripting, blocky) whatever to reach your goals.

And bear in mind some goals are very difficult or almost impossible without extra hardware/software.

Robot navigation, localization, object recognition, voice recognition are very difficult tasks you will need special/paid services to get there.
Glad you are getting help with this. There is some very good advice in this thread.
Keep your head up, you are getting there. If I can do it, you can. There is no easier way to learn than with EZB and experimenting.

your awesome thanks so much.:):)

My confidence is nowhere at the moment, so i need to re-establish that and then things will become more clear. I will certainly be trying that for my next project and wont stop until its done.;)


many thanks, these replies have helped me a great deal now, can feel the motivation seeping back in. I feel like doing my first project thread now, but would feel stupid doing so also, so best to wait until its at least 90% finished...but then again in the world robotics...define 90%?:P

howmany volts are your rgb leds ?

i just notest mine are 12 volts.
Im not sure Nomad. but they aren't 12v..the ezb has the resistors in there, so they are regulated to 3.3v i think.

Im going with a single red led for now Nomad, but for Robi i will need to get his eyes well and truly sorted out so they express emotion.;)

I wiil start a build thread for it soon.:)
i try ptp config

D0=RED RED ( anode ) analoge top

D4=RED red ( anode ) analoge below

i tested first all colors whit 3 volt batt and put same color wire on.
what i have is the leds dont go out and have diff collors same time?
i have 3 volt rgb leds.

here is the config from ptp but in easy way.

User-inserted image

i used this picture.

and here a video


thanks for that, will surely try it for project #2.;)

glad you like it.;)