RGB LED With ATtiny85 Part 2

I’ve updated my script and removed the pot from my design, so that now it just fades between random colours on its own, using an LDR to tell if its dark enough to turn on or so light that it should turn itself off as you wouldn’t see the LED anyway: // init vars const int REDPIN = 1; // 85 leg 6 const int GREENPIN = 0; // 85 leg 5 const int BLUEPIN = 4; // 85 leg 3 const int LDR = 3; // 85 leg 2 const int THRESHOLD = 200; int last_time; int red; int green; int blue; int current_red; int current_green; int current_blue; void doFade(int pin, int &val, int &current_val) { // val and current_val are passed as references // so modifying them will actually modify e.

RGB LED With ATtiny85

I just found that the ATtiny85 actually has 3 PWM pins, not 2 (well you can push it to 4 I believe) so it seemed like the ideal test for my recently received RGB common cathode LED. I setup the breadboard as shown below (doesn’t look great on Fritzing due to the weird way the LED is drawn sideways) note that the longer pin is the common cathode: I used the arduino-tiny core with the recent round() macro fix for the ATtiny85-20PU at 8MHz, which I programmed using the ArduinoISP sketch.

ATtiny85 programming using Mega2560 as ISP

I’ve been burning sketches to an ATtiny85-20PU and burning bootloaders to ATmega328P-PU’s today. The pinouts below are for the physical pins on the ATtiny85/ATmega328P, and the Arduino pins for the Mega2560: TINY MEGA 328P MISO 6 50 18 MOSI 5 51 17 SCK 7 52 19 RESET 1 53 1 VCC 8 5V 7 GND 4 GND 8 After uploading the ArduinoISP sketch to the Mega2560, add the 10uF capacitor between RESET and GND on the 2560 and upload sketches normally (select “ATtiny85 8MHz internal” as Board) or “Burn Bootloader”.

Arduino Weather Station

I’ve just finished putting together my Arduino-based weather station on breadboard. I’ve removed the Arduino Mega 2560r3 and put the ATmega328P-PU on the breadboard with some capacitors, a 16MHz crystal, some LED’s, an LM7805 voltage regulator (takes 9V from battery down to 5V) and of course the Nokia 5110 LCD, BMP085 barometric pressure sensor and DHT11 temperature sensor. I thought the temperature values were a bit off, but both the DHT and BMP give similar readings, so I guess my house thermostat is a couple of degrees out.

Breadboard Arduino/Shrimp Components

Parts lists for my Arduino On A Breadboard, Standalone Arduino and/or a Shrimp projects: 100x 100nF capacitors 2x 400 point breadboards 170 point breadboard 10x LM7805 voltage regulators 100x 22pF capacitors 20x 16MHz crystals 50x 10uF capacitors 4x ATtiny85-20PU 2x Atmega 328P-PU – with Uno bootloader, one replacement and one new one 2x Atmega 328P-PU – no bootloader CP2102 USB UART – with DTR pin for programming Arduino’s without an Arduino 2x 20MHz crystals 5x CR2032 3V coin cell batteries 5x coin cell battery holders 40x male-male Dupont cables DT830D multimeter I2C backpack for 16×2 LCD HD44780 LCD BMP085 barometric pressure sensor DHT11 humidity/temperature sensor Nokia 5110 LCD – replacement 6m heat shrink tubing 5x Veroboards 4050 logic level converter (buffer) 5x LM1117T 3.