Arduino Manager, Adafruit nRF8001 Bluefruit LE and Arduino not talking

I need some help.

I have a Arduino Uno and a Adafruit BTLE which are connected and work with the Adafruit test sketches. I loaded the Arduino Manager on my iPhone 5 and when I tap on the Configuration button it turns blue and UART is display below it.

I wired up an LED to adjust brightness (Knob1) and a potentiometer (Pot) as shown in the Arduino Manager page 60as well as created a widget for each.

My problem is I can’t get either widget to control anything.

The sketch I’m using is from the Arduino Manager and load fine. It is shown below.

Thanks

/*

  • Test Arduino Manager for iPad / iPhone / Mac
  • A simple test program to show the Arduino Manager
  • features.
  • Author: Fabrizio Boco - fabboco@gmail.com
  • Version: 0.1
  • 06/15/2014
  • All rights reserved

*/

/*
*

  • IOSController library, IOSControllerWiFi library, IOSControllerSerial library (“The Software”) and the related documentation (“The Documentation”) are supplied to you
  • by the Author in consideration of your agreement to the following terms, and your use or installation of The Software and the use of The Documentation
  • constitutes acceptance of these terms.
  • If you do not agree with these terms, please do not use or install The Software.
  • The Author grants you a personal, non-exclusive license, under author’s copyrights in this original software, to use The Software.
  • Except as expressly stated in this notice, no other rights or licenses, express or implied, are granted by the Author, including but not limited to any
  • patent rights that may be infringed by your derivative works or by other works in which The Software may be incorporated.
  • The Software and the Documentation are provided by the Author on an “AS IS” basis. THE AUTHOR MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT
  • LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE SOFTWARE OR ITS USE AND OPERATION
  • ALONE OR IN COMBINATION WITH YOUR PRODUCTS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL DAMAGES (INCLUDING,
  • BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE,
  • REPRODUCTION AND MODIFICATION OF THE SOFTWARE AND OR OF THE DOCUMENTATION, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE),
  • STRICT LIABILITY OR OTHERWISE, EVEN IF THE AUTHOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

*/
#include <SPI.h>
#include “Adafruit_BLE_UART.h”
#include “IOSControllerForBluefruit.h”

#define YELLOWLEDPIN 4
#define CONNECTIONPIN 6
#define TEMPERATUREPIN 0
#define VARIABLELED 5
#define POTENTIOMETERPIN 3

int yellowLed;
int connectionLed;
int pot;
float temperature;

/*
*

  • Prototypes of IOSControllerForBluefruit’s callbacks

*/
void doWork();
void doSync(char *variable);
void processIncomingMessages(char *variable, char *value);
void processOutgoingMessages();
void deviceConnected();
void deviceDisconnected();

/*
*

  • IOSControllerForForBluefruit Library initialization

*/
IOSControllerForBluefruit iosController(&doWork,&doSync,&processIncomingMessages,&processOutgoingMessages,&deviceConnected,&deviceDisconnected);

void setup()
{
Serial.begin(9600);

// Yellow LED on
pinMode(YELLOWLEDPIN,OUTPUT);
yellowLed=HIGH;
digitalWrite(YELLOWLEDPIN,yellowLed);

// Red LED OFF
pinMode(CONNECTIONPIN,OUTPUT);
connectionLed=LOW;
digitalWrite(CONNECTIONPIN,connectionLed);

pinMode(VARIABLELED,OUTPUT);
//ledBrightness = 0;
analogWrite(VARIABLELED,0);

pinMode(POTENTIOMETERPIN,INPUT);
pinMode(TEMPERATUREPIN,INPUT);

Serial.println(F(“Setup completed”));
}

void loop() {

iosController.loop();
}

void doWork() {

temperature = getVoltage(TEMPERATUREPIN); //getting the voltage reading from the temperature sensor
temperature = (temperature - 0.5) * 100; // converting from 10 mv per degree with 500 mV offset
digitalWrite(YELLOWLEDPIN,yellowLed);
pot = analogRead(POTENTIOMETERPIN);
}

void doSync(char *variable) {

//Serial.print("Sync "); Serial.println(variable);

if (strcmp(variable,“S1”)==0) {

iosController.writeMessage(variable,digitalRead(YELLOWLEDPIN));
}

}

void processIncomingMessages(char *variable, char *value) {

//Serial.print("Variable “); Serial.print(variable); Serial.print(” “); Serial.print(” Value "); Serial.println(value);

if (strcmp(variable,“S1”)==0) {

yellowLed = atoi(value);
}

if (strcmp(variable,“Push1”) == 0) {

iosController.temporaryDigitalWrite(CONNECTIONPIN,LOW,500);
}

if (strcmp(variable,“Knob1”) == 0) {

analogWrite(VARIABLELED,atoi(value)/4);
}

}

void processOutgoingMessages() {

//Serial.println(“Outgoing”);

iosController.writeMessage(“T”,temperature);
iosController.writeMessage(“Led13”,yellowLed);
iosController.writeMessage(“Pot”,pot);
}

void deviceConnected() {

digitalWrite(CONNECTIONPIN,HIGH);
Serial.println(F(“deviceConnected”));
}

void deviceDisconnected() {

digitalWrite(CONNECTIONPIN,LOW);
Serial.println(F(“deviceDisconnected”));
}

/**
*

  • Auxiliary functions

*/

/*

  • getVoltage() – returns the voltage on the analog input defined by pin

*/
float getVoltage(int pin) {

return (analogRead(pin) * .004697); // converting from a 0 to 1023 digital range
// to 0 to 5 volts (each 1 reading equals ~ 5 millivolts
}