-
Notifications
You must be signed in to change notification settings - Fork 2
Console
Victor Carreño edited this page Jan 28, 2015
·
1 revision
This section simulates a console on your iOS Device so that you can display any data on it even send data to the Arduino.
Functions
String incomingData()
void readConsole()
void writeConsole(String message)
Syntax
myiShield.readConsole();
String mensaje = myiShield.incomingData();
myiShield.writeConsole("Hello");
Returns
incomingData()
returns a String
readConsole
& writeConsole
return nothing
Parameters
String for writeConsole()
For readConsole
& incomingData()
nothing
Example
#include <boards.h>
#include <SPI.h>
#include <RBL_nRF8001.h>
#include "iShield.h"
iShield myiShield;
void setup()
{
// Init. and start BLE library.
ble_begin();
Serial.begin(9600);
}
void loop()
{
myiShield.readConsole();
String mensaje = myiShield.incomingData();
Serial.println(mensaje);
myiShield.writeConsole("Hello");
delay(1000);
myiShield.writeConsole("Hello2");
delay(1000);
myiShield.writeConsole("Hello3");
delay(1000);
}