Edit: I meant term-mode (M-x term), not terminal-mode (M-x terminal-emulator). No idea why there are two different terminal emulators in Emacs, but 'M-x term' seems the better of the two, or at least the keybindings make more sense to me.
There is also 'M-x serial-term' should you ever need it.
There is also 'M-x serial-term' should you ever need it.