Asked — Edited
just a quick question and I'm sure it will be simple. what I'm looking for is something to count how many times a switch closes. is there something in ez builder? i want to use a switch to count wheel rotation, kinda like a encoder.
Upgrade to ARC Pro
Become a Synthiam ARC Pro subscriber to unleash the power of easy and powerful robot programming
Based on your post activity, we found some content that may be interesting to you. Explore these other tutorials and community conversations.
1) You will need to add external hardware:
2) add some EZ-Script to handle the external hardware.
1) You could use a hardware interrupt from a dedicated pcb, such as arduino. And connect the Arduino to the ez-b. This is because the EZ-B is already doing a significant amount of i/o processing with video, audio, wifi, servos, etc.. So offloading the counting to an arduino will work great. Send the count data to the
2) If the rotation is slow (i.e. < 2 / second), then you can use an EZ-B v4.x/2 or IoTiny without additional hardware and simply read the digital port. If you have an onboard computer in the robot, this rotation count speed can be increased dramatically by using a USB<->Serial connection to the ez-b
3) Use a third party motor controller with built-in encoder to offload the work, such as a Sabertooth with Kangaroo.
Obviously #2 is the easiest because it doesn't require additional hardware.
I've seen the arduino encoder post. DJ, I do have a on board pc and the ezb4 running on usb. I might try option #2. I was just trying something easy.
thank you all.