USB Communications

Arduino talks to computer: Serial monitor

simple_serial code

See the flashing TX (transmit) LED.

Computer talks to Arduino

serial_data_entry_test code

while (!Serial.available()){} hangs the program until you hit the enter key.

number = Serial.parseInt(); reads in the input as an integer.

See the RX (receive) and TX LEDs blink.

Digital Input

Input pin to 5V = HIGH, input pin to GND = LOW, what about in between? Uncertain.

digital_input_test code

Screen Shot 2015-09-29 at 8.21.30 PM

Screen Shot 2015-09-29 at 8.24.52 PM

SPDT digital input

Uncertainty when in between positions. Uncertainty is undesirable in electrical circuits.


Digital Input

Analog Input

Six analog pins on an Arduino Uno. 0 to 5V, and any voltage in between.

Standalone circuit. Voltage varies when pressure varies.

Screen Shot 2015-09-29 at 8.32.54 PM

Connect to the Arduino. Integer value rises when pressure rises.

analog_input_test code

Screen Shot 2015-09-29 at 8.39.21 PM

Servo Motor

simple_servo code

Twist three wires together to form Star Point Ground.

Servo motor connection

Servo motor connection


Screen Shot 2015-09-29 at 8.51.36 PM

  1. Connect your inputs. Run your test code.
  2. Connect your outputs. Run your test code.
  3. Run a simple system test code.

simple_system_test code

Demonstrate the distance sensor comparison system.

Lessons Learned from the Transistor Fiasco:

  1. Never connect power until the circuit is complete. I should have told you that.
  2. Use Telltale LEDs. That was the original plan.
  3. Need higher voltage to keep the motors from stalling. Stalled DC motor has a very low resistance.

Demonstrate the transistor circuit.

Demonstrate the MOSFET driving a large motor, solenoid.

Demonstrate the stepper motor and driver.