Asked — Edited

Using An Output On The Ez-B As A Momentary Switch Command

I am just finishing up my Wall-e project (The small wall-e) and I have left the voice module intact, i striped down the wires i need to pwr/gnd and kept two wires that when touched get wall-e's voice to work. If i touch the wires together and release them wall-e's voice module engages, so what i am looking at doing is have the EZ-B control those two wires randomly.

Can i toggle an output on the EZ-B module to act like a momentary switch ?

Tim


ARC Pro

Upgrade to ARC Pro

Your robot can be more than a simple automated machine with the power of ARC Pro!

#1  

one wire would be grd the other can be set to a D1 high(5 volts) and if you want a random output of on and off.... SetRandom(d1)....but you have to ask yourself what exactly you mean by random ..ie what time intervals..then you could add Sleep(whatever)...(1000)1 sec ...Put your lab coat on and Experiment! Wait for a lightening storm....u get the idea :)

United Kingdom
#3  

You could use the transistor switching circuit to use set digital on then off, probably best to use a script to do that part.

Schematic for transistor switching circuit; User-inserted image

Assuming it's plugged in to D0, when you use the ARC Digital Toggle, switching on will allow current to flow through the lamp, simply replace the lamp with your 2 wires.

To quickly switch it on then off use the following EZ-Script;


:start
SleepRandom(10000,60000)
Set(D0,on)
sleep(10)
Set(D0,off)
Goto (start)

Change 10000 and 60000 for whatever you prefer, 10000 is the least amount of time, being 10 seconds in this case and 60000 is max time, being 1 minute.

You may need to play with the sleep(10) command, play with it, see what works best.

United Kingdom
#4  

Second thoughts, the schematic may not be right... If you touch the wires together for it to work they should go to the emitter and collector of the transistor and the Vcc(+5v) and Ground taken out of the equation.

United Kingdom
#5  

User-inserted image Like this.

Now, when the software is set to SetDigital to on the transistor basically closes the circuit so J1 and J2 are shorted, when SetDigital is set to off it open circuits J1 & J2.

#7  

Wow, i had now idea that after i added the modules for each function, head, head tilt, arms, drive servos etc. that when i powered wall-e up he would randomly do things on his own. DJ must have random functions behind the seen.

I didn't even load the pre-programmed wall-e example. I started with a new project. It's awesome he instantly came to life, and the one thing i cannot figure out is how the voice module inside him is being triggered with the random sayings, that's why i thought i would have too hook up the two wires on the module and toggle it.

I love EZ-Robot , awesome !

Tim

#8  

Ah , i see now the personality generator. The ARC is loaded with functions wow !