[solved] fatal error: util/atomic.h: No such file or directory

So basically I'm trying to have a nodeMCU connect to an RF receiver and make it receive a signal from a transmitter connected to an arduino. When I try to compile, I get the above error. I've just copied the code from RadioHead: ask_receiver.pde Any suggestions?
P.S. I'm a huge noob and I'm really new to the arduino ecosystem so please be patient if possible. Thanks!

RF_module.ino (818 Bytes)

The version of the RH_ASK you are using is incompatible with either ESP8266 in general, or the version of the ESP8266 core you're using.

That sketch compiles without error for me:
Arduino IDE 1.8.9
2.5.2 of the ESP8266 Community core, installed via Board Manager

I tried boards "NodeMCU 0.9 (ESP-12 Module)" and "NodeMCU 1.0 (ESP-12E Module)"

johnwasser:
That sketch compiles without error for me:
Arduino IDE 1.8.9
2.5.2 of the ESP8266 Community core, installed via Board Manager

I tried boards "NodeMCU 0.9 (ESP-12 Module)" and "NodeMCU 1.0 (ESP-12E Module)"

Which version of radiohead?

Could be either the version of the core or the version of radiohead library.

DrAzzy:
Which version of radiohead?

Could be either the version of the core or the version of radiohead library.

My copy of RadioHead.h says "// $Id: RadioHead.h,v 1.71 2018/05/06 22:23:51 mikem Exp mikem $"

The latest seems to be: // $Id: RadioHead.h,v 1.76 2019/07/14 00:18:48 mikem Exp

johnwasser:
That sketch compiles without error for me:
Arduino IDE 1.8.9
2.5.2 of the ESP8266 Community core, installed via Board Manager

I tried boards "NodeMCU 0.9 (ESP-12 Module)" and "NodeMCU 1.0 (ESP-12E Module)"

When I flash my NodeMCU I have to use Generic ESP8266 board for some reason but I've tried using NodeMCU 0.9 (ESP-12 Module)" and "NodeMCU 1.0 (ESP-12E Module) both, but it still gives me the same error.

johnwasser:
My copy of RadioHead.h says "// $Id: RadioHead.h,v 1.71 2018/05/06 22:23:51 mikem Exp mikem $"

The latest seems to be: // $Id: RadioHead.h,v 1.76 2019/07/14 00:18:48 mikem Exp

So I tried updating my RadioHead library. I deleted the old library and on attempting to install the new one, the system tells me, "A library named RadioHead already exists". I think I might have to uninstall Arduino and then re-install it, so I'll do that.

You should be able to find the location of the installed RadioHead library by doing this:

  • File > Examples > RadioHead > open any example
  • Sketch > Show Sketch Folder - this will open the example sketch folder inside of the library folder.

pert:
You should be able to find the location of the installed RadioHead library by doing this:

  • File > Examples > RadioHead > open any example
  • Sketch > Show Sketch Folder - this will open the example sketch folder inside of the library folder.

I know where the folder is and I set the preferences accordingly. A new issue has arisen after doing the re-install. This is a two way communication between a transmitter connected to an Arduino Uno sending an RF signal to a receiver connected to the NodeMCU. The NodeMCU is now working after the library update, as referred to me by u/johnwasser. The issue now is I'm getting an error while trying to flash the Arduino.

Here's the error, if that helps:
c:/program files/windowsapps/arduinollc.arduinoide_1.8.21.0_x86__mdqgnx93n4wtt/hardware/tools/avr/bin/../lib/gcc/avr/5.4.0/../../../../avr/bin/ld.exe: C:\Users\jj\AppData\Local\Temp\arduino_build_506996/..\arduino_cache_544038\core\core_arduino_avr_uno_180a539c02cce575fcd7710170113f75.a(HardwareSerial.cpp.o): Relocations in generic ELF (EM: 94)

C:\Users\jj\AppData\Local\Temp\arduino_build_506996/..\arduino_cache_544038\core\core_arduino_avr_uno_180a539c02cce575fcd7710170113f75.a: error adding symbols: File in wrong format

collect2.exe: error: ld returned 1 exit status
exit status 1
Error compiling for board Arduino/Genuino Uno.
Invalid library found in C:\Users\jj\Documents\Arduino\libraries\libraries: no headers files (.h) found in C:\Users\jj\Documents\Arduino\libraries\libraries
Invalid library found in C:\Users\jj\Documents\Arduino\libraries\libraries: no headers files (.h) found in C:\Users\jj\Documents\Arduino\libraries\libraries

Please do this:

  • When you encounter an error, you'll see a button on the right side of the orange bar "Copy error messages" in the Arduino IDE (or the icon that looks like two pieces of paper at the top right corner of the black console window in the Arduino Web Editor). Click that button..
  • In a forum reply here, click on the reply field.
  • Click the </> button on the forum toolbar. This will add the forum's code tags markup to your reply.
  • Press "Ctrl + V". This will paste the error between the code tags.
  • Move the cursor outside of the code tags before you add any additional text to your reply.

If the text exceeds the forum's 9000 character limit, save it to a .txt file and post it as an attachment. If you click the "Reply" button here, you will see an "Attachments and other settings" link.

Okay pert, these are the error message is attached.

error.txt (16 KB)

My hypothesis is the compilation cache was populated when you were compiling for the ESP8266 board and for some reason the Arduino IDE is somehow still trying to use that cache when you're compiling for the Arduino/Genuino Uno board. Try closing all the Arduino IDE windows you have open and then restart the Arduino IDE again. That should clear the cache and hopefully fix the error. That definitely shouldn't be necessary, but it's the only thing that comes to mind for me. I've never seen this error before. I could definitely be wrong.

pert:
My hypothesis is the compilation cache was populated when you were compiling for the ESP8266 board and for some reason the Arduino IDE is somehow still trying to use that cache when you're compiling for the Arduino/Genuino Uno board. Try closing all the Arduino IDE windows you have open and then restart the Arduino IDE again. That should clear the cache and hopefully fix the error. That definitely shouldn't be necessary, but it's the only thing that comes to mind for me. I've never seen this error before. I could definitely be wrong.

You're a legend, pert. Thanks a ton.

You're welcome. I'm glad if I was able to be of assistance. Enjoy!
Per