Showing posts with label Python. Show all posts
Showing posts with label Python. Show all posts

Monday, January 7, 2092

Mechatronics Engineering Google Site (Pinned Post)

Is it Summer Time? Then you are going to want to CLICK HERE... This is where I'm going to post for Summer Activities, Lessons and Projects...



Where to start:  -  Mechatronics Engineering Google Site

How can you help my Mechatronics Engineering class?
Special Announcements: 

Tuesday, March 19, 2019

Tuesday March 19, 2019 - Shell Scripts in Python

Entry Ticket - Dive into chatbots- a beginner hands on workshop

Challenge - Extra Credit -  using linux command line or Python code can you copy a file from your Raspberry Pi to your google drive?  Can you copy one from your google drive to your Raspbeery Pi?

 Instructables - Photo Booth
See - https://www.raspberrypi-spy.co.uk/2012/06/simple-guide-to-the-rpi-gpio-header-and-pins/

See Lesson 4 for Setting up the Video
https://www.instructables.com/lesson/Navigate-the-Raspberry-Pis-Software-Part-2/
run
 sudo apt-get update
 sudo apt-get install imagemagick
 
run the nano text editor
 nano helloMe.sh 
in the editor type
  #!/bin/sh
  raspistill -w 800 -h 600 -t 10000 -tl 2000 -o image%02d.jpg
  convert -delay 10 -loop 0 image*.jpg animateMe.gif 


See lesson 5 for Setting up the Audio
https://www.instructables.com/lesson/Intro-to-Sonic-Pi-and-Playing-Media/

in the command shell run
  amixer cset numid=3 1
 
then run 
 sudo apt-get install mpg321 -y

to paly a mp3 file run
  mpg321 fileName.mp3
 
See lesson 6 for Scripting
 https://www.instructables.com/lesson/Intro-to-Python/


The GPIO.BOARD option specifies that you are referring to the pins by the number of the pin the the plug - i.e the numbers printed on the board (e.g. P1) and in the middle of the diagrams below.
The GPIO.BCM option means that you are referring to the pins by the "Broadcom SOC channel" number, these are the numbers after "GPIO" in the green rectangles around the outside of the below diagrams:
Unfortunately the BCM numbers changed between versions of the Pi1 Model B, and you'll need to work out which one you have guide here. So it may be safer to use the BOARD numbers if you are going to use more than one Raspberry Pi in a project.
#GPIO
# 3.3v = 1,17, 5.0v =2,4 GND = 6,9,14,20,25,30,34,39
# my LED is on Pin 3 and Ground is on Pin 6
import RPi.GPIO as GPIO
from time import sleep # import time library 
GPIO.setmode(GPIO.BOARD)
myOutLED = 3
myInputSwitch = 5
GPIO.setup(myOutLED, GPIO.OUT)
GPIO.setup(myInputSwitch, GPIO.IN)
while True :
    inputState = GPIO.input(myInputSwitch)
    print(inputState)
    if inputState == False:
        print('button pressed')
        photoCounter=4
        while (photoCounter > 0):
            GPIO.output(myOutLED, True)
            print('  LED ON')
            sleep(1)
            GPIO.output(myOutLED, False)
            print('  LED OFF')
            sleep(1)
            photoCounter=photoCounter-1

GPIO.cleanup()
Open LAB  and/or Robot Club 
  • LAB - Duration: 60 Min
  • Link: Robot Club Google Sites
  • Instructions & Expectations: Connect with your Robot Club Team.  You will either be working on your Robot Project or an Open Lab Project.  
    • You will need to account for your time. You will need to convince me by your form submission that you worked given the time allotted. 
    • If  you or your Robot Club Team worked on the Robot Club project, you will make sure your Robot Project Status Google docs are updated.  
    • If you worked on an Open Lab Project, you will also need to tell me about what you accomplished and what you are planning next.
  • How to Submit Assignment:   Each Student needs to account for your time.  
  • Dig Deeper: Open Lab:
Clean Up
  • Assignment - Duration: 2-10 Min
  • Instructions & Expectations: Desk cleanup, put away all projects, find your assigned job
  • How to Submit Assignment: When Complete, check yourself off on Sign Out Sheet - 2 Points

