Programming Attiny85 via Arduino Nano
I decided to program Attiny85 using Arduino Nano.
I used the following resources:
http://forum.arduino.cc/index.php?topic=299759.15
http://www.hwkitchen.com/news/a16-nas-prvni-klon-arduina/
The the two things had to be done:
Get the Attiny boards definitons to your Arduino IDE
After some searching there are few Arduino cores available.
Following the:
http://highlowtech.org/?p=1695
http://highlowtech.org/?p=1695
Just put the json definition into the 'Additional Boards Manager URLs' when you open Files->Preferences. This adds a menu item into the Boards Manager, where the cores and definitions can be downloaded.
Program the Arduino Nano as ISP programmer and connect to the Attiny85 pins.
To allow some more information you may connect Arduino pins 9,8,7 to a LEDs via 220R resistor so the Arduino ISP can report Heartbeat, Error, and Communication status.In the Arduino ISP Sketch from examples, I uncomment the macro USE_OLD_STYLE_WIRING so that the pins for programming are:
PIN_RESET 10 (connect to Attiny Pin 1 (where the small circle is))
PIN_MOSI 11 (connect to Attiny Pin 5 (opposite corner to pin 1))
PIN_MISO 12 (connect to Attiny Pin 6)
PIN_SCK 13 (connect to Attiny 7)
Also connect the 5V of Arduino to Attiny Pin 8 and Arduino GND to Attiny Pin 4.
Basically only pins 2 and 3 or the Attiny are not connected.
Here is a photo with breadboard. There is another project on the board, focus only on the Atiny85 chip.
Upload the ISP Sketch to Arduino Nano
With the Arduino Nano with the IPS programmer sketch open, just select from Boards: Arduino Nano and upload the sketch to Arduino. After the upload you should see the Heartbeat LED slowly blinking.
Upload the Attiny85 Sketch
In other window of Arduino IDE you may upload the Attiny85 program. For testing choose the Blink sketch from the basic examples. Modify the PIN to blink to PIN 3.Connect the Attiny pin 2 (numbered by hardware layout, this is referred as PIN3 in the program) another LED and 220R resistor to see if the chip is programmed well.
In the IDE select Board: "Attiny", Processor: "Attiny85", Clock: "1Mhz Internal" , and as a programmer select "Arduino as ISP". Upload the sketch.
If all was done right, the LED connected to Attiny85 hw pin 2 should blink with 1s period.
Ebay programmer board
I have all excited also bought so called:"1PCS Development Programmer Board for ATtiny13A/ATtiny25/ATtiny45/ATtiny85" from ebay store.
It took me some time to realize that this is no programmer at all, it's just a breakout board so you don't need the breadboard and there is the ICSP pin laout. Do not waste time and money on this item.
Next Steps
Low power
Make the Attiny85 run for years on low power mode:http://www.technoblogy.com/show?KX0
https://learn.sparkfun.com/tutorials/h2ohno/low-power-attiny
This chip will either control the RF433 and Humidity sensors directly, or will control the power to those chips.
RF433 transmission
I want to use the VirtualWire library as this is also on the receiver.