Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bool move;
- int direction;
- startMovement()
- move = true;
- stopMovement()
- move = false;
- changeDirection()
- button.bind('<ButtonPress-1>',start_motor)
- button.bind('<ButtonRelease-1>',stop_motor)
- root.mainloop()
- while(true) {
- if (move && KEYUP) {
- positionY++;
- } else if (move && eventtype.KEYDOWN ) {
- positionY--;
- } else if ( !move) {
- positionY = positionY;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement