
Jaychadw
United Kingdom
Asked
— Edited
Is it possible to add a push button switch, even going as basic as two wires that connect via pushing. Also how do I add a variable resistor. Also will a basic dimmer switch work as a variable resistor? I know these may seem like really daft questions but it helps me alot. Can someone please talk me through it.
Same for the resistor really.
As for digital switch, yes. Easy. 2 ways to do it, either on the Digital ports or the Analogue.
Analogue, simply put the switch between Signal and Vcc. When it's closed and makes contact it will send 5V to signal giving an ADC value of 255. GetADC(adcport) will give the result.
Digital, almost the same but it's 0 or 1 and can use the Digital Read control or script function.
Script examples;
Code:
Code:
Code:
Code:
I've even had great success at ramping the start up and stop of rotation by adding multiple PWM commands, one a little higher then the preceding one at the same time I send the variable command to the movement script. I still need to refine the process. Seems a smaller radius needs different tweaking then a mush larger one. Here's an Example:
Code:
I still need to sit down and clean up all my scripts and my entire B9 project. I have lots of unneeded lines and controlls and junk everywhere. I also need to move my scripts over to the Script Manager but everything seems to be working well for now. I have a lot of actual wrench turning to to on the robot it's self and work on ARC when I want a break or want to see him gain more personality.
Your free to use any of my scripts and I'll help if I can (if I see your post). Rich seems to be the script master around here. In fact I was thinking of asking him to go over my scripts when I cleaned them up a bit to see if there were any way to make them better.
Here's a link to my project thread with lots of pics and vids (including lots of the pots and how they work):
My B9 project
Here's the latest copy of my project:
B9RobotControl.EZB
Good luck and have fun!
Dave Schulpius