user2955: The following code comes from AtTiny serial library that I want to use:
#include <avr/io.h>
#include <avr/interrupt.h>
#include <util/delay.h>

// change these to use another pin
#define TX_PORT PORTB
#define TX_PIN  PB0
#define TX_DDR  DDRB
#define TX_DDR_PIN DDB0

I have no idea which pins to connect. What do these constants mean and where are they documented?

user13432: The mapping can be found in the io.h file but also in Arduino core files.
Below is the pin mapping:
                        ATtinyX4
                      +----U----+
  (VCC)-------------1-|VCC   GND|-14------------(GND)
  (D10)-------------2-|PB0   PA0|-13----------(D0/A0)
  (D9)--------------3-|PB1   PA1|-12----------(D1/A1)
  (/RESET)----------4-|PB3   PA2|-11----------(D2/A2)
  (D8)--------------5-|PB2   PA3|-10-------(D3/A3/SS)
  (D7/A7)-----------6-|PA7   PA4|-9---(D4/A4/SCL/SCK)
  (MISO/SDA/D6/A6)--7-|PA6   PA5|-8------(D5/A5/MOSI)
                      +---------+

The serial library uses:
#define TX_PIN  PB0

Which is ATtinyX4 Pin #2, or Arduino attiny core digital pin D10 https://github.com/damellis/attiny/blob/master/variants/tiny14/pins_arduino.h. 
Cheers

2955: <p>The following code comes from <a href="https://github.com/MarcelMG/AVR8_BitBang_UART_TX" rel="nofollow noreferrer">AtTiny serial library</a> that I want to use:</p>

<pre><code>#include &lt;avr/io.h&gt;
#include &lt;avr/interrupt.h&gt;
#include &lt;util/delay.h&gt;

// change these to use another pin
#define TX_PORT PORTB
#define TX_PIN  PB0
#define TX_DDR  DDRB
#define TX_DDR_PIN DDB0
</code></pre>

<p>I have no idea which pins to connect. What do these constants mean and where are they documented?</p>
 13432: <p>The mapping can be found in the io.h file but also in Arduino core files.</p>

<p>Below is the pin mapping:</p>

<pre><code>                        ATtinyX4
                      +----U----+
  (VCC)-------------1-|VCC   GND|-14------------(GND)
  (D10)-------------2-|PB0   PA0|-13----------(D0/A0)
  (D9)--------------3-|PB1   PA1|-12----------(D1/A1)
  (/RESET)----------4-|PB3   PA2|-11----------(D2/A2)
  (D8)--------------5-|PB2   PA3|-10-------(D3/A3/SS)
  (D7/A7)-----------6-|PA7   PA4|-9---(D4/A4/SCL/SCK)
  (MISO/SDA/D6/A6)--7-|PA6   PA5|-8------(D5/A5/MOSI)
                      +---------+
</code></pre>

<p>The serial library uses:</p>

<pre><code>#define TX_PIN  PB0
</code></pre>

<p>Which is <code>ATtinyX4 Pin #2</code>, or Arduino attiny core digital pin <code>D10</code> <a href="https://github.com/damellis/attiny/blob/master/variants/tiny14/pins_arduino.h" rel="nofollow noreferrer">https://github.com/damellis/attiny/blob/master/variants/tiny14/pins_arduino.h</a>. </p>

<p>Cheers</p>
