import serial
import time

# Define Constants
SERIAL_DEVICE = "/dev/tty.usbmodem1421"

# Establish Connection
ser = serial.Serial(SERIAL_DEVICE, 9600)
time.sleep(2)
print("Connection Established");

# Send Data to Pi
ser.write('h')
time.sleep(5);
ser.write('l')

import serial
import time

# Define Constants
SERIAL_DEVICE = "/dev/ttyACM0"

# Establish Connection
ser = serial.Serial(SERIAL_DEVICE, 9600)
time.sleep(2)
print("Connection Established");

# Send Data to Pi
ser.write('h')
time.sleep(5);
ser.write('l')

Update SERIAL_DEVICE to match the Raspberry Pi
Update SERIAL_DEVICE to match the Raspberry Pi
  import serial
  import time
  
  # Define Constants
- SERIAL_DEVICE = "/dev/tty.usbmodem1421"
+ SERIAL_DEVICE = "/dev/ttyACM0"
  
  # Establish Connection
  ser = serial.Serial(SERIAL_DEVICE, 9600)
  time.sleep(2)
  print("Connection Established");
  
  # Send Data to Pi
  ser.write('h')
  time.sleep(5);
  ser.write('l')
  
Update SERIAL_DEVICE to match the Raspberry Pi
## Code Before:
import serial
import time

# Define Constants
SERIAL_DEVICE = "/dev/tty.usbmodem1421"

# Establish Connection
ser = serial.Serial(SERIAL_DEVICE, 9600)
time.sleep(2)
print("Connection Established");

# Send Data to Pi
ser.write('h')
time.sleep(5);
ser.write('l')

## Instruction:
Update SERIAL_DEVICE to match the Raspberry Pi
## Code After:
import serial
import time

# Define Constants
SERIAL_DEVICE = "/dev/ttyACM0"

# Establish Connection
ser = serial.Serial(SERIAL_DEVICE, 9600)
time.sleep(2)
print("Connection Established");

# Send Data to Pi
ser.write('h')
time.sleep(5);
ser.write('l')
