Go Down

Topic: "'RHEncryptedDriver' does not name a type" when running library example (Read 324 times) previous topic - next topic



I'm trying to run the nrf24_encrypted_server example from the RadioHead library but I keep getting this error

Arduino: 1.8.7 (Windows 10), Board: "Arduino/Genuino Uno"

nrf24_encrypted_server:23:1: error: 'RHEncryptedDriver' does not name a type

 RHEncryptedDriver driver(nrf24, myCipher); // Instantiate the driver with those two


C:\Users\Plop\Documents\Arduino\libraries\RadioHead\examples\nrf24\nrf24_encrypted_server\nrf24_encrypted_server.pde: In function 'void loop()':

nrf24_encrypted_server:46:7: error: 'driver' was not declared in this scope

   if (driver.available())


exit status 1
'RHEncryptedDriver' does not name a type

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

Does anybody have an idea why ?


Please post your full sketch. If possible you should always post code directly in the forum thread as text using code tags (</> button on the toolbar). This will make it easy for anyone to look at it, which will increase the likelihood of you getting help. If the sketch is longer than the forum will allow then it's OK to add it as an attachment.

Post a link to where you got the library(s) from. Please use the chain links icon on the toolbar to make it clickable. Or if you installed it using Library Manger (Sketch > Include Library > Manage Libraries) then say so and state the full name of the library.


Hi there. Welcome to the Forum.

Looks like a library problem. Please post your entire code with references to any non-standard libraries.
Live as if you were to die tomorrow. Learn as if you were to live forever. - Mahatma Gandhi


The RHEncryptedDriver.h file contains the line:
Code: [Select]
If that name is not defined the object class is not defined.  Looks like you un-comment that #define at the bottom of RadioHead.h
Send Bitcoin tips to: 1G2qoGwMRXx8az71DVP1E81jShxtbSh5Hp




I tried yesterday but I un-commented the wrong file.
I just tried now and it's working perfectly.


Go Up