I don't actually know what a UART is
UART (Universal Asynchronous Receiver Transmitter) is the technical term for the communication interface, which is called
Serial in Arduino speak. It's often called UART, because that is more precise, since there are many different communication protocols, which also work serially (meaning transferring data bits one after another in contrast to parallel, where multiple bits are transferred simultaneously), like I2C, SPI or USB. All serial protocols, but totally different from the Arduino
Serial interface. Yes, this is a bit confusing. I guess the Arduino term
Serial was coined to make the learning curve less steep for beginners (hiding complexity can also make things confusing unfortunately).
So UART is the same as the Arduino
once I connect these, does this completely replace the connection through USB that is currently used to interface with the Uno?
Here it is good to know, how the USB communication works on the Uno. The microcontroller on the Uno (Atmega328p) does not have a native USB interface. So it cannot speak to USB itself. For that there is an extra microcontroller on the board (I think an Atmega32u4). This controller has a native USB interface and it acts as a USB to
Serial bridge (it creates a virtual serial interface on the PC and translate between that and its physical
Serial/UART interface). The Atmega328p (which you program with your code) has it's RX and TX pins connected to the RX and TX pins on the Atmega32u4, which can then translate between the
Serial/UART protocol and the USB protocol. Thus the Atmega328p doesn't know anything about USB. I just talks via
Serial/UART to the Atmega32u4. In fact it also doesn't know anything about bluetooth. Most bluetooth modules for Arduino are also just bluetooth-
Now you need to know, that
Serial/UART is made for one-to-one connections. With multiple devices you can get problems, when multiple devices try to send data at the same time. I this case (BT module RX to Arduino TX and vice versa) you would get garbled data, if you try to simultaneously send data from bluetooth and USB to the Arduino. The signals would overlap on the Arduinos RX pin, corrupting the data.
That means, that you don't want to send from both interfaces. In fact it is the easiest way to just use one
Serial/UART interface for only one device. If you leave the Serial Monitor (or any other Serial communication program) closed on the PC, the PC will not interfere with the communication. Though you need to disconnect the bluetooth module, when you write your program to the Arduino, since this is done via
Serial and you don't want it to meddle with the data.
So in result the bluetooth module will not "replace" the connection through USB. It will be added and it is your duty to prevent data corruption.
- Serial: Can I write and access the serial monitor through the IDE by connecting to 9600 baud, both in code and in the Serial Monitor
Yes. You don't need to use 9600 baud necessarily. The only requirement is, that you use the same baud number in both sketch and Serial Monitor. That number just represents the speed, that the data is send in. Both sender and receiver need to agree on the same communication speed, or the receiver will not be able to read the data. Imagine someone talking to you, but talking twice the speed with that you are able to understand the words. You will not be able to understand much, because the speaker is just too fast. Either you would need to change your hearing/understanding speed or the sender needs to change it's speaking speed, to make the two match.
9600 baud is just one of the standard baudrates, though one of the lower ones. If you need it to be faster (maybe because you are sending much data in fast succession), you might want to use a higher baudrate.
- Pins: Do these connections also allow me to write and read signals from all of the pins, including analog and digital
That is up to you.
Serial/UART is just a communication interface. How it is used is up to you. You already have seen, that it is often used to output text for a user to read over the
Serial interface, often used as a way to debug the code by sending specific text at specific places in the code. Since that connection works in both ways, you can also program the Arduino to receive commands over
Serial/UART and then act upon them.
Here the overlaying communication protocol comes in.
Serial/UART just transmits a series of bytes over its two lines. It doesn't care, what these bytes mean. It can be text (for example encoded via the ASCII standard, as the Serial Monitor does), or it can be just some binary data. Also there is no concept of "messages". There are only individual bytes and you don't have control over when exactly they are sent. So to make meaningful use of
Serial/UART you need to use an extra communication protocol on top of
Serial/UART, that the receiver understands.
When you send text to the Serial Monitor you are the receiver. Thus you would send text (because you can understand text) and a natural way for humans to distinguish individual messages is to use a delimiter character. In normal text that can be a period, though in this field going to a new line has somewhat evolved to the standard (so the delimiter character is the newline character
'\n'). If you read the delimiter character (either yourself on the Serial Monitor, or the Arduino in your program), that marks the end of the message. You can also use that text based approach in your Arduino program (and I would say that is the easiest way). Though you don't need to. You could also use any binary protocol on it (or even invent your own protocol).
I would suggest you look at the examples in the Arduino IDE, that involve
Serial and maybe try some tutorials on the web. There are many of them available.
- Sending code: Can I still send code through Bluetooth without needing a USB connection?
You don't need an USB connection for
Serial/UART to work. In fact the Atmega328p, which you program on the Uno, doesn't care about the USB connection at all. It only knows
I hope that gave you a good overview over that topic. When you understand these core concepts you will be able to understand the tutorials and examples on the internet.