Asked — Edited

Halloween Is Coming Soon

Hello To All,

This time of year my old plc controllers and arduino ends up at my friends Halloween Barn. I program a number of displays for our friends, both fiends and ghouls amusement.

This year my poor robots will become brainless for a while and two of my ezbv4's will become an addition to the party. One may run a talking head with facial tracking.

I was wondering if the object tracking mode works with an IR camera hooked to my computer? I would like to use my second ezb to run servos and a couple relays using object location and tracking (people) in the dark.

Any experiences or ideas?

Ron R


ARC Pro

Upgrade to ARC Pro

Harnessing the power of ARC Pro, your robot can be more than just a simple automated machine.

#1  

Yes, any camera recognized by windows should be able to work in ARC.

#2  

I hope it works. I assume I will have to set the contrast settings full to make it track. I will post my tests.

#3  

Hello to All,

My Madame Ninndo, the fortune teller is progressing well. I will post pictures soon.

I have built a number of Auto Position actions. I listed them in the script manager. I can run each of them by clicking the corresponding start button in the manager. Works well !

I want to activate the action by pressing a push button. Upon completion I also want to have the next action to be ready to run. Sort of like a sequencer. (FIFO) Upon the pressing of the button again, the next action will run, and upon completion advance to ready the next one. Can someone help?

I planned on using a standard push button on a digital input to be the signal. Do I need to build an anti-bounce circuit?

My scripting skills are minimal, but I want to learn.

Thanks,

Ron R

United Kingdom
#4  

Monitor the digital port with the push button on it. If it's on D0 for example


WaitUntil(d0 = true)

NB: I haven't used EZ-Script for over 6 months so my commands may be rusty, I'm unable to find the EZ-Script manual online so can't confirm WaitUntil() is a valid command or the syntax is correct.

Have a counter which increments so you can cycle through actions.


$counter = 0

Increment it each time the button is pushed


$counter++

Run the required script dependant on the counter


IF($counter = 1)
  ControlCommand...
ElseIF($counter = 2)
  ControlCommand...
...

Build in some kind of loop to avoid the counter going over the number of actions at the end of the if nest


...
ElseIF($counter > 10)
  $counter = 0
EndIF

#5  

Thanks Rich, I will give it a try.

Ron R

#6  

Hi Rich,

I wasn't able to get the script you gave me to work. I understand how it flows but must be missing something. I am trying to get some thing easy to work to learn the basics, but I am missing something.

I tried the following to confirm the input script is ok, but it doesn't work. I must not have the right code.

If (d0= true)

Sleep(500)

Say ("EZB is on") Sleep (500)

Endif

)I also tried it without the Sleep commands)

I tried WaitUntil (d0=true) but no good.

I put a digital read block to see if the input works and it does.

Do you know of any working examples anywhere ? The sequencer is the last part needed for this project, and I want to get it working by Wednesday.

Thanks

Ron R

#7  

Ron you should use the UBB code when posting things like code snippets... Try this... It waits for a digital change then executes the "if" condition...


:top
# Digital_Wait(D0, ON, 50) waits 50ms for digital change
WaitForChange(GetDigital(D0))
If(GetDigital(D0)=1) #true
Sleep(500)

Say ("EZB is on")
Sleep (500)

else #false
#do something else
endif
goto(top)

#8  

Hello Richard R,

Thanks, I will try the code.

My next step is a sequencer. This script is just to check to be sure the input works and doesn't bounce thus skipping steps.

Ron R