Physics 4
  • HOME
    • Introduction
    • Pre-course Setup
  • PHYSICS 4AL
    • 4AL Grading Policy
    • Weekly Schedule
    • Google Drive
    • Report Writing
    • 4AL Lab Sections /Office hours
    • Unit 1 - Training (Winter 2023)
    • Unit 2 - Motion (Winter 2023)
    • Unit 3 - Oscillations (Winter 2023)
    • Unit 4 - Project (Winter 2023)
  • PHYSICS 4BL
    • Grading Policy
    • Lab Sections/ Office Hours
    • Weekly Schedule
    • Google Drive
    • Report Writing
    • Unit 1 - Training
    • Unit 2 - Sound
    • Unit 3 - Circuits
    • Unit 4 - Optics
    • Unit 5 - Project
    • Pre-Lab Assignments
  • RESOURCES
    • Physics
    • Python
    • Arduino
    • Electronics
    • Software Download
  • EXTERNAL LINKS
    • GradeScope
    • CCLE
    • MyUCLA
    • CampusWire
    • UCLA Calendars
    • UCLA Physics Dept.
  • HOME
    • Introduction
    • Pre-course Setup
  • PHYSICS 4AL
    • 4AL Grading Policy
    • Weekly Schedule
    • Google Drive
    • Report Writing
    • 4AL Lab Sections /Office hours
    • Unit 1 - Training (Winter 2023)
    • Unit 2 - Motion (Winter 2023)
    • Unit 3 - Oscillations (Winter 2023)
    • Unit 4 - Project (Winter 2023)
  • PHYSICS 4BL
    • Grading Policy
    • Lab Sections/ Office Hours
    • Weekly Schedule
    • Google Drive
    • Report Writing
    • Unit 1 - Training
    • Unit 2 - Sound
    • Unit 3 - Circuits
    • Unit 4 - Optics
    • Unit 5 - Project
    • Pre-Lab Assignments
  • RESOURCES
    • Physics
    • Python
    • Arduino
    • Electronics
    • Software Download
  • EXTERNAL LINKS
    • GradeScope
    • CCLE
    • MyUCLA
    • CampusWire
    • UCLA Calendars
    • UCLA Physics Dept.

Arduino and Python Setup

In this class, we will be using an Arduino microcontroller to collect data and control various systems (running motors, generating electrical currents, playing sounds). An Arduino can be thought of as a mini-computer which we can run programs on. Instead of running an application on a screen, the Arduino will generate electrical currents that can run speakers, light up LEDs, and send data from various sensors back to the computer for analysis. We will be carrying out this analysis using the programming language Python. Programming is now a requirement in all STEM fields, even outside of computer science, as it is a powerful tool in any kind of analysis.

As such, for every class, you will need to bring your own laptop computer and you will need to carry out the following tasks before the first class. Here, we will make sure that your laptops are compatible with the Arduino and with our Python system. Even if you have your own Arduino and Python distribution, please read the following instructions carefully as we will be using a specific Arduino and Python code will not be compiled locally.

Arduino Setup

You will need to purchase an Arduino starter kit. This kit includes extra elements that will be used in the class. If you already have your own Arduino, make sure it is an Arduino Uno, and that you have a full set of all of the elements that are in the Arduino kit (speakers, breadboard extender, etc.), as our wiring diagrams will be written for the Arduino Uno and we will be using various elements included in the Arduino kit.

You can buy the Arduino Kit from the UCLA student store, or the following links
  • ​ELEGOO UNO Project Super Starter Kit​​ at Amazon
  • ELEGOO UNO Project Super Starter Kit at ELEGOO Homepage
Once you have purchased the kits, follow the instructions to set up your Arduino with your laptop. You will need to download the code linked below to test the compatibility of your system. The instructions will work on either a Mac or a Windows system. If you cannot follow the steps, or run into some issue running the code, contact your TA immediately.
  • Arduino test Instructions​​

Python Set-up

In this class, we will not be running Python on your own computer. Instead we will be running code on the Google Drive servers. Your code and data will be on a Google Drive. This helps us ensure against cheating and will allow us to easily access your code if you need assistance. To make sure that you can access the system, please follow the following tutorial to run a Google Drive Jupyter notebook.
Jupyter Tutorial
During our first class, you will be given access to the class-wide Google Drive.
edited Jan 19, 2023 by Javier Carmona
  • HOME
    • Introduction
    • Pre-course Setup
  • PHYSICS 4AL
    • 4AL Grading Policy
    • Weekly Schedule
    • Google Drive
    • Report Writing
    • 4AL Lab Sections /Office hours
    • Unit 1 - Training (Winter 2023)
    • Unit 2 - Motion (Winter 2023)
    • Unit 3 - Oscillations (Winter 2023)
    • Unit 4 - Project (Winter 2023)
  • PHYSICS 4BL
    • Grading Policy
    • Lab Sections/ Office Hours
    • Weekly Schedule
    • Google Drive
    • Report Writing
    • Unit 1 - Training
    • Unit 2 - Sound
    • Unit 3 - Circuits
    • Unit 4 - Optics
    • Unit 5 - Project
    • Pre-Lab Assignments
  • RESOURCES
    • Physics
    • Python
    • Arduino
    • Electronics
    • Software Download
  • EXTERNAL LINKS
    • GradeScope
    • CCLE
    • MyUCLA
    • CampusWire
    • UCLA Calendars
    • UCLA Physics Dept.