hey guys
i have a problem i have an attiny 45 here
and i want to run the virtual wire library
but it wont work it says
C:\Users\peter\Desktop\arduino-0023\libraries\VirtualWire\VirtualWire.cpp: In function 'void vw_setup(uint16_t)':
C:\Users\peter\Desktop\arduino-0023\libraries\VirtualWire\VirtualWire.cpp:259: error: 'TCCR1A' was not declared in this scope
C:\Users\peter\Desktop\arduino-0023\libraries\VirtualWire\VirtualWire.cpp:260: error: 'TCCR1B' was not declared in this scope
C:\Users\peter\Desktop\arduino-0023\libraries\VirtualWire\VirtualWire.cpp:260: error: 'WGM12' was not declared in this scope
can somone help
i realy need it
here is the script btw
// transmitter.pde
//
// Simple example of how to use VirtualWire to transmit messages
// Implements a simplex (one-way) transmitter with an TX-C1 module
//
// See VirtualWire.h for detailed API docs
// Author: Mike McCauley (mikem@open.com.au)
// Copyright (C) 2008 Mike McCauley
// $Id: transmitter.pde,v 1.3 2009/03/30 00:07:24 mikem Exp $
#include <VirtualWire.h>
#undef int
#undef abs
#undef double
#undef float
#undef round
const int led_pin = 0;
void setup()
{
pinMode(2,INPUT);
digitalWrite(2,HIGH); //Only this line new
pinMode(3,INPUT);
digitalWrite(3,HIGH); //Only this line new
// Initialise the IO and ISR
vw_set_ptt_inverted(true); // Required for RF Link module
vw_setup(2000); // Bits per sec
vw_set_tx_pin(1); // pin 3 is used as the transmit data out into the TX Link module, change this to suit your needs.
}
void loop()
{
if (digitalRead(2) == LOW) { // check if the button is pressed
const char *msg = "10"; // this is your message to send
vw_send((uint8_t *)msg, strlen(msg));
vw_wait_tx();
digitalWrite(led_pin, HIGH); // Wait for message to finish
delay(100);
}
else{digitalWrite(led_pin, LOW);}
if (digitalRead(3) == LOW) { // check if the button is pressed
const char *msg = "01"; // this is your message to send
vw_send((uint8_t *)msg, strlen(msg));
vw_wait_tx();
digitalWrite(led_pin, HIGH); // Wait for message to finish
delay(100);
}
else{digitalWrite(led_pin, LOW);}
}