Wednesday, March 13, 2019

Wednesday March 13, 2019 - More Slefies

Instructables - Photo Booth
  • Lecture/Presentation - Duration: 40 Min
  • Link: https://www.instructables.com/class/Raspberry-Pi-Class/
  • Instructions & Expectations: Listen and take notes in your Interactive Lab Book. If needed review the posted slide presentation
  • Dig Deeper: Look here to learn more...

Open LAB  and/or Robot Club 
  • LAB - Duration: 60 Min
  • Link: Robot Club Google Sites
  • Instructions & Expectations: Connect with your Robot Club Team.  You will either be working on your Robot Project or an Open Lab Project.  
    • You will need to account for your time. You will need to convince me by your form submission that you worked given the time allotted. 
    • If  you or your Robot Club Team worked on the Robot Club project, you will make sure your Robot Project Status Google docs are updated.  
    • If you worked on an Open Lab Project, you will also need to tell me about what you accomplished and what you are planning next.
  • How to Submit Assignment:   Each Student needs to account for your time.  
  • Dig Deeper: Open Lab:
Clean Up
  • Assignment - Duration: 2-10 Min
  • Instructions & Expectations: Desk cleanup, put away all projects, find your assigned job
  • How to Submit Assignment: When Complete, check yourself off on Sign Out Sheet - 2 Points

Friday, March 8, 2019

Friday March 8, 2019 - Writing .txt files in python

Entry Ticket - House Keeping
  • LinkedIn - Job and Internship Opportunities
    • Message me on LinkedIn if you would want to hear about Job or Internship opportunities
  • Donors Choose - Pools and Batteries
Mechatronics Engineering Plan For Today:
  • Entry Ticket 
  • Python - Reading Files
  • Open Lab
  • Clean Up




Python - Files

Python - Files
  • LAB - Duration: 60 Min
  • Link: Pythonlearn-07-Files
    • Python  Files
      • Open the mbox-short
      • find all the emails
      • write them to a file
      • the out put should just be a list of emails one each line:
stephen.marquard@uct.ac.za
postmaster@collab.sakaiproject.org
200801051412.m05ECIaH010327@nakamura.uits.iupui.edu
source@collab.sakaiproject.org
source@collab.sakaiproject.org
source@collab.sakaiproject.org



Open LAB  and/or Robot Club 
  • LAB - Duration: 40 Min
  • Link: Robot Club Google Sites
  • Instructions & Expectations: Connect with your Robot Club Team.  You will either be working on your Robot Project or an Open Lab Project.  
    • You will need to account for your time. You will need to convince me by your form submission that you worked given the time allotted. 
    • If  you or your Robot Club Team worked on the Robot Club project, you will make sure your Robot Project Status Google docs are updated.  
    • If you worked on an Open Lab Project, you will also need to tell me about what you accomplished and what you are planning next.
  • How to Submit Assignment:   Each Student needs to account for your time.  
  • Dig Deeper: Open Lab:
Clean Up
  • Assignment - Duration: 2-10 Min
  • Instructions & Expectations: Desk cleanup, put away all projects, find your assigned job
  • How to Submit Assignment: When Complete, check yourself off on Sign Out Sheet - 2 Points

Tuesday, March 5, 2019

Tuesday March 5, 2019 - IC and More Python Files


Mechatronics Engineering Google Site
Special Instructions:

Entry Ticket - I can access Infinite Campus and check my grade
  • Link: IC Quiz
  • Instructions & Expectations: Do the following:
    • can you log into Infinite Campus and check your grade.  IC Login
Mechatronics Engineering Plan For Today:
  • Entry Ticket 
  • Python - Reading Files
  • Open Lab
  • Clean Up




Python - Files
Open LAB  and/or Robot Club 
  • LAB - Duration: 40 Min
  • Link: Robot Club Google Sites
  • Instructions & Expectations: Connect with your Robot Club Team.  You will either be working on your Robot Project or an Open Lab Project.  
    • You will need to account for your time. You will need to convince me by your form submission that you worked given the time allotted. 
    • If  you or your Robot Club Team worked on the Robot Club project, you will make sure your Robot Project Status Google docs are updated.  
    • If you worked on an Open Lab Project, you will also need to tell me about what you accomplished and what you are planning next.
  • How to Submit Assignment:   Each Student needs to account for your time.  
  • Dig Deeper: Open Lab:
