Generating a Serial Interrupt on Nano Every

On the Nano and other boards, the library "NeoHWSerial" allows you to .attachInterrupt() to the default Arduino hardware Serial.

This library does not function on the Nano Every -- are there any implementations that work for the Nano Every, or any new built-in methods to accomplish the same thing?

The loop function of my arduino code requires blocking segments, so being able to trigger an interrupt on Serial events is required.

Thanks!

The Nano Every has a second UART that is connected to pins 0 and 1; accessible with Serial1.

Thanks for the reply -- I don't think that helps me much though. I need an interrupt on serial character receipt, much like the NeoHWSerial and NeoSWSerial libraries are able to provide -- though it seems these implementations aren't available on the Nano Every.

Some ideas.

You should be able to connect the Nano Every to the computer using a USB/TTL adaptor on Serial 1.

You may be able to write an ISR directly on that pin. If not, you can certainly jumper a wire from the Rx0 pin to another pin with an interrupt.

Alternatively, you may be able to get an interrupt from the USB serial directly. On the Nano Every, pins PB05 and PB04 are connected to the ATSAMD11 USB to TTL serial adapter chip. This is Serial. Those pins are not broken out on the Nano Every's Arduino pin headers.

But, on the Nano Every, all digital pins can have external interrupts. You may be write one for the Rx pin PB05 even though it is not broken out.

Can you explain why you need blocking code? What is so critical that it has to be non-blocking?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.