Chat here is you are connecting ESP-xx type modules to existing AVR based Arduino

Moderator: igrr

User avatar
By gabhern
#26169 hello fools

today i bought a nodeMCU, for testing propouses and integrate my solution in Arduino whit this MC, i flashed and start to work with Arduino IDE.

i connected a HC-SR04 Ultrasonic Sensor and try to use the NewPing Library i fond this error:

fatal error: avr/pgmspace.h: No such file or directory
#include <avr/pgmspace.h>


i browse the web and i found the hacked library and seems good, but it appears a new error message:

fatal error: avr/io.h: No such file or directory
#include <avr/io.h>



i really want to program my NodeMCU with Arduino IDE but now i couldn't find info to how to manage Sensor With lua and found error using Arduino IDE

Help me its really important for me and i Didn't found info.
User avatar
By dmpotter
#26209 For some reason I have been having similar problems lately.

Not specifically that lib, it seems if I don't start with the example from the file menu then it can't find the libraries which are in the avr directory. It's like the environment path variables are hosed up. Programming directly to an UNO works fine, but when I try to program to the 8266 it has problems with avr/*.h files in this path
C:\Program Files (x86)\Arduino\hardware\tools\avr\avr\include\avr

My specific problem is with the avr/interrupt.h

Hopefully someone smarter than me knows what's going on.

Below is what I mean by using the examples from the libs. Even sketches that I have saved and bring back up won't compile, I have to load the example and paste in my previous working code.
Image
User avatar
By gabhern
#26213 I have been watching the examples for ultrasonic sensor in Lua code, but now I need to work with a nrf 2401 (radio module) and I didn't find anything. Anybody knows a Lua example or something, and I tried to use again arduino ide but I have the same problem, Avr libraries seem like missed libraries

Please help