Just a quick update and some issues I have.
The hex that is still nameless is awesome. EZ Builder is super awesome.
Ive got the hex walking ( not quite in a straight line) and rotating left.
Ive also managed to set up a sharp IR sensor to initiate attacks.
EZ builder crashes if I use the radar but I found an IR script and adapted it for my use which kind of works.
Now you guys need to understand I have written a few basic websites in html back in the 90s and dabbled a little with arduino and have recently started looking at C++ so I am relatively new to this.
The script is supposed to initiate an attack and bite from the IR reading.
if messed with it for about a day now and it has worked on a couple of occasions but I think there are some conflicting instructions that im yet to understand with my limited knowledge of EZ Builder hierarchy and scripting.
I have added some pics to show the Standing position, the attack position and the fangs which I have yet to attach to a mini servo I have wired to the EZ-B.
So on to the Script
I have had it running and detecting the IR distance and going into attack and making sounds, it even did it once when I didnt expect it and it made me jump.
but sometimes and now every time it just disconnects the EZ-B when the IR is detected and the script keeps running.
Im kinda stabbing in the dark changing stuff around and its not working now.
here is the script:
# Bite using IR sensor on ADC port
# Adjust values below for configuration
$iradcport = ADC0 # Change for ADC Port with sensor attached
$maxirdistance = 100 # Change for maximum distance from object before biting in units
$currirdistance = GetADC($iradcport)
if ($currirdistance >= $maxirdistance)
ControlCommand ( "Auto Position", AutoPositionAction, "Attack")
ControlCommand( "Soundboard V4", Track_4 )
Ok Script dogs, tear it apart !