You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+25-12Lines changed: 25 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,20 +1,27 @@
1
1
# AtTiny85-Arduino-Serial-Monitor
2
2
3
-
Serial interface for ATTiny that allows you to print different data types to an arduino's serial monitor. Doesn't require any extra serial cables/devices. This uses Software Serial so it's not all too lightweight.
3
+
Serial interface for ATTiny that allows you to print different data types to an arduino's serial monitor. Doesn't require any extra serial cables/devices. This uses SoftwareSerial so it's not all too lightweight.
4
4
5
5
## Setting up
6
6
7
7
These instructions assume you are already able to upload code to your ATTiny using the Arduino IDE. For a good tutorial on how to do that check out [this](https://create.arduino.cc/projecthub/arjun/programming-attiny85-with-arduino-uno-afb829).
8
8
9
9
### Installation
10
-
The library has to be downloaded as three seperate "libraries" due to the way that things are compiled. To do so:
10
+
The library has to be downloaded as three seperate libraries.
11
11
- Download [this zip file](https://github.com/davidOSUL/AtTiny85-Arduino-Serial-Monitor/raw/master/AtTiny85-Arduino-Serial-Monitor.zip) (also avaialble in releases tab).
12
12
- Unzip this file. Inside are three more zip files.
13
-
For all three of these zip files, do the following:
14
-
- Using Arduino IDE 1.0.x:
15
-
-**Sketch > Import Library... > Add Library... >** select the zip file **> Open**
16
-
- Using Arduino IDE 1.5+:
17
-
-**Sketch > Include Library > Add ZIP Library... >** select the zip file **> Open**
13
+
- For **each** of these zip files, do the following:
14
+
- Using Arduino IDE 1.0.x:
15
+
-**Sketch > Import Library... > Add Library... >** select the zip file **> Open**
16
+
- Using Arduino IDE 1.5+:
17
+
-**Sketch > Include Library > Add ZIP Library... >** select the zip file **> Open**
18
+
19
+
After doing this, when you go to your list of libraries (**Sketch> Include Library**), you should see the following libraries included:
20
+
```
21
+
ArduinoSerialIn
22
+
SerialTypes
23
+
TinySerialOut
24
+
```
18
25
19
26
## Using the Library
20
27
- The code uploaded to your Tiny will allow you to write out data
@@ -38,14 +45,16 @@ For more details on using these functions see [**TinySerialOut Details**](https:
38
45
Once you've uploaded your code to your Tiny, and the provided code to your arduino, you'll need to connect the two.
39
46
40
47
41
-
You'll want to hook up your designated TX pin on your Tiny to the Arduino's RX Pin with a 330 ohm resistor in series. Then hook up the Tiny's Voltage pin to 5V and GND to GND.
48
+
You'll want to hook up your designated TX pin on your Tiny to the Arduino's RX Pin with a 330 ohm resistor in series. Then hook up the Tiny's Voltage pin to 5V and GND to GND.
49
+
50
+
The schematic shown uses the same TX pin on the Tiny as used in the included examples:
This library uses one way communication (Tiny -> Arduino), so it only needs one pin on the Tiny for serial communication.
45
-
The schematic shown uses the same pin numbers as used in the included examples, but any of the digital pins should work.
53
+
-This library uses one way communication (Tiny -> Arduino), which is why it only needs one pin on the Tiny for serial communication.
54
+
46
55
### Putting everything together: Reading Serial Data
47
56
Once you've uploaded the correct code to your arduino as described in [**Setting Up the Arduino**](https://github.com/davidOSUL/AtTiny85-Arduino-Serial-Monitor#setting-up-the-arduino), and you've uploaded code
48
-
to your Tiny that contains some serial output, and wired everything together:
57
+
to your Tiny that contains some serial output, and [wired](https://github.com/davidOSUL/AtTiny85-Arduino-Serial-Monitor/#wiring) everything together:
49
58
1. Power on the Arduino
50
59
2. Make sure that you have the port (**Tools > Port**) corresponding to the Arduino selected
51
60
3.**Wait a second or two**. if you open up the Serial Monitor straight away, you may be met with no output. If you then try
@@ -55,7 +64,11 @@ to close it and open it again, most likely you'll get bad values, and you'll hav
55
64
56
65
## Other Notes
57
66
### TinySerialOut Details
58
-
To write serial data from your Tiny include `TinySerialOut.h` in the code that you upload to your Tiny. Create a new TinySerialOut object, and pass in to the constructor the **digital** pin on the Tiny you are using for serial output. Note that this is not the hardware pin, the number you should use in code should correspond to the light-blue numbers below:
67
+
To write serial data from your Tiny include `TinySerialOut.h` in the code that you upload to your Tiny:
68
+
- Create a new TinySerialOut object.
69
+
- Pass in to the constructor the **digital** pin on the Tiny you are using for serial output.
70
+
- Note that this is not the hardware pin, the number you should use in code should correspond to the light-blue numbers below:
71
+
59
72

60
73
61
74
The TinySerialOut object contains two groups of functions to use.
0 commit comments