Interrupt and Virtualwire

Hi

My hardware:

  • Arduino Uno
  • DR3100 434 MHz like TRX
  • DS18B20 one wire temperature sensor
  • Adafruit 2 pin 2 * 16 serial display

Project:

  • Simple remote temperature thermometer

I have based the basic program on the virtualwire example and the project is working fine.

I want to expand the project using an interrupt when data is presented from the remote sensor.
I have dedicated a pin for DR3100 reception and for interrupt.
Several experiments tells me that this is not simple. I have found out that it might be because of the serial communication.
If I let the DR3100 ISR increment a variable as the only task it works fine. But when adding the code for reception the code seems to crash.

Anybody with any idea how to solve this issue?

Best regards, Brian

Maybe I'm missing something. I don't quite follow where you are wanting to use an interrupt exactly. On the receiving end, VirtualWire uses a timer interrupt to continuously sample the receive signal and has a state machine to recognise, decode and store the received message. You don't need an additional interrupt to make that happen.

If you are looking for an asyc notification that a message has been received by VirtualWire, you could probably hack something into the VW code, but it would not wind up being any faster or more efficient than polling the receive message function already is.

Thanks for replying

My plan is to use a FIFO buffer. By using an ISR I hoped to add input to the buffer without taking care of this task in the rest of my program.

Best regards, Brian