Clean Up
  • Assignment - Duration: 2-10 Min
  • Instructions & Expectations: Desk cleanup, put away all projects, find your assigned job
  • How to Submit Assignment: When Complete, check yourself off on Sign Out Sheet - 2 Points

Monday, February 25, 2019

Monday February 25, 2019 - Welcome Back


Mechatronics Engineering Google Site
Special Instructions:

Entry Ticket - What Robot Club Team Are You On?
  • Assignment - Duration: 10 Min
  • Link: See the  Mechatronics Engineering google classroom and check the STREAM
  • Instructions & Expectations: Do the following
  • How to Submit Assignment: Go to our Mechatronics Engineering google classroom and check the STREAM for current Entry Ticket Assignments & Questions. - 10 Points
  • Dig Deeper: Look here to learn more...

Mechatronics Engineering Plan For Today:
  • Entry Ticket 
  • Python
  • Open Lab
  • Clean Up



Python

Open LAB  and/or Robot Club 
  • LAB - Duration: 60 Min
  • Link: Robot Club Google Sites
  • Instructions & Expectations: Connect with your Robot Club Team.  You will either be working on your Robot Project or an Open Lab Project.  
    • You will need to account for your time. You will need to convince me by your form submission that you worked given the time allotted. 
    • If  you or your Robot Club Team worked on the Robot Club project, you will make sure your Robot Project Status Google docs are updated.  
    • If you worked on an Open Lab Project, you will also need to tell me about what you accomplished and what you are planning next.
  • How to Submit Assignment:   Each Student needs to account for your time.  
  • Dig Deeper: Open Lab:
Clean Up
  • Assignment - Duration: 2-10 Min
  • Instructions & Expectations: Desk cleanup, put away all projects, find your assigned job
  • How to Submit Assignment: When Complete, check yourself off on Sign Out Sheet - 2 Points

Tuesday, February 12, 2019

Tuesday February 12, 2019 - Python Top Down


Mechatronics Engineering Plan For Today:

  • Python
  • Open Lab
  • Clean Up



Python
  • Lecture/Presentation - Duration: 40 Min
  • Link: Python TOP Down Design
  • Instructions & Expectations: Listen and take notes in your Interactive Lab Book. If needed review the posted slide presentation.  
  • How to Submit Assignment: See the lab demo and write your code, but there will probably be a Mechatronics Engineering google classroom assignment found on the STREAM
  • Dig Deeper: solve the prime number lab
Robot Club and/or Open LAB 
  • LAB - Duration: 40 Min
  • Link: Robot Club Google Sites
  • Instructions & Expectations: Connect with your Robot Club Team.  You will either be working on your Robot Project or an Open Lab Project.  
    • You will need to account for your time. You will need to convince me by your form submission that you worked given the time allotted. 
    • If  you or your Robot Club Team worked on the Robot Club project, you will make sure your Robot Project Status Google docs are updated.  
    • If you worked on an Open Lab Project, you will also need to tell me about what you accomplished and what you are planning next.
  • How to Submit Assignment:   Each Student needs to account for your time.  
  • Dig Deeper: Open Lab:
Clean Up
  • Assignment - Duration: 2-10 Min
  • Instructions & Expectations: Desk cleanup, put away all projects, find your assigned job
  • How to Submit Assignment: When Complete, check yourself off on Sign Out Sheet - 2 Points

Tuesday, January 29, 2019

Tuesday January 29, 2019 - Python and College Career Planning


Mechatronics Engineering Google Site
Special Instructions:
https://www.cacareerzone.org/ip/

EVC - http://www.evc.edu/
Spring Class Schedule - List



Mechatronics Engineering Plan For Today:
  • Python - Functions
  • Open Lab
  • Evergreen College 
  • Clean Up



