Physical Computing Digital Input Activities

physical computing n.w
1 / 19
Embed
Share

"Explore digital input concepts in physical computing with activities such as reading tactile switches, checking switch states, and interfacing evive with PictoBlox. Learn how to create interactive projects like making Tobi rotate when a switch is pressed."

  • Physical Computing
  • Digital Input
  • Tactile Switches
  • Evive
  • PictoBlox

Uploaded on | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

E N D

Presentation Transcript


  1. Physical Computing Digital Input

  2. Digital Input 2

  3. Digital Input Using read digital pin () block, you can check the digital state of the pin. 1. It returns 1 if pin is HIGH 2. It returns 0, if pin is LOW 3

  4. Reading State of Tactile Switch 4

  5. Reading State of Tactile Switch evive has 2 tactile switches which are internally connected to digital pin 38 and 39. When the switch is pressed, the voltage on the pin is HIGH and when it is not pressed, voltage is LOW. 5

  6. Reading State of Tactile Switch Tactile switch () pressed? is an eviveblockand aBoolean block. This block checks if either of them is pressed. The switch whose state you want to check can be chosen from the drop-down menu on this block. It returns true if the switch is pressed and false if the switch is not pressed. 6

  7. Activity: Making Tobi Rotate when Switch 1 is Pressed 7

  8. Interfacing evive with PictoBlox Connect evive to your laptop/PC and open PictoBlox. In PictoBlox, go to the menu and click on the Boards Select the evive. 8

  9. Interfacing evive with PictoBlox Once you ve selected the board, click on the Connect tab and connect the board. 9

  10. Upload Firmware You have to upload the firmware into the device before interacting with it. Click on Upload Firmware button. Once you successfully uploaded the firmware you will see evive logo on evive display. 10

  11. Tobi Rotate In this program, you have to make Tobi rotate when you press tactile switch 1. First try to do it yourself. 11

  12. Tobi Rotate In this program, you have to make Tobi rotate when you press tactile switch 1. Assignment: Add script for making Tobi rotate anticlockwise when switch 2 is pressed. 12

  13. Reading State of Slide Switch 13

  14. Reading State of Slide Switch evive has two slide switches both of which have 3 states : Slide up (state 1) Slide down (state 2) Middle (OFF) 14

  15. Reading State of Slide Switch Slide switch () is in the state ()? is an eviveblockand aBoolean block. The block check takes the slide switch number (1 or 2) and state to be checked for (Up or Down) as input and returns True if the slide switch is in the specified state and False if it is not in the specified state. Slide switch is mostly used to change the mode of operation, like direction of the motor, or mode of the game. 15

  16. Activity: Slide Switch Mode Example 16

  17. Slide Switch Mode Example In this activity, you have make a script where the motion of Tobi has 3 modes: When tactile switch 1 is pressed, Tobi will move by 10 steps. When tactile switch 1 is pressed, Tobi will turn by 90 degrees. When tactile switch 1 is pressed, Tobi will do nothing. You have to use slide switch to change the mode of operation. 17

  18. Slide Switch Mode Example This one of the many solutions. 18

  19. 19

More Related Content