Welcome to Synthiam!

Program robots using technologies created from industry experts. ARC is our free-to-use robot programming software that makes features like vision recognition, navigation and artificial intelligence easy.
Get Started

Resolved Resolved by EzAng!

Using ADC Ports

is there a possebility to use the ADC inputs for controlling a servo?
i try the micro servo a,d a HDD from ez robot.
that didn work.

Related Hardware EZ-Robot EZ-B IoTiny
AI Support Bot
Related Content
got error 

> Error on line 1: Missing String Quotes or Invalid Expression at index 0: while ( (
Done (00:00:00.0094850)
That’s JavaScript I posted. I’ll never ever post ezscript
this what i have .


// duplicate this line for other servos

Servo.setPosition(d0, Utility.map(ADC.get(ADC0), 0, 255, 1, 180));

Servo.setPosition(d1, Utility.map(ADC.get(ADC1), 0, 255, 1, 180));


lol how did you get that from my example hehe. Here you go...


while(true) {

Servo.setPosition(d0, Utility.map(ADC.get(ADC0), 0, 255, 1, 180));

Servo.setPosition(d1, Utility.map(ADC.get(ADC1), 0, 255, 1, 180));


haha i was not far off.but it doesn move the ADC0 servo.
it move head d0 and d1.
i wanted to use ADC0 and ADC1 alone
i forgot to tel i wanted to use continious servo's from ez robot on port v0 and v1
Hi Nomad, how are you and how is your new robot?

hi ezang

waiting for parts.do you have any idea how adc ports work with continious rotation?
oh does the adc only have 3 volts?
#14   — Edited
did you read the link I put on?


Steve said:
Step 1. About the ADC ports.
There are 8 ADC Ports on the EZ-B v4 numbered "A0" to "A7" that you can connect devices like analog sensors. Each ADC port contains three pins...

Ground: (output) located towards the centre of the board.

VDC: (output) The centre pin, regulated at 3.3 volts.

Signal: (input) The outermost pin from the centre of the board which reads the voltage between 0 and 3.3 volts.

The ADC ports are Configurable at 8-bit (0-255) or 12-bit (0-4095) in software.

In an ADC control found in the ARC software, such as "Read ADC", ADC reading intervals can be selected from 100 ms to 60000 millisecond analog values.

Analog readings are from 1 to 255 (0v to 3.3v) in 8 bit mode, or 0 to 4,095 in 12 bit mode.

read on

I have to leave now  - maybe Ptp or DJ can help, sorry

yes i have the link


you cant controle a servo with adc ports.

i saw it but you cant controle a servo on a adc port itself.
i wonder would a LED work? on a adc port?
Seems like you need a script:


# ADC to servo movement
$position = $value/100
$position = Round($position,0)


# / ADC to servo movement
$position = $value/100
$position = Round($position,0)
$position = Map($value, 54, 129, 180, 1 )
#adjusted first two values to read min/max read ADC project, 2nd two for direction (reverse 1 and 180).
i wanted to use contineous rotation servo's.
from NallyCat - @Nomad 6R there is a tutorial on synthiam for that, have a look at " Using ADC (Analog to Digital) Ports, Commands and Controls." by Steve G.

Looks like the one I already gave you - check

i have another question about adc ports.didn want to open another topic.
is it possible to control a LED ,excample on/off ,with an adc port?
i notest a led goes on from 3 volt.