Python
  • Lecture/Presentation - Duration: 30 Min
  • Link: Python Functions
  • Instructions & Expectations: Listen and take notes in your Interactive Lab Book. If needed review the posted slide presentation.  
  • How to Submit Assignment: See the lecture slides, but there will probably be a Mechatronics Engineering google classroom assignment found on the STREAM
  • Dig Deeper: Look here to learn more...

    Robot Club and/or Open LAB 
    • LAB - Duration: 20 Min
    • Link: Robot Club Google Sites
    • Instructions & Expectations: Connect with your Robot Club Team.  You will either be working on your Robot Project or an Open Lab Project.  
      • You will need to account for your time. You will need to convince me by your form submission that you worked given the time allotted. 
      • If  you or your Robot Club Team worked on the Robot Club project, you will make sure your Robot Project Status Google docs are updated.  
      • If you worked on an Open Lab Project, you will also need to tell me about what you accomplished and what you are planning next.
    • How to Submit Assignment:   Each Student needs to account for your time.  
    • Dig Deeper: Open Lab:

    Evergreen Valley College - Career Planning


    Guest Speaker Christoper Jones
    • 1) Career assessment
    • 2) reading a college schedule
    • 3) brief education plan


    Clean Up
    • Assignment - Duration: 2-10 Min
    • Instructions & Expectations: Desk cleanup, put away all projects, find your assigned job
    • How to Submit Assignment: When Complete, check yourself off on Sign Out Sheet - 2 Points

    Monday, January 28, 2019

    Monday January 28, 2019 - Python Functions


    Mechatronics Engineering Google Site
    Special Instructions:


    Mechatronics Engineering Plan For Today:
    • Python - Functions
    • ExploraVision
    • Open Lab
    • Clean Up



    Python
    • Lecture/Presentation - Duration: 40 Min
    • Link: Python Functions
    • Instructions & Expectations: Listen and take notes in your Interactive Lab Book. If needed review the posted slide presentation.  
    • How to Submit Assignment: See the lecture slides, but there will probably be a Mechatronics Engineering google classroom assignment found on the STREAM
    • Dig Deeper: Look here to learn more...
    ExploraVision
    • LAB - Duration: 30 Min
    • Link: Project Format
    • Instructions & Expectations: Work in your teams to start completing the following:
      • Present Technology*: An overview of the present form of the technology including scientific principles involved in its functioning. A problem definition or limitation of this present technology that you address in your ExploraVision project.
      • History: Research and description of the history of the technology from its inception.
      • Future Technology: Description of the team's vision for what this technology would be like in 20 years, including scientific principles involved in developing the technology.
      • Breakthroughs*: Research and description of breakthroughs that are necessary to make the future technology design a reality. Description of why this future technology doesn't exist today. (Choose one of your required breakthroughs and describe an investigation that would have to be planned and carried out to test your ExploraVision project. If possible, include the kind of data or measurements that would be collected in the investigation.)
      • Design Process*: Description of three alternative ideas of features the team considered for their project. The ideas and features should be directly related to the project. Describe why the team rejected each feature and idea in favor of the ones in the submitted technology. Describe how your future technology feature is better than the rejected design feature.
      • Consequences*: Description of recognition that all technologies have positive and negative consequences including the potential positive and negative consequences of the new technology on society.
      • Bibliography; A list of all sources and references used in researching the chosen technology. Sources must be clearly labeled and include title, author, publisher, and copyright date.
    • How to Submit Assignment: Cut and Paste your work (probably part of a shared doc) into the Google Class ExploraVision Assignment.  Go to our Mechatronics Engineering google classroom and check the STREAM - 20 Points
      Robot Club and/or Open LAB 
      • LAB - Duration: 30 Min
      • Link: Robot Club Google Sites
      • Instructions & Expectations: Connect with your Robot Club Team.  You will either be working on your Robot Project or an Open Lab Project.  
        • You will need to account for your time. You will need to convince me by your form submission that you worked given the time allotted. 
        • If  you or your Robot Club Team worked on the Robot Club project, you will make sure your Robot Project Status Google docs are updated.  
        • If you worked on an Open Lab Project, you will also need to tell me about what you accomplished and what you are planning next.
      • How to Submit Assignment:   Each Student needs to account for your time.  
      • Dig Deeper: Open Lab:
      Clean Up
      • Assignment - Duration: 2-10 Min
      • Instructions & Expectations: Desk cleanup, put away all projects, find your assigned job
      • How to Submit Assignment: When Complete, check yourself off on Sign Out Sheet - 2 Points

      Friday, January 18, 2019

      Friday January 18, 2019 - Python & Maker Friday


      Mechatronics Engineering Google Site
      Special Instructions:


      Mechatronics Engineering Plan For Today:



      Python Shell

      Robot Club and/or Open LAB 
      • LAB - Duration: 60 Min
      • Link: Robot Club Google Sites
      • Instructions & Expectations: Connect with your Robot Club Team.  You will either be working on your Robot Project or an Open Lab Project.  
        • You will need to account for your time. You will need to convince me by your form submission that you worked given the time allotted. 
        • If  you or your Robot Club Team worked on the Robot Club project, you will make sure your Robot Project Status Google docs are updated.  
        • If you worked on an Open Lab Project, you will also need to tell me about what you accomplished and what you are planning next.
      • How to Submit Assignment:   Each Student needs to account for your time.  
      • Dig Deeper: Open Lab:
      Clean Up
      • Assignment - Duration: 2-10 Min
      • Instructions & Expectations: Desk cleanup, put away all projects, find your assigned job
      • How to Submit Assignment: When Complete, check yourself off on Sign Out Sheet - 2 Points

      Thursday, January 17, 2019

      Thursday January 17, 2019 - Python Shell


      Mechatronics Engineering Google Site
      Special Instructions:

      Entry Ticket - 7 Innovations from CES 2019 That Will Make the World Better
      • Assignment - Duration: 15 Min
      • Link: 7 Innovations from CES 2019 That Will Make the World Better
      • Instructions & Expectations: Take some time to click through the link.   Summarize in 100-200 words.  The format should be a short set of paragraphs.  Answer the following questions:
        • 1) What innovation do you think will have the best impact at making the world better?
        • 2) What ideas do you have that might make the world better?
        • 3) What is CES and why do people go?
      • How to Submit Assignment: Go to our Mechatronics Engineering google classroom and check the STREAM for current Entry Ticket Assignments & Questions. - 10 Points
      • Dig Deeper: Find out more about CES - Google...

      Mechatronics Engineering Plan For Today:
      • Entry Ticket - 7 Innovations That Will Make The World Better 
      • Python Shell
      • ExploraVision
      • Clean Up



      Python Shell
      ExploraVision
      • LAB - Duration: 30 Min
      • Link: Project Format
      • Instructions & Expectations: Work in your teams to start completing the following:
        • Present Technology*: An overview of the present form of the technology including scientific principles involved in its functioning. A problem definition or limitation of this present technology that you address in your ExploraVision project.
        • History: Research and description of the history of the technology from its inception.
        • Future Technology: Description of the team's vision for what this technology would be like in 20 years, including scientific principles involved in developing the technology.
        • Breakthroughs*: Research and description of breakthroughs that are necessary to make the future technology design a reality. Description of why this future technology doesn't exist today. (Choose one of your required breakthroughs and describe an investigation that would have to be planned and carried out to test your ExploraVision project. If possible, include the kind of data or measurements that would be collected in the investigation.)
        • Design Process*: Description of three alternative ideas of features the team considered for their project. The ideas and features should be directly related to the project. Describe why the team rejected each feature and idea in favor of the ones in the submitted technology. Describe how your future technology feature is better than the rejected design feature.
        • Consequences*: Description of recognition that all technologies have positive and negative consequences including the potential positive and negative consequences of the new technology on society.
        • Bibliography; A list of all sources and references used in researching the chosen technology. Sources must be clearly labeled and include title, author, publisher, and copyright date.
      • How to Submit Assignment: Cut and Paste your work (probably part of a shared doc) into the Google Class ExploraVision Assignment.  Go to our Mechatronics Engineering google classroom and check the STREAM - 20 Points
      Clean Up
      • Assignment - Duration: 2-10 Min
      • Instructions & Expectations: Desk cleanup, put away all projects, find your assigned job
      • How to Submit Assignment: When Complete, check yourself off on Sign Out Sheet - 2 Points