a long time ago I bought this BLE red bear sheald I have just downloaded the library from redbear web site and when I try to compile the hello world example I get this..... its been a log time since I played with Arduino can anyone help please
Build options changed, rebuilding all
C:\Program Files (x86)\Arduino\libraries\RBL_nRF8001\examples\HelloWorld\HelloWorld.ino:25:23: fatal error: services.h: No such file or directory
#include <services.h>
^
compilation terminated.
exit status 1
Error compiling for board Arduino/Genuino Uno.
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
You need to post your complete sketch (using code tags--see the stickey at the head of the forum if you don't know).
That said, "no such file or directory" for a .h file probably means a missing or improperly installed library.
/*
Copyright (c) 2012-2014 RedBearLab
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/*
* HelloWorld
*
* HelloWorld sketch, work with the Chat iOS/Android App.
* It will send "Hello World" string to the App every 1 sec.
*
*/
//"services.h/spi.h/boards.h" is needed in every new project
#include <SPI.h>
#include <boards.h>
#include <RBL_nRF8001.h>
#include <services.h>
void setup()
{
//
// For BLE Shield:
// Default pins set to 9 and 8 for REQN and RDYN
// Set your REQN and RDYN here before ble_begin() if you need
//
// For Blend Micro:
// Default pins set to 6 and 7 for REQN and RDYN
// So, no need to set for Blend Micro.
//
//ble_set_pins(3, 2);
// Set your BLE Shield name here, max. length 10
ble_set_name("BlendMicro");
// Init. and start BLE library.
ble_begin();
// Enable serial debug
Serial.begin(57600);
}
unsigned char buf[16] = {0};
unsigned char len = 0;
void loop()
{
if ( ble_connected() )
{
ble_write('H');
ble_write('e');
ble_write('l');
ble_write('l');
ble_write('o');
ble_write(' ');
ble_write('W');
ble_write('o');
ble_write('r');
ble_write('l');
ble_write('d');
ble_write('!');
}
ble_do_events();
if ( ble_available() )
{
while ( ble_available() )
{
Serial.write(ble_read());
}
Serial.println();
}
delay(1000);
}
Still looks like a library problem.
Which library did you install (incl. link) and how did you install it (incl. details)?
What version of the Arduino IDE are you using? Note that GitHub says re the nRF8001 library "Tested with Arduino IDE 1.6.4 (we will only support this version)."
--Michael
edit: Also just noticed that your include statement appears to be wrong. The library is called nRF8001.h not RBL_nRF8001.h--which makes your include statement: #include <nRF8001.h>
One more detail. Did you remove the "-master" from the name of the library before installing it?
--M.