UBTECH Alpha Servos UBT-12HC icon UBTECH Alpha Servos UBT-12HC — Control UBTECH Alpha UBT-12HC smart servos via ARC using EZ-B v4/IoTiny UART, assign virtual ports, set baud, custom bits and position mapping. Try it →
Asked — Edited
1 Participant
Problem With If

Problem With If

I was trying to script with an "if" command and in the script functions it says if (adc[port])[condiction][value]) in the sample it says if(adc(adc2)>50) and leaves out the value the text says that the value is a user defined integer Can someone give me a correct example and explain what the interger is or represents?

User-inserted image


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.

Author Avatar
PRO
Synthiam
LinkedIn Thingiverse Twitter YouTube GitHub
#1  

Put a space between parameters (Between adc(adc) and > and 50)


if (adc(adc2) > 50)
#2  

Thanks!! and happy holidays!