Asked

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-B IoTiny
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.
Start
> Error on line 1: Missing String Quotes or Invalid Expression at index 0: while ( (
Done (00:00:00.0094850)
while(0)(true)
while(1)(true)
{
// 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));
sleep(100);
}
Code:
it move head d0 and d1.
i wanted to use ADC0 and ADC1 alone
EzAng
waiting for parts.do you have any idea how adc ports work with continious rotation?
here is another like from site:
https://synthiam.com/Community/Tutorials/Using-ADC-Analog-to-Digital-Ports-Commands-and-Controls-16283
https://synthiam.com/Community/Tutorials/Using-ADC-Analog-to-Digital-Ports-Commands-and-Controls-16283
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
thanks
you cant controle a servo with adc ports.
thanks
Using ADC (Analog to Digital) Ports, Commands and Controls.
Step 5. Step 4. Controlling servos with sensors and ADC ports.
i wonder would a LED work? on a adc port?
https://synthiam.com/Community/Questions/Adc-Value-To-Servo-Movement-9783
Rich:
# ADC to servo movement
:loop
$value=GetADC(ADC0)
$position = $value/100
$position = Round($position,0)
Servo(D1,$position)
Sleep(250)
Goto(loop)
Or
# / ADC to servo movement
:loop
$value=GetADC(ADC0)
$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).
Servo(D0,$position)
Sleep(250)
Goto(loop)
Looks like the one I already gave you - check
EzAng
is it possible to control a LED ,excample on/off ,with an adc port?
i notest a led goes on from 3 volt.