It seems I'm still missing something. Say I want the Tiny to print the value of some analog input value in the IDE serial monitor. That's what I want to make happen.
Your board link to amazon.com just took me to the amazon home page - maybe because I'm in UK - but I assume you have the development board, not the chip?
If so, this is what I get from AI:
If your ATtiny85 is mounted on a Digispark development board (or an equivalent with a USB bootloader installed), you can use the Digispark board options:
Board Manager: Install the Digistump AVR boards package in your Arduino IDE using the Digistump Boards Index URL.
Settings: Select Digispark (Default - 16.5mhz) or whichever clock speed your hardware requires.
Upload Process: Do not plug the board in yet. Click the upload button in the IDE, wait for the prompt in the console to "Plug in device now" (you will have a 60-second window to do so), and then plug the Digispark board directly into your computer's USB port.
Note: 1. Use UNO R3 as an Arduino as ISP programmer 2. For debugging purposes, use a TTL<-----> USB converter to connect STX-pin with PC. 3. The attaced document may be helpful: ProgrammingATtiny85 (5).pdf (172.6 KB)
2. Connect the ATtiny85 Dev Board with PC. 3. Check that the PC has recognized the ATtiny85 Dev bboard as USB device. 4. Engage the TTL<-------> USB connector with PC. 5. Go to Device Manager and chcek that the TTL<-----> USB adapter is recognized as a COM Port.
6. Select the ATtiny85 Dev board as:
Tools ---> Board:---->ATTinyCore-----> ATtiny85 (Micronucleus / Digospark)
Because the board's core ATtiny85 microcontroller lacks a hardware UART port, software emulation is the only way to achieve standard serial communication. [1, 2, 3, 4]
When implementing Software Serial on this board, keep several critical architectural constraints in mind:
Working with the Default Library
You can use the standard #include <SoftwareSerial.h> library included with the Arduino IDE. However, because the standard library creates a 64-byte receive buffer and completely disables interrupts while transmitting, it can consume a significant amount of the ATtiny85's limited 512 bytes of SRAM. [1, 2, 3]
Pin Availability Conflicts
The Digispark breaks out 6 General Purpose Input/Output (GPIO) pins (P0 to P5), but choosing your Serial RX/TX pins requires caution: [1, 2, 3]
P3 and P4: These pins are directly connected to the USB data lines ((D-) and (D+)) for programming. Connecting external serial devices to these pins during boot can interfere with uploading code or cause USB communication faults.
P5: This pin functions as the hardware Reset pin. Unless you burn specific fuses to change it to an I/O pin (which prevents you from easily re-programming the board via USB), its voltage restrictions make it difficult to use for serial data.
Best Practice: Use P0, P1, or P2 for your Software Serial communication to prevent interference with the USB upload process. [1, 2, 3, 4, 5]
Clock Speed and Baud Rates
Frequency Adjustment: The default configuration of the Digispark runs at 16.5 MHz using its internal oscillator via the Micronucleus bootloader. If your baud rates exhibit timing drift or output garbage data, you may need to scale your project down to 8 MHz inside the Arduino IDE board manager to stabilize software-timed bit-banging.
Baud Limit: Keep your communication speeds low. While it can theoretically go higher, a baud rate of 9600 bps is highly recommended to prevent data corruption due to the un-clocked internal oscillator. [1, 2, 3, 4]
Lightweight Alternatives
If you are running low on memory or only need to output debugging data, consider these alternative approaches:
Send-Only Libraries: Use a transmit-only library (such as SendOnlySoftwareSerial). It eliminates the memory overhead of a receive buffer and frees up one physical pin because it only requires a single TX pin.
DigiKeyboard: Instead of trying to open a standard serial monitor over USB, you can use the built-in DigiKeyboard.h library. This instructs the computer to recognize the Digispark as a USB keyboard. You can open an empty Notepad document, and the board will type out its sensor values or debug text directly into the file. [1, 2, 3, 4, 5]
Tool arduino:avr-gcc@7.3.0-atmel3.6.1-arduino7 already installed
Downloading packages
arduino:avrdude@6.3.0-arduino18
ATTinyCore:micronucleus@2.5-azd1b
Failed to install platform: 'ATTinyCore:avr:1.5.2'.
Error: 2 UNKNOWN: Get "https://azduino.com/bin/micronucleus/micronucleus-cli-2.5-azd1b-x86_64-mingw32.zip": dial tcp 3.218.2.136:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
In file included from C:\Users\User\OneDrive\Documents\Arduino\blink_tiny85_2\blink_tiny85_2.ino:25:0:
c:\Users\User\OneDrive\Documents\Arduino\libraries\SendOnlySerial\src/SendOnlySerial.h:67:2: error: #error “SendOnlySerial only supports boards with AVR ATmega168A/PA/328/P/PB processor.” #error “SendOnlySerial only supports boards with AVR ATmega168A/PA/328/P/PB processor.”
exit status 1
Compilation error: exit status 1
I've noticed other send only libraries. I'm off to search.
Figure-19.5: Scemtaic of Digispark ATtiny85 Dev Board
The procedures of the operation of Digospark ATtiny85 Dev Board are: For the schematic of
Digispark Board, see Section-19.4.4.
(1) Installtion of ATTinyCore Package
Follow the steps of Section-19.2.1.(1)(a)(b).
The section referenced is:
The core allows to select ATtiny85 as a Board; as a result, sketch can be created using
Arduino IDE. The Core can be installed this way:
(a) Open the Arduino IDE and on the main menu, select Files -> Preferences. In
the Additional Boards Manager URLs textbox, type this URL: http://drazzy.com/package_drazzy.com_index.json, and then press the OK button.
(b) Perform this task: Tools Board: Boards Manager… click. When the Borads
Installation of Drazzy core fails.
Failed to install platform: 'ATTinyCore:avr:1.5.2'.
Error: 2 UNKNOWN: Get "https://azduino.com/bin/micronucleus/micronucleus-cli-2.5-azd1b-x86_64-mingw32.zip": dial tcp 3.218.2.136:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
Do you think that the Digispark ATtiny85 Dev board's bootloader contains Keyboard emulation code so that the chip will start communicaton with a Notepad window opened in PC? Please, check if you have hardware.
If you are facing problem with Digispark board, then go with stand-alone project using ATtiny85. Here, you need to use a seperate Programmer to upload sketch into ATtny85. And you must know the fuse vlaues of your MCU to figue out the internal configuration -- internal clock or not and etc.
Are you deeply committed to using that relatively rare board? You will find much more help here if you buy a few T85 8-pin chips and learn how to upload sketches to those.
EDIT: Sorry, the above was of course intended for @dougp
I have Digispark board and this board does not support upstreaming. It is not included because of low amount of flash of ATtiny85. You can use the STX to display debugging message or use the onboard led to indicate the nature of error in the executing code.
Yes i have the same issue. (on a secondary PC, on my laptop it is installed and working) It is a known problem with the core repository. You can get it to work by doing a manual install of the core i think.
The maintainer has just simply run out of time and motivation. Taking over the core maintenance from others.
The complete re-write is still incomplete.
The manual install works as i have just completed it.
Go to your sketchbook folder and create a folder called 'hardware' if it does not already exists
navigate to that folder and extract the contents of the downloaded ZIP file into it.
Restart the IDE (i tend to close the IDE before i start and open when i finish)
The core should now be installed to be used.