Keep getting NullReferenceException error (Scripting with ObiFluid)

Hello everyone. Just to preface, I am very new to unity, C# scripting, and programming in general, so I apologize in advance if my issue seems trivial. Anyways, I am currently trying to build a game with the ObiFluid asset that will allow a user to control the emission speed of the particle emitter with a key press. I am also trying to make it so Unity will send the key press data to an Arduino board via serial communication. Here is the error that keeps popping up:

[19:50:27] NullReferenceException: Object reference not set to an instance of an object
Obi.Emitter.Speed.Update () (at Assets/EmitterSpeed.cs.37)

I cannot seem to figure out what this error means/implies, and thus have no clue as to how I would fix it.
Here is my code:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System.IO.Ports;

namespace Obi
{
public class EmitterSpeed: MonoBehaviour
{
public SerialPort sp = new SerialPort (“/dev/cu.usbmodem14101”, 9600);
ObiEmitter emitter;

void Start ()
{
sp.Open();
sp.ReadTimeout = 16;
emitter = GetComponent();
}
void Update ()
{
if (Input.GetKey(KeyCode.Alpha1))
{
emitter.speed = 0.5f;
sp.Write(“1”);
}
else if (Input.GetKey(KeyCode.Alpha2))
{
emitter.speed = 1f;
sp.Write(“2”);
}
else
{
emitter.speed = 0f;
}
}
}
}

Thanks in advance.

Your error message is pointing you to line 37. I can’t tell which line that is because you haven’t used code tags to share your code with proper formatting: Using code tags properly - Unity Forum

Most likely you don’t have an ObiEmitter component on the same GameObject as this script, meaning GetComponent() will return null, which causes the NullReferenceException when you try to access it in Update(). GetComponent only gets components from the GameObject you call it from. When you call it inside a MonoBehaviour like that, that means the same GameObject that your MonoBehaviour script is attached to.