Programs for basic stamp
Specially, for the specific purpose of my question, I am interested in knowing the decision time associated to a AND linking. For example taken from page 78 of "What is a Microcontroller? The reason why I ask this question is because: It is practically impossible to know for sure that two different pins have been pressed at an exact same time; often time the pins are not pressed at an exact same time, and this to me can make a huge difference.
Again, your expertise will be greatly appreciated. What are you trying to please give an example It is practically impossible to know for sure that two different pins have been pressed at an exact same time; often time the pins are not pressed at an exact same time, and this to me can make a huge difference. Sir, I would like to know the maximum amount of time difference between say, the moment pin3 is high and the moment pin4 is high That will still cause the Basic Stamp to report or sense that both pins are high.
Thank you in advance. This link will point you the right direction. You didn't mention specifically which BS you are using, but the link will give you some ideas. The BS is so fast it will be nearly impossible to push the buttons at the same time If you press both buttons seemingly at the same time, but to the Stamp it sees a 20us difference between the two When the first button is pressed, the BS sees it, but it runs the check again because they're not both pressed and keeps checking until they are THEN prints "Both buttons pressed!
Um, that was stupid. Sorry Sam is right. I'll edit the code. Dear Sir, First and foremost, Thank you for your continuous help. The PWM instruction sends out pulse-width modulated signals. Instructions like these can make it a lot easier to attach controls and motors to the Stamp. See the documentation for the language for details. Sign up for our Newsletter! Mobile Newsletter banner close.
Mobile Newsletter chat close. Mobile Newsletter chat dots. Mobile Newsletter chat avatar. Some lines of the program are created automatically by clicking buttons on the toolbar. Other lines are made by typing them in from the keyboard.
If you try to type in these parts of your program, you may accidentally use parentheses or square brackets [ ]. If you do this, your program will not work. If you are using some other pin BASIC Stamp model instead of a BS2, you can still follow the activities here and in any Stamps in Class text, but you will need to adjust all time-sensitive commands or they will not work properly.
The figure below shows the Debug Terminal that should appear when the download is complete. Every time you press and release it, the program will re-run, and you will see another copy of the message displayed in the Debug Terminal.
You can also click the Run button. The flyover help the Run hint will appear if you point at the Run button with your mouse. You can get similar hints to find out what the other buttons do by pointing at them too.
0コメント