Examples don't work


#1
'IS_PIN_DIGITAL' was not declared in this scope

if (IS_PIN_DIGITAL(pin)) {

`#define IS_PIN_DIGITAL(p) ( (p) >= 2 && (p) < 22 )`

same with TOTAL_PINS


#2

updated my program from 1.6.9 to 1.8.0 and changed

#define TOTAL_PINS                    (14+1)

to

float TOTAL_PINS = (14+1)

and moved it below the rest of the program then copied and pasted it in above the main program then got this

Arduino: 1.8.0 (Windows 10), Board: “BLE_Nano2”

In file included from C:\Users\Windows 10\AppData\Local\Arduino15\packages\RedBear\hardware\nRF52832\0.0.2/cores/RBL_nRF52832/FEATURE_BLE/ble/BLE.h:20:0,

             from C:\Users\Windows 10\AppData\Local\Arduino15\packages\RedBear\hardware\nRF52832\0.0.2/cores/RBL_nRF52832/FEATURE_BLE/nRF5x_BLE_API.h:5,

             from C:\Users\Windows 10\Documents\Arduino\BLEController\BLEController.ino:73:

C:\Users\Windows 10\AppData\Local\Arduino15\packages\RedBear\hardware\nRF52832\0.0.2/cores/RBL_nRF52832/FEATURE_BLE/ble/blecommon.h:21:1: error: expected ‘,’ or ‘;’ before ‘extern’

extern “C” {

^

In file included from C:\Users\Windows 10\AppData\Local\Arduino15\packages\RedBear\hardware\nRF52832\0.0.2/cores/RBL_nRF52832/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NRF5/source/nRF5xCharacteristicDescriptorDiscoverer.h:24:0,

             from C:\Users\Windows 10\AppData\Local\Arduino15\packages\RedBear\hardware\nRF52832\0.0.2/cores/RBL_nRF52832/FEATURE_BLE/nRF5x_BLE_API.h:48,

             from C:\Users\Windows 10\Documents\Arduino\BLEController\BLEController.ino:73:

C:\Users\Windows 10\AppData\Local\Arduino15\packages\RedBear\hardware\nRF52832\0.0.2/cores/RBL_nRF52832/mbed_os/sdk/softdevice/s132/headers/nrf_ble_gattc.h:335:20: error: expected declaration before end of line

SVCALL(SD_BLE_GATTC_PRIMARY_SERVICES_DISCOVER, uint32_t, sd_ble_gattc_primary_services_discover(uint16_t conn_handle, uint16_t start_handle, ble_uuid_t const *p_srvc_uuid));

                ^

Multiple libraries were found for “Servo.h”
Used: C:\Users\Windows 10\AppData\Local\Arduino15\packages\RedBear\hardware\nRF52832\0.0.2\libraries\Servo
Not used: C:\Users\Windows 10\Downloads\arduino-1.8.0\libraries\Servo
exit status 1
Error compiling for board BLE_Nano2.

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


#3

ok, figured it out - anyone else who shares my problem, try fully deleting and re-installing Arduino IDE and only installing necessary libraries.