Hi everyboddy,
i have a problem with my programm.
it dosn´t work on a at Tiny84.
the programm run on Arduino Nano.
Can you help me to find the error.
Sorry about my English.
dirk
/*
* 433-MHz-Sender
* 03/10/17 - Für DB von SMS
*/
#include <VirtualWire.h>
// SenderID und Pins
const int txId = 1;
const int txPin = 0; output for atTiny84
const int humPin = 1; input for atTiny84
// Daten
typedef struct Data
{
int _id;
int _hum;
};
void setup()
{
pinMode(humPin,INPUT);
pinMode(txPin,OUTPUT);
// Drahtlose Schnittstelle (2000 bits/s)
vw_setup(2000);
// SenderPin wird gesetzt
vw_set_tx_pin(txPin);
}
void loop()
{
// Datentyp für Sendedaten
struct Data sendData;
// Messwerte werden in sendData gesetzt
sendData._id = txId;
sendData._hum = analogRead(humPin);
// Daten senden
vw_send((uint8_t*)&sendData, sizeof(sendData));
vw_wait_tx();
delay(2000);
}