Ireland
Asked — Edited

Adc ?

Having a problem reading adc

Using the following script

if (adc(adc0) > 10 ) servo(d1,29)

adc0 shows full 5.volts but no change in servo value ?

am I using incorrect commands ?


ARC Pro

Upgrade to ARC Pro

Unleash your robot's full potential with the cutting-edge features and intuitive programming offered by Synthiam ARC Pro.

United Kingdom
#1  

Possibly fixed now with the latest version Here

Ireland
#2  

@winstn60 Thanks for reply Downloaded latest version , but no success

the "wait" command works ok ?

Pat

latest update Works but is not reading values properly

confused

PRO
Synthiam
#3  

I've tested this and it works. What are you experiencing?

Ireland
#4  

at present my script reads

if (adc(adc0) > 10 ) servo(d1,29)

voltage 5v on adc0 graph

but servo does not register in debug

same in <

getadc(adc0)
reads value ok

PRO
Synthiam
#5  

The documentation is incorrect. It is GetADC(adc0)

Ireland
#6  

Thanks Dj

Sorry I may not be explaining it clearly


This is the script I entered

GetADC(adco) If (ADC(ADC0) > 5) Servo(d1, 29)

when I run this is the debug reply

Start GetADC(adc0) 134 If (ADC(ADC0) > 1) Done

as you can see adc value is 134 , Get command responds ok but " If " Statement does not


script two example

GetADC(adc) If (ADC(ADCO) < 1) servo(d1,29)

When I run this is the debug repy

Start GetADC(adco) 134 If (ADC(ADC0) < 1) servo(d1,29) Done

Get, responds with correct value , but " iF " statememt even though its not true , it moves the servo

Hope I have outlined it a little clearer

pat

PRO
Synthiam
#7  

Again, the script manual was incorrect for the IF condition. The syntax is


if (GetADC(adc0) < 1)
  print("It is less than one")

Get the latest ARC and notice the manual has been updated. The manual was incorrect. The proper command is GetADC().

Ireland
#8  

Thank you Dj Dowloaded update and entered new commands all works very well. excellent

Take the remainder of the day off !

Ez-b is no 1

nothing comes near.

Pat