Getting Started with Arduino

Paul.Ruby

Active member
Since I already typed this out for someone asking how to use my soft-touch code, figured I could post it public. This is for Arduino and ATtiny (or Digispark, Olimexino, etc...).

Download and install Arduino from here: https://www.arduino.cc/en/software

Run Arduino IDE. Go to File | Preferences from the menu.
Scroll down in the preferences dialog box to find "Additional boards manager URLs"
Add the following URLs, separated by a comma in the edit box and click on "OK"
Just copy all this text and paste it into the edit box.

https://raw.githubusercontent.com/damellis/attiny/ide-1.6.x-boards-manager/package_damellis_attiny_index.json,https://raw.githubusercontent.com/sleemanj/optiboot/master/dists/package_gogo_diy_attiny_index.json,http://drazzy.com/package_drazzy.com_index.json,https://raw.githubusercontent.com/digistump/arduino-boards-index/master/package_digistump_index.json

1710269348946.png

Click on OK to exit the preferences dialog box.
Show the Boards Manager by clicking the board manager icon on the left side of the Arduino IDE window.

1710269530703.png

There is a vertical column of icons. Click each one of those...
Top one is the Sketch Book.
Second one is the Boards Manager.
In the "Filter your search..." box, type "attiny"
Now you should see boards to install: ATtiny by David A. Mellis; and DIY ATtiny by James Sleeman.
Install both of those.

If you will be programming a DigiSpark board, additional things must be installed.
What you need is at this link: https://github.com/digistump/DigistumpArduino/releases

For windows users, download and manually install these drivers:

Once downloaded, unzip it and find "Install Drivers.exe" and run it.

Now go back into Boards Manager, filter your search to "digispark" and install "ATTinyCore by Spence Konde"
and also install "Digistump AVR Boards by Digistump"

1710269747104.png

The next steps depend on your choice of programmer and which ATtiny chip.

I strongly recommend getting the SparkFun tiny AVR programmer.
Follow these instructions to get it installed.
This also has a link to buy the programmer.
The proper driver must be installed for Arduino IDE to see it.

Your next step should be a blink test on your chosen platform.
If you are trying out a Digispark, watch this video:
Also use this instructional link: https://startingelectronics.org/tutorials/arduino/digispark/digispark-windows-setup/

I have the blink test embedded in my soft-touch code. This is the easiest way to know that you have the proper clock settings in Arduino. It's always good to check your specific ATtiny chip (or digispark) will delay the proper amount of time in the delay() function. The Arduino IDE only knows what the clock speed is if you tell it what it is. If you set this wrong, then your delay() calls will not be correct. This setting does NOT program your chip to run at this speed. It tells Arduino what your chip's clock is.
1710270691500.png

My soft-touch code has a blink test embedded in it. The code is here:

I may post a tutorial thread about the soft-touch code in the future. But, for now, if you grab that as your sketch, it is currently setup to use the SparkFun programmer with an LED on PB0. If you change line 41 to "true" instead of "false" then the only thing the code will do is blink with a half second on and half second off, which is easy to tell if it is correct or not.
#define BLINK_TEST false // I use a blink test to make sure the clock settings are all good.
 
Last edited:
Back
Top