Você está na página 1de 252

Fabrizio Boco

fabboco@gmail.com

Arduino Manager
iPhone/iPad

Tutorial and Documentation

Version: 9.0
04/02/2016
Arduino Manager Fabrizio Boco

Disclaimer

IOSController libraries, SIOSController libraries, example scketches (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.

Version: 9.0 2/252


Arduino Manager Fabrizio Boco

Credits

Arduino Manager uses the following additional software:

LGViewHUD (https://github.com/y0n3l/LGViewHUD)

DCControls (https://github.com/domesticcatsoftware/DCControls)

GCDAsyncSocket (https://github.com/robbiehanson/CocoaAsyncSocket)

CocoaHTTPServer (https://github.com/robbiehanson/CocoaHTTPServer)

F3BarGauge (https://www.cocoacontrols.com/controls/f3bargauge)

NKOColorPickerView
(https://www.cocoacontrols.com/search?utf8=&q=NKOColorPickerView)

Pdf Reader (https://github.com/vfr/Reader)

OpenEars (http://www.politepix.com/openears)

AES Encryption library for Arduino adapted - (https://github.com/spaniakos/AES)

Sounds from Mike Koenig (http://soundbible.com) under Attribution 3.0 license.

Many thanks to the authors for the valuable work they did.

Version: 9.0 3/252


Arduino Manager Fabrizio Boco

Index

1 What is Arduino Manager and how to use it .............................................................................................. 14


1.1 SD Management changes from version 2.0 ........................................................................................... 20
1.2 Switch Widget and Rotary Switch How to use them ........................................................................... 21
1.3 Display Widget How to use it ............................................................................................................... 22
1.4 Gauge Widget How to use it ................................................................................................................ 23
1.5 Bar Widget How to use it ..................................................................................................................... 24
1.6 LED Widget How to use it ................................................................................................................... 24
1.7 Switch & LED Widget How to use it .................................................................................................... 25
1.8 Push Button and Secure Push Button How to use them ..................................................................... 26
1.9 Graph Widget How to use it ................................................................................................................ 27
1.10 Logged Data Graph Widget How to use it ........................................................................................... 29
1.11 Alarm Widget How to use it ................................................................................................................. 32
1.12 Threshold Widget How to use it .......................................................................................................... 33
1.13 Thermostat Widget ................................................................................................................................. 35
1.14 Alarm Sound Widget How to use it ...................................................................................................... 36
1.15 Command Widget How to use it .......................................................................................................... 37
1.16 Rover Controller Widget How to use it ................................................................................................ 38
1.17 Joystick Widget How to use it .............................................................................................................. 39
1.18 Console Widget How to use it ............................................................................................................. 39
1.19 iBeacon Widget How to use it ............................................................................................................. 40
1.20 USTREAM Widget How to use it ......................................................................................................... 41
1.21 Color Picker Widget How to use it ....................................................................................................... 43
1.22 Accelerometer Widget How to use it ................................................................................................... 43
1.23 Gyroscope Widget How to use it ......................................................................................................... 44
1.24 Bubble Level Widget How to use it ...................................................................................................... 44
1.25 Voice Commands Widget How to use it .............................................................................................. 44
1.26 GPS Widget How to use it ................................................................................................................... 45
1.27 Widget Lists Management ...................................................................................................................... 47
1.27.1 Saving a Widget Configuration on your device ........................................................................................... 47
1.27.2 Saving a Widget Configuration on iCloud ................................................................................................... 48
1.27.3 Saving a Widget Configuration on Dropbox ............................................................................................... 48
1.27.4 Sharing Widget Configuration ..................................................................................................................... 48
1.28 Network Configuration ............................................................................................................................ 49
1.28.1 Port Forwarding .......................................................................................................................................... 49
1.28.2 Dynamic DDNS........................................................................................................................................... 51
1.29 Security and Encryption ......................................................................................................................... 51
1.30 Voice Commands ................................................................................................................................... 52

Version: 9.0 4/252


Arduino Manager Fabrizio Boco

2 Compatibility Matrix ..................................................................................................................................... 55


3 Arduino Manager and Ethernet Shield for the impatient .......................................................................... 59
3.1 Step 1 - Test Circuit ................................................................................................................................ 59
3.2 Step 2 Install IOSController Library ..................................................................................................... 60
3.2.1 Windows ..................................................................................................................................................... 60
3.2.2 Mac ............................................................................................................................................................. 61
3.2.3 Linux ........................................................................................................................................................... 62
3.3 Step 3 Configure IOSController Library ............................................................................................... 63
3.4 Step 4 Arduino Ethernet Shield ........................................................................................................... 63
3.5 Step 5 Open the example sketch ........................................................................................................ 63
3.6 Step 6 Connect Arduino Manager to the board ................................................................................... 65
3.7 Step 7 Configure Arduino Manager ..................................................................................................... 65
3.8 Step 8 Move a Widget ......................................................................................................................... 66
3.9 Step 9 Delete a Widget ....................................................................................................................... 67
3.10 Using encrypted communication ............................................................................................................ 67
4 Arduino Manager and Adafruit WINC1500 for the impatient .................................................................... 68
4.1 Step 1 - Test Circuit ................................................................................................................................ 68
4.1.1 Arduino UNO - Mega .................................................................................................................................. 68
4.1.2 Arduino Zero ............................................................................................................................................... 69
4.2 Step 2 Install IOSControllerWINC1500 Library ................................................................................... 71
4.2.1 Windows ..................................................................................................................................................... 71
4.2.2 Mac ............................................................................................................................................................. 72
4.2.3 Linux ........................................................................................................................................................... 73
4.3 Step 3 Configure the library ................................................................................................................. 74
4.4 Step 4 Open the example sketch ........................................................................................................ 74
4.5 Other steps ............................................................................................................................................. 75
4.6 Using encrypted communication ............................................................................................................ 75
5 Arduino Manager and WiFi Shield for the impatient ................................................................................. 76
5.1 Step 1 - Test Circuit ................................................................................................................................ 76
5.2 Step 2 - Install IOSControllerWiFi Library .............................................................................................. 76
5.2.1 Windows ..................................................................................................................................................... 76
5.2.2 Mac ............................................................................................................................................................. 77
5.2.3 Linux ........................................................................................................................................................... 78
5.3 Step 3 Configure IOSControllerWiFi Library ....................................................................................... 79
5.4 Step 4 Arduino WiFi Shield ................................................................................................................. 79
5.5 Step 4 Open the example sketch ........................................................................................................ 79
5.6 Step 5 Other steps .............................................................................................................................. 80
6 Arduino Manager and ESP8266 for the impatient ..................................................................................... 81
6.1 Step 1 - Test Circuit ................................................................................................................................ 81
6.1.1 Arduino Mega ............................................................................................................................................. 82
6.1.2 Arduino Zero ............................................................................................................................................... 83

Version: 9.0 5/252


Arduino Manager Fabrizio Boco

6.2 Step 2 - Install IOSControllerForESP8266 Library ................................................................................. 84


6.2.1 Windows ..................................................................................................................................................... 84
6.2.2 Mac ............................................................................................................................................................. 85
6.2.3 Linux ........................................................................................................................................................... 86
6.3 Step 3 Check ESP8622 firmware ........................................................................................................ 86
6.4 Step 4 Open the example sketch ........................................................................................................ 87
6.5 Step 5 Connect Arduino Manager to the board ................................................................................... 87
6.6 Step 6 Configure Arduino Manager ..................................................................................................... 88
6.7 Step 7 Move a Widget ......................................................................................................................... 89
6.8 Step 8 Delete a Widget ....................................................................................................................... 89
7 Teensy, Arduino Manager and ESP8266 for the impatient ....................................................................... 90
7.1 Step 1 - Test Circuit ................................................................................................................................ 90
7.2 Step 2 - Install IOSControllerForESP8266 Library ................................................................................. 92
7.2.1 Windows ..................................................................................................................................................... 92
7.2.2 Mac ............................................................................................................................................................. 93
7.2.3 Linux ........................................................................................................................................................... 94
7.3 Step 3 Check ESP8622 firmware ........................................................................................................ 94
7.4 Step 4 Open the example sketch ........................................................................................................ 95
7.5 Connect Arduino Manager to the board ................................................................................................. 95
7.6 Step 6 Configure Arduino Manager ..................................................................................................... 96
7.7 Step 7 Move a Widget ......................................................................................................................... 96
7.8 Step 8 Delete a Widget ....................................................................................................................... 97
8 Arduino Manager and RFduino for the impatient ...................................................................................... 98
8.1 Step 1 Test Circuit ............................................................................................................................. 100
8.2 Step 2 Install IOSControllerForRFduino Library ................................................................................ 101
8.2.1 Windows ................................................................................................................................................... 101
8.2.2 Mac ........................................................................................................................................................... 102
8.2.3 Linux ......................................................................................................................................................... 103
8.3 Step 3 Open the example sketch ...................................................................................................... 103
8.4 Step 4 Connect Arduino Manager to the board ................................................................................. 103
8.5 Step 5 Configure Arduino Manager ................................................................................................... 104
8.6 Step 6 Move a Widget ....................................................................................................................... 105
8.7 Step 7 Delete a Widget ..................................................................................................................... 105
8.8 Using encrypted communication .......................................................................................................... 105
9 Arduino Manager and Adafruit nRF8001 Bluefruit LE Breakout for the impatient ............................... 107
9.1 Step 1 Test Circuit ............................................................................................................................. 107
9.2 Step 2 Install IOSControllerForBluefruit Library ................................................................................ 110
9.2.1 Windows ................................................................................................................................................... 110
9.2.2 Mac ........................................................................................................................................................... 111
9.2.3 Linux ......................................................................................................................................................... 112
9.3 Step 3 Open the example sketch ...................................................................................................... 113

Version: 9.0 6/252


Arduino Manager Fabrizio Boco

9.4 Step 4 - Connect Arduino Manager to the board .................................................................................. 113


9.5 Step 6 Configure Arduino Manager ................................................................................................... 114
9.6 Step 7 Move a Widget ....................................................................................................................... 114
9.7 Step 8 - Delete a Widget ...................................................................................................................... 115
9.8 Using encrypted communication .......................................................................................................... 115
10 Arduino Manager and Adafruit Bluefruit SPI Friend for the impatient .................................................. 116
10.1 Step 1 Test Circuit ............................................................................................................................. 116
10.1.1 Arduino Uno / Mega .................................................................................................................................. 116
10.1.2 Arduino Zero ............................................................................................................................................. 118
10.2 Step 2 - Install Adafruit BluefruitLE nRF51 ........................................................................................... 120
10.3 Step 3 Install IOSControllerForBluefruitSPIFriend Library ................................................................ 121
10.3.1 Windows ................................................................................................................................................... 121
10.3.2 Mac ........................................................................................................................................................... 121
10.3.3 Linux ......................................................................................................................................................... 122
10.4 Step 4 Open the example sketch ...................................................................................................... 123
10.5 Step 5 - Connect Arduino Manager to the board .................................................................................. 123
10.6 Step 6 - Configure Arduino Manager .................................................................................................... 123
10.7 Step 8 Move a Widget ....................................................................................................................... 124
10.8 Step 9 - Delete a Widget ...................................................................................................................... 124
11 Teensy, Arduino Manager and Adafruit nRF8001 Bluefruit LE Breakout for the impatient ................ 125
11.1 Step 1 Test Circuit ............................................................................................................................. 125
11.2 Step 2 Install IOSControllerTeensyForBluefruit Library .................................................................... 127
11.2.1 Windows ................................................................................................................................................... 127
11.2.2 Mac ........................................................................................................................................................... 128
11.2.3 Linux ......................................................................................................................................................... 129
11.3 Step 3 Open the example sketch ...................................................................................................... 129
11.4 Step 4 - Connect Arduino Manager to the board .................................................................................. 130
11.5 Step 6 Configure Arduino Manager ................................................................................................... 130
11.6 Step 7 Move a Widget ....................................................................................................................... 130
11.7 Step 8 - Delete a Widget ...................................................................................................................... 130
11.8 Using encrypted communication .......................................................................................................... 130
12 Arduino Manager and RedBearLab BLE Shield for the impatient ......................................................... 132
12.1 Step 1 Test Circuit ............................................................................................................................. 132
12.2 Step 2 Install required libraries .......................................................................................................... 133
12.3 Step 3 Install IOSControllerBLE Library ............................................................................................ 134
12.3.1 Windows ................................................................................................................................................... 134
12.3.2 Mac ........................................................................................................................................................... 134
12.3.3 Linux ......................................................................................................................................................... 135
12.4 Step 4 RedBearLab BLE Shield ........................................................................................................ 136
12.5 Step 5 - Open the example sketch ....................................................................................................... 136

Version: 9.0 7/252


Arduino Manager Fabrizio Boco

12.6 Step 6 Connect Arduino Manager to the board ................................................................................. 136


12.7 Step 7 Configure Arduino Manager ................................................................................................... 137
12.8 Step 8 Move a Widget ....................................................................................................................... 137
12.9 Step 9 - Delete a Widget ...................................................................................................................... 137
13 Arduino Manager and Adafruit CC3000 Breakout for the impatient ...................................................... 138
13.1 Step 1 Test Circuit ............................................................................................................................. 139
13.2 Step 2 Install Adafruit CC3000 Library .............................................................................................. 141
13.3 Step 3 Install IOSControllerWiFiCC3000 Library .............................................................................. 141
13.3.1 Windows ................................................................................................................................................... 141
13.3.2 Mac ........................................................................................................................................................... 142
13.4 Step 4 Open the example sketch ...................................................................................................... 143
13.5 Step 5 Connect Arduino Manager to the board ................................................................................. 143
13.6 Step 6 Configure Arduino Manager ................................................................................................... 144
13.7 Step 7 Other steps ............................................................................................................................ 145
13.8 Using encrypted communication .......................................................................................................... 145
14 Arduino Manager and Arduino Yun for impatient ................................................................................... 147
14.1 Step 1 Test Circuit ............................................................................................................................. 147
14.2 Step 2 Install IOSControllerForYun Library ....................................................................................... 147
14.2.1 Windows ................................................................................................................................................... 147
14.2.2 Mac ........................................................................................................................................................... 148
14.2.3 Linux ......................................................................................................................................................... 149
14.3 Step 3 Open the example sketch ...................................................................................................... 149
14.4 Step 4 Connect Arduino Manager to the board ................................................................................. 150
14.5 Step 5 Configure Arduino Manager ................................................................................................... 150
14.6 Step 6 Move a Widget ....................................................................................................................... 150
14.7 Step 7 Delete a Widget ..................................................................................................................... 150
15 Arduino Manager and Intel Galileo for impatient .................................................................................... 151
15.1 Step 1 Test Circuit ............................................................................................................................. 151
15.2 Step 2 Install IOSControllerForGalileo Library .................................................................................. 151
15.2.1 Windows ................................................................................................................................................... 151
15.2.2 Mac ........................................................................................................................................................... 151
15.2.3 Linux ......................................................................................................................................................... 152
15.3 Step 3 Fix the libraries ....................................................................................................................... 152
15.4 Step 4 Open the example sketch ...................................................................................................... 153
15.5 Step 5 Set the board clock ................................................................................................................ 153
15.6 Step 6 Connect Arduino Manager to the board ................................................................................. 154
15.7 Step 7 Configure Arduino Manager ................................................................................................... 154
15.8 Step 8 Move a Widget ....................................................................................................................... 154
15.9 Step 9 Delete a Widget ..................................................................................................................... 154

Version: 9.0 8/252


Arduino Manager Fabrizio Boco

16 Development Manual IOSController ......................................................................................................... 155


16.1 IOSController Library ............................................................................................................................ 155
16.2 How to reduce Library memory occupation .......................................................................................... 155
16.3 Available Functions .............................................................................................................................. 156
16.3.1 IOSController ............................................................................................................................................ 156
16.3.2 IOSController ............................................................................................................................................ 157
16.3.3 loop ........................................................................................................................................................... 158
16.3.4 writeMessage............................................................................................................................................ 158
16.3.5 writeTripleMessage................................................................................................................................... 158
16.3.6 writeTxtMessage....................................................................................................................................... 159
16.3.7 temporaryDigitalWrite ............................................................................................................................... 159
16.3.8 sendFileList .............................................................................................................................................. 160
16.3.9 sendFile .................................................................................................................................................... 160
16.3.10 setNTPServerAddress .............................................................................................................................. 160
16.3.11 log ............................................................................................................................................................. 160
16.3.12 logLn ......................................................................................................................................................... 161
16.3.13 sdLogLabels ............................................................................................................................................. 161
16.3.14 sdLog ........................................................................................................................................................ 163
16.3.15 sdPurgeLogData ....................................................................................................................................... 165
16.3.16 now ........................................................................................................................................................... 165
16.4 Sketch skeleton for IOSController support ........................................................................................... 165
17 Development Manual IOSControllerWINC1500 ........................................................................................ 170
17.1 IOSControllerWINC1500 Library .......................................................................................................... 170
17.2 How to reduce Library memory occupation .......................................................................................... 171
17.3 Available Functions .............................................................................................................................. 171
17.3.1 IOSControllerWINC1500 .......................................................................................................................... 171
17.3.2 IOSControllerWINC1500 .......................................................................................................................... 172
17.3.3 loop ........................................................................................................................................................... 173
17.3.4 writeMessage............................................................................................................................................ 173
17.3.5 writeTripleMessage................................................................................................................................... 173
17.3.6 writeTxtMessage....................................................................................................................................... 173
17.3.7 temporaryDigitalWrite ............................................................................................................................... 173
17.3.8 setNTPServerAddress .............................................................................................................................. 173
17.3.9 log ............................................................................................................................................................. 173
17.3.10 logLn ......................................................................................................................................................... 174
17.3.11 now ........................................................................................................................................................... 174
17.4 Sketch skeleton for IOSControllerWINC1500 support ......................................................................... 174
18 Development Manual IOSControllerWiFi .................................................................................................. 179
18.1 IOSControllerWiFi Library .................................................................................................................... 179
18.2 How to reduce Library memory occupation .......................................................................................... 179
18.3 Available Functions .............................................................................................................................. 180
18.3.1 IOSControllerWiFi ..................................................................................................................................... 180
18.3.2 IOSControllerWiFi ..................................................................................................................................... 181
18.3.3 loop ........................................................................................................................................................... 182
18.3.4 writeMessage............................................................................................................................................ 182
18.3.5 writeMessage............................................................................................................................................ 182
18.3.6 writeTxtMessage....................................................................................................................................... 182
18.3.7 temporaryDigitalWrite ............................................................................................................................... 182
18.3.8 sendFileList .............................................................................................................................................. 182

Version: 9.0 9/252


Arduino Manager Fabrizio Boco

18.3.9 sendFile .................................................................................................................................................... 182


18.3.10 setNTPServerAddress .............................................................................................................................. 183
18.3.11 log ............................................................................................................................................................. 183
18.3.12 logLn ......................................................................................................................................................... 183
18.3.13 sdLogLabels ............................................................................................................................................. 183
18.3.14 sdLog ........................................................................................................................................................ 183
18.3.15 sdPurgeLogData ....................................................................................................................................... 183
18.3.16 now ........................................................................................................................................................... 183
18.4 Sketch skeleton for IOSControllerWiFi support .................................................................................... 184
18.5 Code example for controlling a Rover Robot ....................................................................................... 188
19 Development Manual IOSControllerForESP8622 .................................................................................... 189
19.1 IOSControllerForESP8622 Library ....................................................................................................... 189
19.2 Not supported Widgets ......................................................................................................................... 189
19.3 Available Functions .............................................................................................................................. 189
19.3.1 IOSControllerForESP8622 ....................................................................................................................... 189
19.3.2 IOSControllerForESP8622 ....................................................................................................................... 190
19.3.3 begin ......................................................................................................................................................... 191
19.3.4 loop ........................................................................................................................................................... 191
19.3.5 writeMessage............................................................................................................................................ 191
19.3.6 writeMessage............................................................................................................................................ 191
19.3.7 writeTripleMessage................................................................................................................................... 192
19.3.8 writeTxtMessage....................................................................................................................................... 192
19.3.9 temporaryDigitalWrite ............................................................................................................................... 192
19.3.10 setNTPServerAddress .............................................................................................................................. 192
19.3.11 Log ............................................................................................................................................................ 192
19.3.12 logLn ......................................................................................................................................................... 192
19.3.13 now ........................................................................................................................................................... 192
19.4 Sketch skeleton for IOSControllerForESP8622 support ...................................................................... 192
20 Development Manual IOSControllerForRFduino ..................................................................................... 197
20.1 IOSControllerForRFduino Library ......................................................................................................... 197
20.2 Not supported Widgets ......................................................................................................................... 197
20.3 Available Functions .............................................................................................................................. 198
20.3.1 IOSControllerForRFduino ......................................................................................................................... 198
20.3.2 Loop .......................................................................................................................................................... 198
20.3.3 writeMessage............................................................................................................................................ 198
20.3.4 writeTripleMessage................................................................................................................................... 199
20.3.5 writeTxtMessage....................................................................................................................................... 199
20.3.6 temporaryDigitalWrite ............................................................................................................................... 199
20.3.7 log ............................................................................................................................................................. 199
20.3.8 logLn ......................................................................................................................................................... 199
20.3.9 now ........................................................................................................................................................... 199
20.4 Sketch skeleton for IOSControllerForRFduino support ........................................................................ 199
21 Development Manual IOSControllerForBluefruit ..................................................................................... 202
21.1 IOSControllerForBluefruit Library ......................................................................................................... 202
21.2 Not supported Widgets ......................................................................................................................... 202
21.3 Available Functions .............................................................................................................................. 202
21.3.1 IOSControllerForBluefruit ......................................................................................................................... 202

Version: 9.0 10/252


Arduino Manager Fabrizio Boco

21.3.2 loop ........................................................................................................................................................... 203


21.3.3 writeMessage............................................................................................................................................ 203
21.3.4 writeTripleMessage................................................................................................................................... 203
21.3.5 writeTxtMessage....................................................................................................................................... 203
21.3.6 temporaryDigitalWrite ............................................................................................................................... 204
21.3.7 log ............................................................................................................................................................. 204
21.3.8 logLn ......................................................................................................................................................... 204
21.4 Sketch skeleton for IOSControllerForBluefruit support ........................................................................ 204
22 Development Manual IOSControllerForBluefruitSPIFriend .................................................................... 207
22.1 IOSControllerForBluefruitSPIFriend Library ......................................................................................... 207
22.2 Not supported Widgets ......................................................................................................................... 207
22.3 Available Functions .............................................................................................................................. 208
22.3.1 IOSControllerForBluefruitSPIFriend ......................................................................................................... 208
22.3.2 loop ........................................................................................................................................................... 208
22.3.3 writeMessage............................................................................................................................................ 208
22.3.4 writeTripleMessage................................................................................................................................... 209
22.3.5 writeTxtMessage....................................................................................................................................... 209
22.3.6 temporaryDigitalWrite ............................................................................................................................... 209
22.3.7 log ............................................................................................................................................................. 209
22.3.8 logLn ......................................................................................................................................................... 209
22.4 Sketch skeleton for IOSControllerForBluefruitSPIFriend support ........................................................ 209
23 Development Manual IOSControllerTeensyForBluefruit ........................................................................ 212
23.1 IOSControllerTeensyForBluefruit Library ............................................................................................. 212
23.2 Not supported Widgets ......................................................................................................................... 212
23.3 Available Functions .............................................................................................................................. 213
23.3.1 IOSControllerTeensyForBluefruit ............................................................................................................. 213
24 Development Manual IOSControllerBLE .................................................................................................. 214
24.1 IOSControllerBLE Library ..................................................................................................................... 214
24.2 Not supported Widgets ......................................................................................................................... 214
24.3 How to reduce Library memory occupation .......................................................................................... 214
24.4 Available Functions .............................................................................................................................. 215
24.4.1 IOSControllerBLE ..................................................................................................................................... 215
24.4.2 IOSControllerBLE ..................................................................................................................................... 215
24.4.3 loop ........................................................................................................................................................... 216
24.4.4 writeMessage............................................................................................................................................ 216
24.4.5 writeTripleMessage................................................................................................................................... 216
24.4.6 writeTxtMessage....................................................................................................................................... 216
24.4.7 temporaryDigitalWrite ............................................................................................................................... 217
24.4.8 log ............................................................................................................................................................. 217
24.4.9 logLn ......................................................................................................................................................... 217
24.4.10 now ........................................................................................................................................................... 217
24.5 Sketch skeleton for IOSControllerBLE support .................................................................................... 217
25 Development Manual IOSControllerWiFiCC3000 .................................................................................... 221
25.1 IOSControllerWiFiCC3000 Library ....................................................................................................... 221
25.2 How to reduce Library memory occupation .......................................................................................... 221

Version: 9.0 11/252


Arduino Manager Fabrizio Boco

25.3 Available Functions .............................................................................................................................. 221


25.3.1 IOSControllerWiFiCC3000........................................................................................................................ 221
25.3.2 IOSControllerWiFiCC3000........................................................................................................................ 222
25.3.3 loop ........................................................................................................................................................... 223
25.3.4 writeMessage............................................................................................................................................ 223
25.3.5 writeTripleMessage................................................................................................................................... 224
25.3.6 writeTxtMessage....................................................................................................................................... 224
25.3.7 temporaryDigitalWrite ............................................................................................................................... 224
25.3.8 Log ............................................................................................................................................................ 224
25.3.9 logLn ......................................................................................................................................................... 224
25.3.10 now ........................................................................................................................................................... 224
25.4 Sketch skeleton for IOSControllerWiFiCC3000 support ....................................................................... 224
26 Development Manual IOSControllerForYun ............................................................................................. 230
26.1 IOSControllerForYun Library ................................................................................................................ 230
26.2 How to reduce Library memory occupation .......................................................................................... 230
26.3 Available Functions .............................................................................................................................. 231
26.3.1 IOSControllerForYun ................................................................................................................................ 231
26.3.2 IOSControllerForYun ................................................................................................................................ 231
26.3.3 loop ........................................................................................................................................................... 232
26.3.4 writeMessage............................................................................................................................................ 233
26.3.5 writeTripleMessage................................................................................................................................... 234
26.3.6 writeTxtMessage....................................................................................................................................... 234
26.3.7 temporaryDigitalWrite ............................................................................................................................... 234
26.3.8 log ............................................................................................................................................................. 235
26.3.9 logLn ......................................................................................................................................................... 235
26.3.10 now ........................................................................................................................................................... 236
26.4 Sketch skeleton for IOSControllerForYun support ............................................................................... 236
27 Development Manual IOSControllerForGalileo ....................................................................................... 237
27.1 IOSControllerForGalileo Library ........................................................................................................... 237
27.2 How to reduce Library memory occupation .......................................................................................... 237
27.3 Available Functions .............................................................................................................................. 238
27.3.1 IOSControllerForGalileo ........................................................................................................................... 238
27.3.2 IOSControllerForGalileo ........................................................................................................................... 239
27.3.3 loop ........................................................................................................................................................... 239
27.3.4 writeMessage............................................................................................................................................ 240
27.3.5 writeTripleMessage................................................................................................................................... 240
27.3.6 writeTxtMessage....................................................................................................................................... 241
27.3.7 temporaryDigitalWrite ............................................................................................................................... 241
27.3.8 log ............................................................................................................................................................. 241
27.3.9 logLn ......................................................................................................................................................... 242
27.3.10 sdLogLabels ............................................................................................................................................. 242
27.3.11 sdLog ........................................................................................................................................................ 244
27.3.12 sdPurgeLogData ....................................................................................................................................... 245
27.3.13 now ........................................................................................................................................................... 245
27.4 Sketch skeleton for IOSController support ........................................................................................... 245
28 Code Generators ........................................................................................................................................ 246
28.1 Code Generator .................................................................................................................................... 246
28.2 PIN Code Generator ............................................................................................................................. 246

Version: 9.0 12/252


Arduino Manager Fabrizio Boco

28.3 Restore Purchases ............................................................................................................................... 246


29 Frequent Asked Questions ........................................................................................................................ 247
30 Revision History ......................................................................................................................................... 249
31 Comments and Support ............................................................................................................................. 252

Version: 9.0 13/252


Arduino Manager Fabrizio Boco

1 What is Arduino Manager and


how to use it

Arduino Manager is an app to control your Arduino board and receive


information from it through:

Ethernet Shield;

WiFi Shield;

Adafruit CC3000 WiFi breakout or shield;

Adafruit nRF8001 Bluefruit LE Breakout;

Adafruit Bluefruit LE SPI Friend;

RedBear Lab BLE Shield

ESP8622.

Other Arduino compatible boards are supported:

Arduino Mega;

Arduino Zero;

Arduino Yun;

Intel Galileo;

RFduino;

Teensy 3.1.

For more details about supported boards and communication methods, see
section 2.

The app shows a grid and tapping on it you can insert specialized widgets to
send and receive information from Arduino.

Version: 9.0 14/252


Arduino Manager Fabrizio Boco

For a better visualization or control, each widget can be zoomed by the means
of a double tap on it; tap on Configure for configuring the widget itself.

Display Widget: This widget shows values coming from your


Arduino (i.e. Temperature). It can show numbers with 0,1,2,3
decimal digits or rolling text and a unit of measure. It can be
enabled and disabled from Arduino.

Gauge Widget: This widget shows an analog value coming


from Arduino, moving a needle over a graded scale. The user
can customize the minimum and maximum values and
separately configure each green, yellow and red region.

Bar Widget: This widget shows an analog value coming from


Arduino turning on LEDs on a horizontal bar. The user can
customize the minimum and maximum values and separately
configure each green, yellow and red region.

LED Widget: This widget shows a LED that can be turned on


and off through digital values from Arduino.

Switch Widget: This widget sets a digital value to Arduino.

Switch & LED Widget: This widget is the combination of the


two previous widgets, to save space when they are used
together with the same variable. Double tap the widget to
zoom it and access the configuration
The LED is turned on and off with messages from the board
to show exactly the status of a digital value on the board.

Version: 9.0 15/252


Arduino Manager Fabrizio Boco

Secured Switch: This widget is aimed to operate critical


devices since it can't be operated by mistake. To operate the
switch, double tap on the widget to remove the security
protection.

Rotary Switch: This widget sets a digital value to Arduino.


Double tap on the widget to operate it.

Push Button Widget: This widget temporarily sets a digital


value to Arduino.

Push Button Widget: This widget is aimed to operate critical


devices since it can't be operated by mistake. To operate the
push button, double tap on the widget to remove the security
protection.

Knob Widget: This widget sets a non-digital value to


Arduino.

Slider Widget: This widget is analogous to the Knob Widget


but with a different user interface.

SD Widget: This widget shows the list of files available in the


root of SD Card and selecting a file it shows the content.

Version: 9.0 16/252


Arduino Manager Fabrizio Boco

Graph Widget: This widget graphs values in (almost) real


time coming from your Arduino (e.g. instantaneous
temperature).

Logged Data Graph Widget: This widget graphs up to 5


values logged onto the SD Card attached to Arduino.

Alarm Widget: This widget sets the time of an alarm, which


is fired on your Arduino board. Double tap on it to set values.
Enabling Repeat the alarm is fired each day. Alarm can be
easily enabled and disabled tapping on the Enabled switch.

Command Widget: This widget allows sending a command


(text message) to Arduino once the button is tapped. Double
Tap the widget to enter the command text. You can add more
Command Widgets to send different commands.

Rover Controller Widget: This widget allows driving a rover


robot just rotating the device.

Joystick Widget: for easily control external devices in a two


dimensional space by the means of your finger.

Sound Alarm Widget: This widget sounds an alarm each


time the associated condition is verified.
Double tap it to configure the condition and the alarm to
sound.

Version: 9.0 17/252


Arduino Manager Fabrizio Boco

Threshold Widget: This widget allows setting a threshold to


the Arduino board (e.g. the room temperature under which
the board has to start an heater).

Thermostat Widget: This widget allows setting a lower and a


higher threshold to the Arduino board to ensure that an
analog value remains in the range defined by the two
thresholds. It also shows the actual value of the analog value.

Console Widget: This widget helps the user to debug the


Arduino code, receiving and displaying debugging messages.

iBeacon Widget: This widget tracks the position of your iOS


device with respect to an iBeacon and communicates to the
Arduino board when the iOS device is getting into and when it
is getting outside the iBeacon region.

USTREAM Widget: This widget shows a video stream


coming from the USTREAM site (http://www.ustream.tv). You
can publish there your own on-line streams.

Color Picker Widget: This widget allows the user to choose


a color and its brightness. The corresponding RGB values
are sent to the Arduino board.

Accelerometer Widget: This widget shows the acceleration


by the means of a balls displacement along three axes.

Version: 9.0 18/252


Arduino Manager Fabrizio Boco

Gyroscope Widget: This widget shows the rotation speed by


the means of a pyramids rotation along three axes.

Bubble Level Widget: This widget shows if a surface is


horizontal (or vertical) through the displacement of a ball
along two axes.

Web Widget: This widget shows any web page you need.
May be used for integrating external services or devices like
video cameras.

Voice Commands Widget: This widget allows to enter some


voice commands and an associated code. When Arduino
Manager recognizes a voice command, it sends the
associated code to the Arduino board where can be
processed.

GPS Widget: This widget continuously sends to Arduino


latitude and longitude of the iOS device.

Each widget is associated with a variable (i.e. T), which is either written or read
by the sketch on the board. In this way the iOS app can receive information
from the Arduino board or control it.

IOSController library family allows integrating Arduino Manager with your own
sketches.

To better understand how to use Arduino Manager you have to check next
sections out, choosing which apply in relation to your board type and/or
connection method you are using (Ethernet, WiFi, Bluetooth, etc.).

Version: 9.0 19/252


Arduino Manager Fabrizio Boco

1.1 SD Management changes from version 2.0

From version 2.0 of Arduino Manager the file list and download of file from SD
Card is directly managed from the IOSController or IOSControllerWiFi library.

User doesnt have to worry about it and these following lines must be removed
from your sketch in the processingIncomingMessages:

#ifdef SD_SUPPORT
if (strcmp(variable,"SD")==0) {
iosController.sendFileList();
}
if (strcmp(variable,"SDDL")==0) {
iosController.sendFile(value);
}
#endif

Version: 9.0 20/252


Arduino Manager Fabrizio Boco

1.2 Switch Widget and Rotary Switch How to use them

This widget sets a digital value to Arduino. Tapping the switch, a message is
received into the processIncomingMessages callback and the Arduino program
can react to it.
void processIncomingMessages(char variable, char *value) {

if (strcmp(variable,"<variable>") == 0) {

.
}

Where <variable> is the label assigned to the Switch.

As soon as the iOS application connects to the Arduino board, asks for the
current state of the switch. This message can be managed into the doSync
callback
void doSync(char variable) {

if (strcmp(variable,"<variable>") == 0) {

iosController.writeMessage(variable,<switch current value>);


}

Version: 9.0 21/252


Arduino Manager Fabrizio Boco

1.3 Display Widget How to use it

This widget shows values coming from your Arduino (i.e. Temperature). It can
show numbers with 0,1,2,3 decimal digits or rolling text.

To send values to the Display Widget, you can use:

void processOutgoingMessages() {

iosController.writeMessage("<variable>",123.4);

Where <variable> is the label assigned to the Widget.

Double tapping the Widget and then


tapping Configure you can configure it.

When the Widget displays only


numbers, you can choose the number
of decimal digit to show, tapping on

. for 0 decimal digits

.# for 1 decimal digit

.## for 2 decimal digits

.### for 3 decimal digits.

Tap on Text switch to make the Display Widget show text instead of numbers.

To send a text message, use this:

iosController.writeTxtMessage("<variable>","On");

Version: 9.0 22/252


Arduino Manager Fabrizio Boco

Entering a Unit of Measure, it will be displayed together with the values coming
from the board. If you dont need to show a unit of measure, left it blank.

When the Widget displays numbers, you can enable or disable it from the
Arduino code sending respectively these messages:
iosController.writeTxtMessage("<variable>","On");
iosController.writeTxtMessage("<variable>","Off");

1.4 Gauge Widget How to use it

This widget shows values an analog value (i.e. Temperature) coming from
Arduino, moving a needle over a graded
scale.

Tapping Configure, you can see scale


values and configure the widget itself.

You can enter the minimum and maximum


expected range of values in Minimum and
Maximum fields and the Unit of Measure.

To change the size of each colored area


use the green and yellow sliders.

To completely remove the yellow area, set


both sliders to the same position.

To remove any colored area, take both sliders to 0.

The default order of the colored areas is, left to right, green, yellow and red.
Tapping on Swap, the colored areas change to red, yellow and green.

To send values to the Gauge Widget you can just use the same code used for
the Display Widget:
void processOutgoingMessages() {

iosController.writeMessage("<variable>",123.4);

Where <variable> is the label assigned to the Widget.

Version: 9.0 23/252


Arduino Manager Fabrizio Boco

1.5 Bar Widget How to use it

This widget shows values an analog value (i.e. Temperature) coming from
Arduino, turning on LEDs on a horizontal bar.

Tapping Configure, you can see scale


values and configure the widget itself.

You can enter the minimum and maximum


expected range of values in Minimum and
Maximum fields and the Unit of Measure.

To change the size of each colored area


use the green and yellow sliders.

To completely remove the yellow area, set


both sliders to the same position.

To remove any colored area, take both


sliders to 0.

To send values to the Bar Widget you can just use the same code used for the
Display Widget or the Gauge Widget:

void processOutgoingMessages() {

iosController.writeMessage("<variable>",123.4);

Where <variable> is the label assigned to the Widget.

1.6 LED Widget How to use it

This widget shows a LED that can be turned on and off through digital values
from Arduino.
void processOutgoingMessages(void) {

iosController.writeMessage("<variable>",1 or 0);

Version: 9.0 24/252


Arduino Manager Fabrizio Boco

Where <variable> is the label assigned to the Widget.

Double tap the widget and then tap Configure to change LEDs color.

To change the LEDs color from the Arduino code you can send one of these
messages:
iosController.writeTxtMessage("<variable>","Red");
iosController.writeTxtMessage("<variable>","Blue");
iosController.writeTxtMessage("<variable>","Green");
iosController.writeTxtMessage("<variable>","Yellow");

Where variable is the label assigned to the Widget.

To make the LED blinking you can send this message:


iosController.writeMessage("<variable>",2);

To make it stop blinking, send again a message with value 1 or 0.

1.7 Switch & LED Widget How to use it

This widget is the combination of the Switch Widget and Led Widget, to save
space when they are used together with the same variable.

Double tap the widget and then tap Configure to change LEDs color.

Tapping the switch a message is received into the processIncomingMessages


and can be managed there as for the Switch Widget
void processIncomingMessages(char variable, char *value) {

if (strcmp(variable,"<variable>") == 0) {

.
}

Where <variable> is the label assigned to the Widget.

The LED can be turned on and off sending respectively the following messages:
iosController.writeMessage(<variable>,HIGH);

Version: 9.0 25/252


Arduino Manager Fabrizio Boco

iosController.writeMessage(<variable>,LOW);

To change the LEDs color from the Arduino code you can send one of these
messages:
iosController.writeTxtMessage(<variable>,"Red");
iosController.writeTxtMessage(<variable>,"Blue");
iosController.writeTxtMessage(<variable>,"Green");
iosController.writeTxtMessage(<variable>,"Yellow");

To make the LED blinking you can send this message:


iosController.writeMessage(<variable>,2);

To make it stop blinking, send a message with value 1 or 0.

1.8 Push Button and Secure Push Button How to use them

The Push Button Widget temporarily sets a digital value to Arduino.

Double tap the widget and then tap Configure to change the button color.

Tapping the push button, a message is received into the


processIncomingMessages callback and the Arduino program can react to it. A
message is also received when the button is released.

void processIncomingMessages(char variable, char *value) {

if (strcmp(variable,<variable>) == 0 && atoi(value)==1) {

.// Button Pushed


}

if (strcmp(variable,<variable>) == 0 && atoi(value)==0) {

.// Button Released


}

Version: 9.0 26/252


Arduino Manager Fabrizio Boco

1.9 Graph Widget How to use it

This widget graphs values coming from your Arduino (i.e. Temperature). Double
tap on it and then tap on Configure to
change values range.

To show the graph at best, you can tap


on Configure and enter the expected
Minimum Value and Maximum Value of
the received data.

Changing Y Divisions and X Divisions,


you can control the number of divisions,
which are shown on the Y and X axes.

The Ethernet Shield sends data


continuously and with a minimum delay
(not considering any heavy traffic on the
network). On the contrary, the WiFi
Shield sends packets of data, and then a delay is present between packets.

To get better performances, at least with the Ethernet Shield, you should set
WiFi Shield if data is received through the WiFi Shield.

Tapping on Variables, you can enter


additional variables to show more than
one quantity at the same time on the
graph.

To send data to the Widget you have to change the processOutgoingMessages


in this way:

Version: 9.0 27/252


Arduino Manager Fabrizio Boco

void processOutgoingMessages(void) {

iOSController.writeMessage("<variable>", value);

Where <variable> is the label assigned to the Widget.

In case the graph has additional variables, then:


void processOutgoingMessages(void) {

iOSController.writeMessage("<variable>", value);
iOSController.writeMessage("<additional variable 1>", value);
iOSController.writeMessage("<additional variable 2>", value);

Version: 9.0 28/252


Arduino Manager Fabrizio Boco

1.10 Logged Data Graph Widget How to use it

This widget graphs up to 5 values logged into Arduino SD. Double tap on it to
zoom it in and refresh values.

Widget downloads data from a file


stored into the SD card of the
Arduino board, which has to called
with the same name of the widget.

The first row of the file, which


contains the label of each graph,
has to be formatted as in this
example:

-;V1;V2;V3;V4;V5

In case, you need only few graphs,


the respective label has to be
replaced by -. For example for only
two graphs:
-;V1;V2;-;-;-

All the other lines contain data followed by a new line. First value is the time
when the sample has been get.
1371546000;110.00;12;2;9;11

Time is expressed as Unix epoch: the number of seconds that have elapsed since
January 1, 1970 (midnight UTC/GMT). Missing values are replaced by -:
1371546000;110.00;22.3;-;-;-

IOSController and IOSControllerWiFi make available some help functions to


format the data as required and to get current time, see paragraph 16.3 or 18.3.

The best way to write to the log file is using a timer and an interrupt handler. In
the following example, Timer1 is used.

Once you have decided the desired interrupt frequency, the value of the match
register may be calculated using this formula:
OCR1A = [16,000,000Hz/ (prescaler * desired_interrupt_frequency)] 1

Prescaler allowed values: 1, 8, 64, 256, and 1024

Version: 9.0 29/252


Arduino Manager Fabrizio Boco

Then add this code to the setup function to configure and start Timer1.

/** Configure and start Timer1 **/

cli();//stop interrupts

TCCR1A = 0; // set entire TCCR1A register to 0


TCCR1B = 0; // same for TCCR1B
TCNT1 = 0; //initialize counter value to 0

// set compare match register


OCR1A = 62499; // = (16*10^6) / (0.25*1024) - 1 (must be <65536)

TCCR1B |= (1 << WGM12); // turn on CTC mode

TCCR1B |= (1 << CS12) | (1 << CS10); // Set CS10 and CS12 bits for 1024
prescaler

TIMSK1 |= (1 << OCIE1A); // enable timer compare interrupt

sei();//allow interrupts

samplingCounter = 0;
currentNumberOfSamples = MAXNUMBEROFSAMPLES;
gettingSample = false;

Then, add these functions to your code:


/***
Interrupt Handler
***/
ISR(TIMER1_COMPA_vect) {

if (samplingCounter == SAMPLEINTERVAL*60/4) {

gettingSample = true;
samplingCounter = 0;
}
else {

samplingCounter++;
}

/***
Function to write samples to file
***/
void getSample(char *variable, unsigned long now1) {

if(currentNumberOfSamples == MAXNUMBEROFSAMPLES) {

SD.remove(variable);

Version: 9.0 30/252


Arduino Manager Fabrizio Boco

iosController.sdLogLabels(variable,"Temp1","Temp2","Temp3","Temp4","Temp5");
currentNumberOfSamples = 0;
}

iosController.sdLog(variable, now1, temp1, temp2, temp3, temp4, temp5);

currentNumberOfSamples += 1;
}

Eventually add this code to the doWork function:

if (gettingSample) {

unsigned long now = iosController.now();

cli();
getSample("DATA",now); // DATA is the name of the Logged Data Graph Widget
sei();

gettingSample = false;
}

s Graph Widgets you have to enable


Please, note that in order to use Log Data
them in the libraries changing:
//#define SDLOGGEDATAGRAPH_SUPPORT
to
#define SDLOGGEDATAGRAPH_SUPPORT

Using Arduino UNO, this requires to disable SD Widget, changing:


#define SD_SUPPORT
to
//#define SD_SUPPORT

Please, note that using Timer1 is incompatible with the servo library, which
uses the Timer1 for its own purposes.

Version: 9.0 31/252


Arduino Manager Fabrizio Boco

1.11 Alarm Widget How to use it

To set a new Alarm, double tap the


widget and it will zoom in.

Then, you can change the time


using the time picker.

Please, note that:

if you set the alarm time later


than the current time, the Alarm will
be scheduled for the current day at
the chosen time

if you set the alarm time


earlier than the current time, the
Alarm will be scheduled for the next
day at the chosen time.

The label Next Alarm gives you the exact date and time at which the alarm will
be fired.

Version: 9.0 32/252


Arduino Manager Fabrizio Boco

If Repeat is not set, once the alarm has been fired, it will be deleted from the
Arduino board and then it will not be fired anymore.

Please note that:

1. The internal clock on the Arduino board is set via NTP Server when the
board is powered on. So the board needs to be connected to Internet at
the power on, otherwise the clock will not be set.

2. Alarms are stored into EEPROM on the board, so they are retained also
when the board is turned off and they are rescheduled at the power on.

3. Alarms are stored into EEPROM in UTC (Coordinated Universal Time)


time.

4. The accuracy of alarms is per minute, so it is possible that they can be


activated with several seconds of delay.

5. Alarm widgets may be created and deleted only when the iOS device is
connected to the board.

By default the maximum number of Alarm Widget is 5, if you want to use more
Alarm Widgets you have to:

Change the value of MAX_NUMBER_OF_ALARMS in IOSController or


IOSControllerWiFi

Change the Maximum Number of Alarms Widget in Arduino Manager,


following this procedure:

Go to Settings

Tap on Arduino Manager

Change Max # Alarm Widgets to the desired value

1.12 Threshold Widget How to use it

Double tap on the Widget to configure it and setting threshold value.

Version: 9.0 33/252


Arduino Manager Fabrizio Boco

The threshold can be set tapping on


and +.

Pressing and holding one of its buttons


increments or decrements the
thresholds value repeatedly.

The threshold can be a value between


Minimum Value and Maximum Value
with increment of Step Value.

To configure Minimum and Maximum


Value, tap on Configure.

In order to set the threshold on the


Arduino board you have to add something like the following into the
processIncomingMessages:
void processIncomingMessages(char variable, char *value) {

if (strcmp(variable,Temperature) == 0) {

temperature = atof(variable);
}

For more details see paragraph 16.1 (IOSController Library) or 18.1 (IOSControllerWiFi
Library).

Please, note that the message is sent to the Arduino board:

1) each time the iOS application connects to the board;

2) each time the user changes the threshold value.

Version: 9.0 34/252


Arduino Manager Fabrizio Boco

1.13 Thermostat Widget

Thermostat allows setting a lower and a


higher threshold to the Arduino board to
ensure that an analog value remains in
the range defined by the two thresholds.
It also shows the actual value of the
analog value.

Tapping on L you can see the lower


threshold, tapping on H the higher one.
Tapping on A you can see the actual
value of the variable on the Arduino
board.

To change the value of either the lower


or higher threshold you need to zoom
the widget in double tapping on it.

Tap on Configure to change the range of the threshold and of their step.

To get the value of the lower and higher threshold you can add the following
code to your processingIncomingMessages:

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

if (strcmp(variable,"<WidgetLabel>L")==0) {

= atof(value);
}

if (strcmp(variable," ,"<WidgetLabel>H")==0) {

= atof(value);
}

Where <WidgetLabel> is the label assigned to the Widget.

To send information of the actual value you can add a writeMessage to the
processOutgoingMessages:

Version: 9.0 35/252


Arduino Manager Fabrizio Boco

void processOutgoingMessages() {

iosController.writeMessage(","<WidgetLabel>",);

The logic for managing when a quantity is out the range defined by the two
thresholds has to be added to the doWork function.

For a complete example, take a look at ThermostatExample which is available


with the iOSController library. It can be easily adapted to the WiFi shield or to
the Bluetooth communication.

1.14 Alarm Sound Widget How to use it

Double tap on the Widget and then tap on Configure to set condition and chose
the sound alarm.

Touch the first selection picker to select


one of the conditions.

On top of the Widgets variable, you can


see the condition (e.g. Distance >
400.00)

Then touch the second selection picker


to choose the alarm to sound when the
condition is verified.

You can tap on Test button to listen to


selected sound.

In order to make the Sound Alarm


Widget to work, you have to add
something like the following into the
processOutgoingMessages:

void processOutgoingMessages() {

Version: 9.0 36/252


Arduino Manager Fabrizio Boco

iosController.writeMessage("Distance",distance);

For more details see paragraph 16.1 (IOSController Library) or 18.1 (IOSControllerWiFi
Library).

Please, note that the Sound Alarm is played only when the Arduino Manager is
connected to the Arduino board and when the app is in foreground.

1.15 Command Widget How to use it

To process the command sent from Command Widget you have to add few
lines to the processIncomingMessages:
void processIncomingMessages(char *variable, char *value)
{
....
if (strcmp(variable, <variable>) == 0) {

// Do something here
}

...

Where <variable> is the label assigned to the Widget and value contains the
command string.

Version: 9.0 37/252


Arduino Manager Fabrizio Boco

1.16 Rover Controller Widget How to use it

This widget allows driving a rover robot just rotating the device. To start driving
the robot, double tap on the widget.

Once double tapped, the widget zoom in and more controls area available, as
shown in the following picture.

On the left bottom side there is the


Drive / Reverse switch. Each time you
change from Drive to Reverse or vice
versa the throttle is reset to zero.

On the left topside there is the brake


button to immediately stop the rover.

On the right there is the Throttle slider.


Move it up or down to increase or
decrease the rover speed.

To control rover direction just tilt the


iOS device right or left. The steering
wheel follows the device movements.

The following table shows commands that are send to the Arduino board.

Variable Value Range Description


RC_T 0 - 100 Throttle position
RC_F - Drive forward
RC_B - Drive backward
RC_R 0 - 100 Turn right
RC_L 0 100 Turn left

In case your robot stops for some reason (i.e. an obstacle), you can send a text
message to the Widget to reset the throttle. The variable is Rover Controller
and the value is Brake.

See paragraph 0 for a code sample.

Version: 9.0 38/252


Arduino Manager Fabrizio Boco

Please, note that this Widget works with Ethernet, WiFi and Bluetooth
connections but for controlling a robot the last two are more suitable.

1.17 Joystick Widget How to use it

This widget allows controlling an external device in two dimensions by the


means of your finger. Tapping on it, you can enlarge the controlling surface to
have a better resolution.

In the Arduino code, messages received has the following format:

Variable Value Range Description


<WidgetLabel>X -1023 - +1023 0: neutral position
-1023: leftmost position
+1023: rightmost position
<WidgetLabel>Y -1023 - +1023 0: neutral position
-1023: uppermost position
+1023: lowermost position

where <WidgetLabel> is the label assigned to the widget.

Then, this simple code can be used to catch the messages from the widget:
if (strcmp(variable,Joy1X)==0) {

}
if (strcmp(variable,Joy1Y)==0) {

1.18 Console Widget How to use it

The console widget helps the user to debug its own Arduino code receiving and
displaying debugging messages.

User can change the size of the Widget double clicking on it.

In order to show debugging messages on the Console Widget, insert one of


these functions into your Arduino code:

log

Version: 9.0 39/252


Arduino Manager Fabrizio Boco

logLn

See library documentation for more details.

1.19 iBeacon Widget How to use it

The iBeacon Widget tracks the position of your iOS device with respect to an
iBeacon and communicates to the Arduino board when the iOS device is
getting into and when it is getting outside the iBeacon region.

Double tapping on the widget you can enter the following information to identify
the iBeacon that you want to track:

UUID

Minor

Major

The information sent to the Arduino board can be received with this simple code
inside the processIncomingMessages function:
if (strcmp(variable,"A") == 0) {

if (strcmp(value,"Entering") == 0) {

iosController.log(variable);
iosController.log(" : ");
iosController.logLn(value);

}
else {

if (strcmp(value,"Exiting") == 0) {

iosController.log(variable);
iosController.log(" : ");
iosController.logLn(value);

}
else {

iosController.log(variable);
iosController.log(" distance : ");
iosController.logLn(atoi(value));

beaconGarageRangeCallback();
}
}
}

Version: 9.0 40/252


Arduino Manager Fabrizio Boco

where A is the name you assigned to the iBeacon Widget and the distance
values are:

0: Immediate
1: Near
2: Far
3: Unknown

Please note:

iBeacons are tracked even if Arduino Manager is in background;

iBeacons are tracked if Arduino Manager is not running (only from iOS
7.1);

generally, the iOS device detects the iBeacon enough quickly (about few
seconds) when it enters inside the iBeacon region;

generally, the iOS device detects the iBeacon slowly when it exits outside
of the iBeacon region;

If you have not an iBeacon device, you can buy my BeaconTx app to transform
your iPhone or iPad in an iBeacon.

https://itunes.apple.com/us/app/beacontx/id800590886?ls=1&mt=8

1.20 USTREAM Widget How to use it

This widget allows shows a video stream coming from the USTREAM site
(http://www.ustream.tv). You can publish there your own on-line streams.

Double tap the widget to enter the channel to be shown.

Version: 9.0 41/252


Arduino Manager Fabrizio Boco

To get the stream id to enter in the


widget, please, use the following
procedure:

1. Go to the USTREAM site


(http://www.ustream.tv)

2. Chose the channel to see on


Arduino Manager

3. Click on share and then on the


link icon

4. Open a new browser window


or tab and then past the link

5. You should read something like


http://www.ustream.tv/channel/9408562

6. The number is the Stream id to enter in the widget

You can also control the stream id from Arduino with:

iosController.writeTxtMessage(<variable>,"stream");

Where variable is the label assigned to the Widget and stream is the stream id.

Version: 9.0 42/252


Arduino Manager Fabrizio Boco

1.21 Color Picker Widget How to use it

This widget allows the user to choose a color and its brightness. The
corresponding RGB values are sent to the Arduino board. To operate the
widget, you have to double tap on it.

Once the user has chosen a color, the


RGB values of it are transmitted one
by one to the Arduino board.

Each color component has the range


0-255.

Messages from the color Widget can


be processed on the board into the
processIncomingMessages function:

if (strcmp(variable,"<Variable>_R") == 0) {

}
if (strcmp(variable,"<Variable>_G") == 0) {

}
if (strcmp(variable,"<Variable>_B") == 0) {

where <variable> is the label assigned to the Widget.

1.22 Accelerometer Widget How to use it

This widget shows the acceleration by the means of a balls displacement along
three axes. Double tapping on the widget you can see it larger.

Version: 9.0 43/252


Arduino Manager Fabrizio Boco

To send data to the Accelerometer Widget use the following function:


iosController.writeTripleMessage(<variable>,x,y,z);

where <variable> is the label assigned to the Widget and <x>,<y>,<z> are the
values of the acceleration along the x, y and z axes.

1.23 Gyroscope Widget How to use it

This widget shows the rotation speed by the means of a pyramids rotation
along three axes. Double tapping on the widget you can see it larger.

To send data to the Gyroscope Widget use the following function:


iosController.writeTripleMessage(<variable>,x,y,z);

where <variable> is the label assigned to the Widget and <x>,<y>,<z> are the
values of rotation speed along the x, y and z axes.

1.24 Bubble Level Widget How to use it

This widget shows if a surface is horizontal (or vertical) through the


displacement of a ball along two axes.

You need to attach an accelerometer to the Arduino board and to send data to
the Bubble Level Widget use the following function:
iosController.writeTripleMessage(<variable>,x,0,z);

where <variable> is the label assigned to the Widget and <x>,<y>,<z> are the
values of the acceleration along the x, y and z axes.

1.25 Voice Commands Widget How to use it

This widget allows to enter some voice commands and an associated code.
When Arduino Manager recognizes a voice command, it sends the associated
code to the Arduino board where can be processed.

Tapping on the microphone, voice commands entered into the Widget are
accepted together with the other voice commands. Tapping again the voice
commands are not accepted anymore.

Version: 9.0 44/252


Arduino Manager Fabrizio Boco

To enter the voice commands, double tap the


widget to zoom in it and then tap configure.

To enter a new voice command, tap on + and


fill these fields:

Command

Code

Command is the voice command that will be accepted and code is the code
sent to the Arduino board.

To edit an already entered command, tap on it. To


delete a command, swipe it to the left.

You can enter more Voice Commands Widgets but


the commands are not associated with the widget
variable.

To recognize a voice command, enter the following


code into the processIncomingMessages function:
if (strcmp(variable,"$VC$") == 0) {

if (atoi(value) == <voice command code 1>) {


// Do something for Voice Command 1
}

if (atoi(value) == <voice command code 2>) {


// Do something for Voice Command 2
}
.
}

1.26 GPS Widget How to use it

This widget continuously sends to Arduino latitude and longitude of the iOS
device. You can suspend sending data to Arduino operating the switch on the
widget.

Version: 9.0 45/252


Arduino Manager Fabrizio Boco

To process received data, you can define a global variable latidude and add
these few lines to the processIncomingMessages function:

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

if (strcmp(variable,"<variable>_LAT")==0) {

latitude = atof(value);
}

if (strcmp(variable," <variable>_LON")==0) {

float longitude = atof(value),8);

// Process here latitude and longitude as needed




}

where <variable> is the label assigned to the Widget.

Version: 9.0 46/252


Arduino Manager Fabrizio Boco

1.27 Widget Lists Management

User can easily manage different lists of widgets and switch among them in
order to control different boards and/or projects.

Tap on to access the


Widget List Management
features.

Tapping on one of the


available list (e.g. Home
Control), the Widget List is
loaded and the Widgets in
the grid are replaced with the
new ones.

Tapping on Edit button, you


are able to rename the
existing list or delete them.

Tap on Remove Widgets to


remove all the existing
widgets in the grid, to start a
new configuration.

1.27.1 Saving a Widget Configuration on your device

Tapping on Save you can save the current configuration of widgets in the grid
after have entered the name of the list.

To create a completely new Widget List, avoid impacting the current


configuration, use this procedure:

1. Save the current widget configuration with a new name

2. Remove the existing widgets (tapping on Remove Widgets)

3. Add the new Widgets you need

Version: 9.0 47/252


Arduino Manager Fabrizio Boco

1.27.2 Saving a Widget Configuration on iCloud

Tapping on Save (with the Cloud icon) the current configuration of widget in the
grid is privately saved to the iCloud and then is automatically shared across
your own devices.

1.27.3 Saving a Widget Configuration on Dropbox

This feature is not available yet.

1.27.4 Sharing Widget Configuration

You can share your widget configuration between your devices and other users,
through an email message, tapping on Share.

When you receive a mail message with an Arduino Manager configuration, you
can load it just tapping on it.

Please note that:

Due to loading of a new configuration, the previous one is deleted;

iPad, iPhone 4 and iPhone 5 have different number of Widgets, then


moving a configuration from one device to another may cause lost of
widgets.

Version: 9.0 48/252


Arduino Manager Fabrizio Boco

1.28 Network Configuration

In this paragraph you will learn how access your Arduino board from outside
your network. In other words, following the direction herein described you will
be able to use Arduino Manager through the mobile network to access your
Arduino board behind your home router/firewall.

NOTE: This section is provided for reference only and the author will not
provide any support on the subjects herein exposed. This because there are so
many routers available on the market and so many network configurations that
is actually impossible to provide any support without having all the details
available. Anyway, with this brief overview of the matter you should be able
configure your own devices.

Please, consider using encryption when exposing your board to external


networks (see paragraph 1.29).

1.28.1 Port Forwarding

This is the typical situation of a domestic or a small business network


configuration.

Version: 9.0 49/252


Arduino Manager Fabrizio Boco

Lets suppose that your IP addresses are:

Router WAN IP: 82.61.147.56

Router LAN IP: 192.168.1.1

Arduino Board IP: 192.168.1.4

Typically the IP address of the Arduino board on your internal network is not
visible from the external network at least you dont explicitly configure your
router.

This configuration is called IP Port forwarding.

Basically this configuration says to the router that all the traffic, which it receives
on a particular port has to be rerouted to another IP address on a specific port.

That said, your Port Forwarding configuration has to be something like this:
(82.61.147.56, 230) > (192.168.1.4, 230)

Accessing your router configuration page (usually via browser), you should be
able to get the current IP that your Internet service provider has assigned to
your router and configure the Port Forwarding.

Version: 9.0 50/252


Arduino Manager Fabrizio Boco

Read your router manual for learning how to set up this configuration.

Once you have configured the Port Forwarding, you can access the Arduino
board using:

IP: 82.61.147.56 (or better, the IP address of your own router)

Port: 230

1.28.2 Dynamic DDNS

Typically, each time your router connects to Internet, it gets a different public IP
address. So, you need to change the IP address of Arduino Manager each time
your router is restarted. This is not practical.

Many Dynamic Domain Name Services are available to dynamically associate


the same name to your router IP address, even if the address changes.

Most are available for free, among them: NoIP, yDNS, FreeDNS.

Most routers allows to configure DDNS directly from themselves. Otherwise,


you may need to install a simple software on a computer connected to your
network.

Please, visit the service providers site to sign up and get installation and
configuration procedures. Moreover, check your router out for the DDNS
service availability.

1.29 Security and Encryption

Starting from version 9.0 Arduino Manager is able to encrypt data transferred to
and from the board using the AES 128 algorithm.

This makes much more hard to anyone to take control of your board.
Encryption should be always used when your board is exposed to internet.

Please, note that no solution ensures absolute secure communication. Take


this in consideration setting up your system.

Not al boards and communication systems are supported for encryption, see
the compatibility matrix for more details.

Version: 9.0 51/252


Arduino Manager Fabrizio Boco

1.30 Voice Commands

Arduino Manager accepts voice commands once you have bought the related
in-app purchase option.

Voice commands are only accepted in English.

To enable voice commands, tap on the microphone in the lower bottom left side
of the app.

As soon as you start talking, the green LED turns on and turns off when you
stop talking. From that point on, Arduino Manager tries to recognize the
command.

To activate a widget through the voice command, pronounce the widget


variable followed the accepted command(s). If the command is recognized, a
female voice repeats it followed by the accepted word.

Some widgets (e.g. Display Widget) accept the command status. In that case,
the synthesized voice reads the status of the widget. For example, for the
Display Widget the voice reads the current value shown on the display.

To get the status of a widget, pronounce the widget variable followed by status.
If the command is accepted, the female voice reads the widget status.

The following table shows the voice command accepted for the supported
widgets and if the status command is accepted.

Widget Commands Accepted Status response


Numeric value or text shown
Display None
on the display
Numeric value shown on the
Gauge None
gauge
Numeric value shown on the
Bar None
gauge
<variable> +
LED None
ON if the LED is on

Version: 9.0 52/252


Arduino Manager Fabrizio Boco

Widget Commands Accepted Status response


OFF if the LED is off
DISABLED if the LED is
disabled
<variable> +
ON to turn the switch on
Switch None
OFF to turn the switch
off
<variable> +
<variable> + ON if the LED is on
Switch &
ON to turn the switch on OFF if the LED is off
LED
OFF to turn the switch off DISABLED if the LED is
disabled
<variable> +
Secured ON to turn the switch on
None
Switch OFF to turn the switch
off
<variable> +
Rotary ON to turn the switch on
None
Switch OFF to turn the switch
off
<variable> +
PUSH to push and
release the button
Push
PRESS to push and None
Button
keep pushing the button
RELEASE to release the
button when pressed
<variable> +
UP to increase turn the
knob right
DOWN to turn the knob
Knob left None
MAX to completely turn
the knob right
MIN to completely turn
the knob left

Version: 9.0 53/252


Arduino Manager Fabrizio Boco

Widget Commands Accepted Status response


<variable> +
UP to increase turn the
knob right
DOWN to turn the knob
Slider left None
MAX to completely turn
the knob right
MIN to completely turn
the knob left

Version: 9.0 54/252


Arduino Manager Fabrizio Boco

2 Compatibility Matrix

This section describes which communications methods can be used and which
Widgets are not supported for each board.

For each combination of board and supported communication method, the


corresponding library to use is also shown.

Version: 9.0 55/252


Arduino Manager Fabrizio Boco

Connection Method Notes

Board Ethernet Shield Adafruit WiFi Shield Adafruit nRF8001 Bluefruit SPI Friend RedBear BLE ESP8622
WINC1500 CC3000 Bluefruit Shield

Uno Due to memory SD Widget and Logged Due to memory


limitations, SD Widget, Data Widget not limitations, SD Widget,
Alarm Widget and supported Alarm Widget and
Logged Data Widget Logged Data Widget SD Widget and SD Widget and SD Widget and
SD Widget and Logged
cannot be supported at cannot be supported at Logged Data Logged Data Logged Data
Data Widget not -
the same time. Please, the same time. Please, Widget not Widget not Widget not
supported
see next sections for see next sections for supported supported supported
details for configuring details for configuring
the libraries according the libraries according
with your needs. with your needs.

Library IOSControllerWi IOSControllerF IOSControllerForBluefruit IOSControllerBL


IOSController IOSControllerWINC1500 IOSControllerWiFi -
FiCC3000 orBluefruit SPIFriend E

Mega SD Widget and Logged SD Widget and SD Widget and SD Widget and SD Widget and
SD Widget and Logged
Data Widget not Logged Data Logged Data Logged Data Logged Data
Full support Full support Data Widget not
supported Widget not Widget not Widget not Widget not
supported
supported supported supported supported

Library IOSControllerWi IOSControllerF IOSControllerForBluefruit IOSControllerBL IOSControllerForE


IOSController IOSControllerWINC1500 IOSControllerWiFi
FiCC3000 orBluefruit SPIFriend E SP8266

Library
SIOSControllerWINC150 SIOSControllerW SIOSController
with SIOSController - - - -
0 iFiCC3000 ForBluefruit
Encryption

Zero - Alarm Widget, SD Alarm Widget, SD


Alarm Widget,
Widget and Logged Data Widget and
SD Widget and Logged
Widget not supported. - - - - Logged Data
Data Widget not
Widget not
supported
supported.

Library IOSControllerForBluefruit IOSControllerForE


- IOSControllerWINC1500 - - - -
SPIFriend SP8266

Library
SIOSControllerWINC150
with - - - - - - -
0
Encryption

Yun Due to memory Due to memory Additional


limitations Logged Data limitations Logged Data Shields not
- - - - -
Widget is not supported. Widget is not required, WiFi
supported. and Ethernet
Library IOSControllerForYun IOSControllerForYun - - - - - built-in

Due Alarm Widget not Library is not


- - - - - -
supported. officially

Version: 9.0 56/252


Arduino Manager Fabrizio Boco

Connection Method Notes

Board Ethernet Shield Adafruit WiFi Shield Adafruit nRF8001 Bluefruit SPI Friend RedBear BLE ESP8622
WINC1500 CC3000 Bluefruit Shield

Library supported
IOSControllerForDue - - - - - - - Ask for it.

Intel Galileo Shield not required, Everything


ethernet built-in - - - - - - should work
full support on Edisson too.
Library IOSControllerForGalileo - - - - - - Not tested.

RFduino - Alarm Widget,


SD Widget and
- - Logged Data - - -
Widget not Additional
supported. board not
required:
Library - IOSControllerF
- - - - - Bluetooth BLE
orRFduino
built-in.
Library -
SIOSController
with - - - - -
ForRFduino
Encryption

Teensy 3.1 Alarm Widget,


SD Widget and
SD Widget and
Logged Data
- - - - Logged Data - -
Widget not
Widget not
supported
supported. Everything
should work
Library IOSControllerT
IOSControllerForE with 3.2 too,
- - - eensyForBluef - -
SP8266 but not tested.
ruit

Library SIOSController
With - - - - TeensyForBlu - - -
Encryption efruit

Version: 9.0 57/252


Arduino Manager Fabrizio Boco

This page is intentionally left blank.

Version: 9.0 58/252


Arduino Manager Fabrizio Boco

3 Arduino Manager and Ethernet


Shield for the impatient

To start with Arduino Manager you can follow the steps described in this section,
anyway section 16 contains more technical details.

This section applies if you are using an Ethernet Shield compatible with the
Arduino Ethernet library.

3.1 Step 1 - Test Circuit

The test circuit is shown in the following picture.

The board measures Temperature (TMP 36) and Light and then sends them to
the iOS device.

The iOS device sends commands to turn on and off LED 1 (yellow) and
commands to move Servo.

LED 2 (Red) shows when the iOS device is connected to the board.

Version: 9.0 59/252


Arduino Manager Fabrizio Boco

Please, note that if you have not TMP36 and / or Photo-resistor you can replace
them with a trimmer of 10 K and manually change the values.

This is the circuit layout.

Once your circuit is ready, jump to the next step.

3.2 Step 2 Install IOSController Library

3.2.1 Windows

Download the iOSControllerLibrariesInstaller.exe.zip from here:

https://sites.google.com/site/fabboco/home/arduino-manager-for-iphone-ipad

Version: 9.0 60/252


Arduino Manager Fabrizio Boco

Unzip it

Run iOSControllerLibrariesInstaller.exe

Choose the iOSController and install it

3.2.2 Mac

Download the iOSControllerLibrariesInstaller.app.zip from here:

https://sites.google.com/site/fabboco/home/arduino-manager-for-iphone-ipad

Unzip it

Run iOSControllerLibrariesInstaller.app

Choose the iOSController and install it

Version: 9.0 61/252


Arduino Manager Fabrizio Boco

3.2.3 Linux

Download the IOSController library from here:

https://sites.google.com/site/fabboco/home/arduino-manager-for-iphone-ipad

Locate the Sketchbook location, in the Arduino 1.x IDE preferences

Check that a folder called Libraries exists in Sketchbook location, if not


create it

Copy the downloaded file into the libraries directory

Extract the content into the folder Libraries

Please, at the end of library installation procedure, check that the directory
structure is like this:

<Sketchbook location>/Libraries/IOSController/IOSController.h

<Sketchbook location>/Libraries/IOSController/IOSController.cpp

<Sketchbook location>/Libraries/IOSController/keywords.txt

Version: 9.0 62/252


Arduino Manager Fabrizio Boco

3.3 Step 3 Configure IOSController Library

Due to low memory available on Arduino UNO, some features are not enabled
by default and you have to manually enable them with the following procedure:

Locate the Sketchbook location, in the Arduino 1.x IDE preferences

Open the IOSController.h file located in:


<Sketchbook location>/Libraries/IOSController/

Uncomment #define ALARMS_SUPPORT to use Alarm Widget

Uncomment #define SD_SUPPORT to use the SD Widget

Uncomment #define SDLOGGEDATAGRAPH_SUPPORT to use the


Logged Data Graph Widget

If you get an error like this:

Sketch uses 33,740 bytes (104%) of program storage space. Maximum is 32,256 bytes.

Global variables use 1,574 bytes (76%) of dynamic memory, leaving 474 bytes for local
variables. Maximum is 2,048 bytes.
processing.app.debug.RunnerException: Sketch too big; see
http://www.arduino.cc/en/Guide/Troubleshooting#size for tips on reducing it.

You need to disable one of the previous options in order to reduce the library
memory footprint.

3.4 Step 4 Arduino Ethernet Shield

Insert your Arduino Ethernet Shield on your Arduino board

Connect the Arduino Ethernet Shield to the network

Connect the Arduino board to your Mac or PC

3.5 Step 5 Open the example sketch

Open the Arduino IDE

Open the ArduinoManagerEthernetExample

Version: 9.0 63/252


Arduino Manager Fabrizio Boco

File -> Examples -> IOController -> ArduinoManagerEthernetExample

Edit IP parameters adapting them to your network

Choose the right Arduino board that you have (Tools->Board->)

Choose the right USB port where your Arduino board is connected to (for
more information visit the Arduino site: http://www.Arduino.cc)

Upload the sketch to your board

Version: 9.0 64/252


Arduino Manager Fabrizio Boco

3.6 Step 6 Connect Arduino Manager to the board

Start Arduino Manager on your iPad / iPhone

Tap on to access the application menu

Tap on to access the connections to the boards

Tap on Add for enter a new connection

Enter the following information

Connection Name

IP Address to assign to the Arduino board (this has to be the same


that you have entered into the sketch)

Port Address (this has to be the same that you have entered into
the sketch)

You can let the timeout value unchanged

Tap Ok

Select the just created connection, few seconds later the connection
indicator on the right bottom side of the screen should change to green.
The two devices are now connected. At the same time, the red LED
should turn on

3.7 Step 7 Configure Arduino Manager

Tap somewhere and insert a Display Widget

Tap on field just down the display and enter: T

Now you should be able to read the temperature measured by TEMP 36

Add another Display Widget and enter: L

Now you should be able to read the light measured by the Photo-resistor

Add a Switch Display and enter S1

Version: 9.0 65/252


Arduino Manager Fabrizio Boco

Now, tapping on the switch, you should be able to turn the yellow LED on
and off

Add a LED Widget and enter Led13

The LED should follows the yellow LED on the board

Double tapping on the LED Widget you can choose the preferred color

Add a Knob Widget and enter Knob1

Moving the dial, the servo motor should change its position

Add an SD Widget

Double tapping on it you should be able to see the list of files in the root
directory of the SD Card and open the files.

Add a Push Button Widget and enter Push1

Pushing the button, the red LED should turn off for few milliseconds and
then turn back on

Double tapping on the Push Button you can choose the preferred color

Add a Graph Widget and enter Pot

Turning the potentiometer on the breadboard a graph should appear.

You can see a tutorial video here:

http://youtube.com/watch?v=Zwe7pHJJUzU

but please note that it may be not updated.

3.8 Step 8 Move a Widget

To select a widget, long tap on it until the border becomes red.

Once selected, you can change the widget position dragging it into the desired
position.

Version: 9.0 66/252


Arduino Manager Fabrizio Boco

3.9 Step 9 Delete a Widget

To delete a widget, long tap on it until the border becomes red, release you
finger then swipe it down.

Alarm widgets may be deleted only when the iOS device is connected to the
board.

3.10 Using encrypted communication

Arduino Manager is able to communicate with Arduino board via an encrypted


channel, using AES128 encryption algorithm.

Encryption is supported only using Arduino MEGA because of memory and


processing power limitations of UNO.

To enable encryption, you have to:

Step 2: Install SIOSController instead of IOSController

Step 4: Open the ArduinoManagerEthernetExample from:

File -> Examples -> SIOController -> ArduinoManagerEthernetExample

Step 4: Edit IP parameter and enter an encryption password (see


encPass)

Step 5: Entering the connection information, switch to Encryption and


enter the required password.

Please, double check that the password entered here is exactly the same used
into the sketch.

With this configuration all data transferred to and from the Arduino board are
encrypted this make much more hard to anyone taking control of your board.

Version: 9.0 67/252


Arduino Manager Fabrizio Boco

4 Arduino Manager and


Adafruit WINC1500 for the
impatient

To start with Arduino Manager you can follow the steps described in this section,
anyway section 16 contains more technical details.

This section applies if you are using the Adafruit ATWINC1500 WiFi breakout
(https://www.adafruit.com/products/2999).

4.1 Step 1 - Test Circuit

4.1.1 Arduino UNO - Mega

The test circuit is shown in the following picture.

Version: 9.0 68/252


Arduino Manager Fabrizio Boco

The board measures Temperature (TMP 36) and Light and then sends them to
the iOS device.

The iOS device sends commands to turn on and off LED 1 (yellow) and
commands to move Servo.

LED 2 (Red) shows when the iOS device is connected to the board.

Please, note that if you have not TMP36 and / or Photo-resistor you can replace
them with a trimmer of 10 K and manually change the values.

This is the circuit layout.

Once your circuit is ready, jump to the next step.

4.1.2 Arduino Zero

The test circuit is shown in the following picture.

Version: 9.0 69/252


Arduino Manager Fabrizio Boco

The board measures Temperature (TMP 36) and Light and then sends them to
the iOS device.

the iOS device.

The iOS device sends commands to turn on and off LED 1 (yellow) and
commands to move Servo.

LED 2 (Red) shows when the iOS device is connected to the board.

Please, note that if you have not TMP36 and / or Photo-resistor you can replace
them with a trimmer of 10 K and manually change the values.

This is the circuit layout.

Version: 9.0 70/252


Arduino Manager Fabrizio Boco

4.2 Step 2 Install IOSControllerWINC1500 Library

4.2.1 Windows

Download the iOSControllerLibrariesInstaller.exe.zip from here:

https://sites.google.com/site/fabboco/home/arduino-manager-for-iphone-ipad

Unzip it

Run iOSControllerLibrariesInstaller.exe

Choose the iOSControllerWINC15000 and install it

Version: 9.0 71/252


Arduino Manager Fabrizio Boco

4.2.2 Mac

Download the iOSControllerLibrariesInstaller.app.zip from here:

https://sites.google.com/site/fabboco/home/arduino-manager-for-iphone-ipad

Unzip it

Run iOSControllerLibrariesInstaller.app

Choose the iOSController and install it

Version: 9.0 72/252


Arduino Manager Fabrizio Boco

4.2.3 Linux

Download the IOSController library from here:

https://sites.google.com/site/fabboco/home/arduino-manager-for-iphone-ipad

Locate the Sketchbook location, in the Arduino 1.x IDE preferences

Check that a folder called Libraries exists in Sketchbook location, if not


create it

Copy the downloaded file into the libraries directory

Extract the content into the folder Libraries

Please, at the end of library installation procedure, check that the directory
structure is like this:

<Sketchbook location>/Libraries/IOSController WINC1500/IOSControllerWINC1500.h

<Sketchbook location>/Libraries/IOSController WINC1500/IOSControllerWINC1500.cpp

<Sketchbook location>/Libraries/IOSControllerWINC1500/keywords.txt

Version: 9.0 73/252


Arduino Manager Fabrizio Boco

4.3 Step 3 Configure the library

This library supports Alarm Widgets, to enable them open the


iOSControllerWINC1500.h file and uncomment this define:
//#define ALARMS_SUPPORT // uncomment to enable support for Alarm Widget

If you get the following compilation error:

Sketch uses 33,740 bytes (104%) of program storage space. Maximum is 32,256 bytes.

Global variables use 1,574 bytes (76%) of dynamic memory, leaving 474 bytes for local
variables. Maximum is 2,048 bytes.
processing.app.debug.RunnerException: Sketch too big; see
http://www.arduino.cc/en/Guide/Troubleshooting#size for tips on reducing it.

you need to disable Alarm Widgets in order to reduce library memory footprint.

If you are using Arduino Zero, Alarm Widgets are not supported, so double
check that:

//#define ALARMS_SUPPORT

is commented out.

4.4 Step 4 Open the example sketch

Open the Arduino IDE

Open the ArduinoManagerWINC1500Example

File -> Examples -> IOControllerWINC1500 -> ArduinoManagerWINC1500Example

Edit IP parameters adapting them to your network

Edit YOUR_SSID/YOUR_PASSWORD adapting them to your network

Choose the right Arduino board that you have (Tools->Board->)

Choose the right USB port where your Arduino board is connected (for
more information visit the Arduino site: http://www.Arduino.cc)

Upload the sketch to your board

Version: 9.0 74/252


Arduino Manager Fabrizio Boco

4.5 Other steps

Now on you can follows the steps from chapter 3.6 through chapter 3.9.

4.6 Using encrypted communication

Arduino Manager is able to communicate with Arduino board via an encrypted


channel, using AES128 encryption algorithm.

Encryption is supported only using Arduino MEGA because of memory and


processing power limitations of UNO.

To enable encryption, you have to:

Step 3: Install SIOSControllerWINC1500 instead of


IOSControllerWINC1500

Step 5: Open the ArduinoManagerWINC1500Example from:

File -> Examples -> SIOControllerWINC1500 -> ArduinoManagerWINC1500Example

Step 5: Edit IP parameter, YOUR_SSID/YOUR_PASSWORD and enter


an encryption password (see encPass)

Step 6: Entering the connection information, switch to Encryption and


enter the required password.

Please, double check that the password entered here is exactly the same used
into the sketch.

With this configuration all data transferred to and from the Arduino board are
encrypted this make much more hard to anyone taking control of your board.

Version: 9.0 75/252


Arduino Manager Fabrizio Boco

5 Arduino Manager and WiFi


Shield for the impatient

To start with Arduino Manager you can follow the steps described in this section,
anyway section 17 contains more technical details.

This section applies if you are using a WiFi Shield compatible with the Arduino
WiFi library.

5.1 Step 1 - Test Circuit

Please, see chapter 3.1 and change the circuit since the Red LED is actually
connected to pin 6.

5.2 Step 2 - Install IOSControllerWiFi Library

5.2.1 Windows

Download the iOSControllerLibrariesInstaller.exe.zip from here:

https://sites.google.com/site/fabboco/home/arduino-manager-for-iphone-ipad

Unzip it

Run iOSControllerLibrariesInstaller.exe

Choose the iOSControllerWiFi and install it

Version: 9.0 76/252


Arduino Manager Fabrizio Boco

5.2.2 Mac

Download the iOSControllerLibrariesInstaller.app.zip from here:

https://sites.google.com/site/fabboco/home/arduino-manager-for-iphone-ipad

Unzip it

Run iOSControllerLibrariesInstaller.app

Choose the iOSControllerWiFi and install it

Version: 9.0 77/252


Arduino Manager Fabrizio Boco

5.2.3 Linux

Download the IOSControllerWiFi library from here:

https://sites.google.com/site/fabboco/home/arduino-manager-for-iphone-ipad

Locate the Sketchbook location, in the Arduino 1.x IDE preferences

Check that a folder called Libraries exists in Sketchbook location, if not


create it

Copy the downloaded file into the libraries directory

Extract the content into the folder Libraries

Please, at the end of library installation procedure, check that the directory
structure is like this:

<Sketchbook location>/Libraries/IOSControllerWiFi/IOSControllerWiFi.h

<Sketchbook location>/Libraries/IOSControllerWiFi/IOSControllerWiFi.cpp

<Sketchbook location>/Libraries/IOSControllerWiFi/keywords.txt

Version: 9.0 78/252


Arduino Manager Fabrizio Boco

5.3 Step 3 Configure IOSControllerWiFi Library

Due to low memory available on Arduino UNO, some features are not enabled
by default and you have to manually enable them with the following procedure:

Locate the Sketchbook location, in the Arduino 1.x IDE preferences

Open the IOSController.h file located in:


<Sketchbook location>/Libraries/IOSController/

Uncomment #define ALARMS_SUPPORT to use Alarm Widget

Uncomment #define SD_SUPPORT to use the SD Widget

Uncomment #define SDLOGGEDATAGRAPH_SUPPORT to use the


Logged Data Graph Widget

If you get an error like this:

Sketch uses 33,740 bytes (104%) of program storage space. Maximum is 32,256 bytes.

Global variables use 1,574 bytes (76%) of dynamic memory, leaving 474 bytes for local
variables. Maximum is 2,048 bytes.
processing.app.debug.RunnerException: Sketch too big; see
http://www.arduino.cc/en/Guide/Troubleshooting#size for tips on reducing it.

You need to disable one of the previous options in order to reduce the library
memory footprint.

5.4 Step 4 Arduino WiFi Shield

Insert your Arduino WiFi Shield on your Arduino board

Connect the Arduino board to your Mac or PC

5.5 Step 4 Open the example sketch

Open the Arduino IDE

Open the ArduinoManagerWiFiExample

File -> Examples -> IOControllerWiFi -> ArduinoManagerWiFiExample

Version: 9.0 79/252


Arduino Manager Fabrizio Boco

Edit IP parameters adapting them to your network

Edit YOUR_SSID/YOUR_PASSWORD adapting them to your network

Choose the right Arduino board that you have (Tools->Board->)

Choose the right USB port where your Arduino board is connected (for
more information visit the Arduino site: http://www.Arduino.cc)

Upload the sketch to your board

5.6 Step 5 Other steps

Now on you can follows the steps from chapter 3.6 through chapter 3.9.

Version: 9.0 80/252


Arduino Manager Fabrizio Boco

6 Arduino Manager and


ESP8266 for the impatient

To start with Arduino Manager you can follow the steps described in this section,
anyway section 1917 contains more technical details.

This section applies if you are using an ESP8266 board with MEGA or Zero.

6.1 Step 1 - Test Circuit

The test circuit is shown in the following picture.

Please note that the ESP8622 device is powered at 3.3v and needs an external
power source since it can drain more current then how much Arduino MEGA
can provide.

Since Arduino MEGA operates at 5v, a level shifter is needed to accommodate


the different voltage levels. The circuit has been tested with the Adafruit 4bit
I2C safe Level shifter (https://www.adafruit.com/products/757) but any other
level shifter should be suitable for this purpose.

Version: 9.0 81/252


Arduino Manager Fabrizio Boco

6.1.1 Arduino Mega

The board measures Temperature (TMP 36) and then sends it to the iOS
device.

The iOS device sends commands to turn on and off LED 1 (yellow).

The LED on the board shows when the iOS device is connected to it.

Please, note that if you have not TMP36, you can replace it with a trimmer of 10
K and manually change the values.

This is the circuit layout.

Version: 9.0 82/252


Arduino Manager Fabrizio Boco

Once your circuit is ready, jump to the next step.

6.1.2 Arduino Zero

Version: 9.0 83/252


Arduino Manager Fabrizio Boco

The board measures Temperature (TMP 36) and then sends it to the iOS
device.

The iOS device sends commands to turn on and off LED 1 (yellow).

The LED on the board shows when the iOS device is connected to it.

Please, note that if you have not TMP36, you can replace it with a trimmer of 10
K and manually change the values.

This is the circuit layout.

6.2 Step 2 - Install IOSControllerForESP8266 Library

6.2.1 Windows

Download the iOSControllerLibrariesInstaller.exe.zip from here:

https://sites.google.com/site/fabboco/home/arduino-manager-for-iphone-ipad

Version: 9.0 84/252


Arduino Manager Fabrizio Boco

Unzip it

Run iOSControllerLibrariesInstaller.exe

Choose the iOSControllerForESP8622 and install it

6.2.2 Mac

Download the iOSControllerLibrariesInstaller.app.zip from here:

https://sites.google.com/site/fabboco/home/arduino-manager-for-iphone-ipad

Unzip it

Run iOSControllerLibrariesInstaller.app

Choose the iOSControllerForESP8622 and install it

Version: 9.0 85/252


Arduino Manager Fabrizio Boco

6.2.3 Linux

Download the IOSController library from here:

https://sites.google.com/site/fabboco/home/arduino-manager-for-iphone-ipad

Locate the Sketchbook location, in the Arduino 1.x IDE preferences

Check that a folder called Libraries exists in Sketchbook location, if not


create it

Copy the downloaded file into the libraries directory

Extract the content into the folder Libraries

Please, at the end of library installation procedure, check that the directory
structure is like this:
<Sketchbook location>/Libraries/IOSControllerForESP8622/IOSControllerESP8622.h
<Sketchbook location>/Libraries/IOSControllerForESP8622/IOSControllerESP8622.cpp
<Sketchbook location>/Libraries/IOSControllerForESP8622/keywords.txt

6.3 Step 3 Check ESP8622 firmware

Unfortunately, a lot of firmware are available for this device and most of them
are backward incompatible.

Version: 9.0 86/252


Arduino Manager Fabrizio Boco

So the best is starting with the firmware which has been used for developing
and testing Arduino Manager.

It is available for download from the link below:

https://sites.google.com/site/fabboco/home/arduino-manager-for-iphone-ipad

Upload it to the device using the tools and the tutorial available on line. A good
starting point is here:

http://www.esp8266.com/wiki/doku.php?id=loading_firmware

6.4 Step 4 Open the example sketch

Open the Arduino IDE

Open the ArduinoManagerForESP8622Example

File -> Examples -> IOControllerForESP8622 ->


ArduinoManagerForESP8622Example

Edit IP parameters adapting them to your network

Choose the Arduino MEGA board (Tools->Board->)

Choose the right USB port where your Arduino board is connected to (for
more information visit the Arduino site: http://www.Arduino.cc)

Upload the sketch to your board

6.5 Step 5 Connect Arduino Manager to the board

Start Arduino Manager on your iPad / iPhone

Tap on to access the application menu

Tap on to access the connections to the boards

Tap on Add for enter a new connection

Enter the following information

Version: 9.0 87/252


Arduino Manager Fabrizio Boco

Connection Name

IP Address to assign to the Arduino board (this has to be the same


that you have entered into the sketch)

Port Address (this has to be the same that you have entered into
the sketch)

You can let the timeout value unchanged

Tap Ok

Select the just created connection, few seconds later the connection
indicator on the right bottom side of the screen should change to green.
The two devices are now connected. At the same time, the red LED
should turn on

6.6 Step 6 Configure Arduino Manager

Tap somewhere and insert a Display Widget

Tap on field just down the display and enter: T

Now you should be able to read the temperature measured by TEMP 36

Add a Switch Display and enter S1

Now, tapping on the switch, you should be able to turn the yellow LED on
and off

Add a LED Widget and enter Led13

The LED should follows the yellow LED on the board

Double tapping on the LED Widget you can choose the preferred color

Add a Knob Widget and enter Knob1

Moving the dial, the red LED should change its brightness

Add a Push Button Widget and enter Push1

Add a Graph Widget and enter T

Version: 9.0 88/252


Arduino Manager Fabrizio Boco

You should now see a graph of the temperature measured by the


temperature sensor.

You can see a tutorial video here:

http://youtube.com/watch?v=Zwe7pHJJUzU

but please note that it may be not updated.

6.7 Step 7 Move a Widget

See chapter 3.8.

6.8 Step 8 Delete a Widget

See chapter 3.9.

Version: 9.0 89/252


Arduino Manager Fabrizio Boco

7 Teensy, Arduino Manager


and ESP8266 for the
impatient

To start with Arduino Manager you can follow the steps described in this section,
anyway section 19 contains more technical details.

This section applies if you are using an ESP8266 board with Teensy 3.1.

7.1 Step 1 - Test Circuit

The test circuit is shown in the following picture.

Please note that the ESP8622 needs an external power source since it can
drain more current then how much Teensy 3.1 can provide.

Version: 9.0 90/252


Arduino Manager Fabrizio Boco

The board measures Temperature (TMP 36) and then sends it to the iOS
device.

The iOS device sends commands to turn on and off LED 1 (yellow).

The LED on the board shows when the iOS device is connected to it.

Please, note that if you have not TMP36, you can replace it with a trimmer of 10
K and manually change the values.

This is the circuit layout.

Version: 9.0 91/252


Arduino Manager Fabrizio Boco

Once your circuit is ready, jump to the next step.

7.2 Step 2 - Install IOSControllerForESP8266 Library

7.2.1 Windows

Download the iOSControllerLibrariesInstaller.exe.zip from here:

https://sites.google.com/site/fabboco/home/arduino-manager-for-iphone-ipad

Unzip it

Run iOSControllerLibrariesInstaller.exe

Choose the iOSControllerForESP8622 and install it

Version: 9.0 92/252


Arduino Manager Fabrizio Boco

7.2.2 Mac

Download the iOSControllerLibrariesInstaller.app.zip from here:

https://sites.google.com/site/fabboco/home/arduino-manager-for-iphone-ipad

Unzip it

Run iOSControllerLibrariesInstaller.app

Choose the iOSControllerForESP8622 and install it

Version: 9.0 93/252


Arduino Manager Fabrizio Boco

7.2.3 Linux

Download the IOSController library from here:

https://sites.google.com/site/fabboco/home/arduino-manager-for-iphone-ipad

Locate the Sketchbook location, in the Arduino 1.x IDE preferences

Check that a folder called Libraries exists in Sketchbook location, if not


create it

Copy the downloaded file into the libraries directory

Extract the content into the folder Libraries

Please, at the end of library installation procedure, check that the directory
structure is like this:
<Sketchbook location>/Libraries/IOSControllerForESP8622/IOSControllerESP8622.h
<Sketchbook location>/Libraries/IOSControllerForESP8622/IOSControllerESP8622.cpp
<Sketchbook location>/Libraries/IOSControllerForESP8622/keywords.txt

7.3 Step 3 Check ESP8622 firmware

Unfortunately, a lot of firmware are available for this device and most of them
are backward incompatible.

So the best is starting with the firmware which has been used for developing
and testing Arduino Manager.

It is available for download from the link below:

https://sites.google.com/site/fabboco/home/arduino-manager-for-iphone-ipad

Upload it to the device using the tools and the tutorial available on line. A good
starting point is here:

http://www.esp8266.com/wiki/doku.php?id=loading_firmware

Version: 9.0 94/252


Arduino Manager Fabrizio Boco

7.4 Step 4 Open the example sketch

Open the Arduino IDE

Open the ArduinoManagerForESP8622Example

File -> Examples -> IOControllerForESP8622 ->


ArduinoManagerForESP8622Example

Edit IP parameters adapting them to your network

Choose the Arduino Teensy 3.1 board (Tools->Board->)

Choose the right USB port where your Teensy board is connected to (for
more information visit the Arduino site: http://www.Arduino.cc)

Upload the sketch to your board

7.5 Connect Arduino Manager to the board

Start Arduino Manager on your iPad / iPhone

Tap on to access the application menu

Tap on to access the connections to the boards

Tap on Add for enter a new connection

Enter the following information

Connection Name

IP Address to assign to the Arduino board (this has to be the same


that you have entered into the sketch)

Port Address (this has to be the same that you have entered into
the sketch)

You can let the timeout value unchanged

Tap Ok

Select the just created connection, few seconds later the connection
indicator on the right bottom side of the screen should change to green.

Version: 9.0 95/252


Arduino Manager Fabrizio Boco

The two devices are now connected. At the same time, the red LED
should turn on

7.6 Step 6 Configure Arduino Manager

Tap somewhere and insert a Display Widget

Tap on field just down the display and enter: T

Now you should be able to read the temperature measured by TEMP 36

Add a Switch Display and enter S1

Now, tapping on the switch, you should be able to turn the yellow LED on
and off

Add a LED Widget and enter Led13

The LED should follows the yellow LED on the board

Double tapping on the LED Widget you can choose the preferred color

Add a Knob Widget and enter Knob1

Moving the dial, the red LED should change its brightness

Add a Push Button Widget and enter Push1

Add a Graph Widget and enter T

You should now see a graph of the temperature measured by the


temperature sensor.

You can see a tutorial video here:

http://youtube.com/watch?v=Zwe7pHJJUzU

but please note that it may be not updated.

7.7 Step 7 Move a Widget

See chapter 3.8.

Version: 9.0 96/252


Arduino Manager Fabrizio Boco

7.8 Step 8 Delete a Widget

See chapter 3.9.

Version: 9.0 97/252


Arduino Manager Fabrizio Boco

8 Arduino Manager and


RFduino for the impatient

To start with Arduino Manager you can follow the steps described in this section,
anyway section 20 contains more technical details.

This section applies if you are using RFduino.

RFduino is a finger-tip sized, Arduino compatible, wireless enabled microcontroller, low cost
enough to leave in all of your projects.

http://www.rfduino.com

This guide assumes that your development environment for RFduino is already
installed and properly configured (see details here: http://www.rfduino.com/wp-
content/uploads/2014/04/RFduino.Quick_.Start_.Guide_.pdf and
http://www.rfduino.com/wp-
content/uploads/2014/03/rfduino.ble_.programming.reference.pdf).

Version: 9.0 98/252


Arduino Manager Fabrizio Boco

Working with Arduino IDE 1.5.7 or greater requires changing a compilation


flag.

Locate the file


../arduino/hardware/arduino/RFduino/platform.txt

On the MAC right click Arduino.app and click Show Package Content to access
the file

Change the line:


compiler.c.elf.flags=-Wl,--gc-sections --specs=nano.specs
to
compiler.c.elf.flags=-u _printf_float -Wl,--gc-sections --specs=nano.specs

Working with Arduino IDE 1.6.3 or greater, requires changing a compilation


flag:

Locate the file


(Windows) )%appdata%/Arduino15/packages/RFduino/hardware/RFduino/<x.y.z>/platform.txt
(MAC)/Users/<YourUser>/Library/Arduino15/packages/RFduino/hardware/RFduino/<x.y.z>/platform.txt
(Linux)~/.arduino15/packages/RFduino/hardware/RFduino/<x.y.z>/platform.txt

Change the line:


compiler.c.elf.flags=-Wl,--gc-sections --specs=nano.specs
to
compiler.c.elf.flags=-u _printf_float -Wl,--gc-sections --specs=nano.specs

Version: 9.0 99/252


Arduino Manager Fabrizio Boco

8.1 Step 1 Test Circuit

The test circuit is shown in the following picture.

The internal temperature sensor measures temperature and then sends them to
the iOS device.

The iOS device sends commands to turn on and off LED 1 (yellow) and
commands to change LED 3 light intensity.

LED 2 (Red) shows when the iOS device is connected to the board.

This is the circuit layout.

Version: 9.0 100/252


Arduino Manager Fabrizio Boco

Once your circuit is ready, jump to the next step.

8.2 Step 2 Install IOSControllerForRFduino Library

8.2.1 Windows

Download the iOSControllerLibrariesInstaller.exe.zip from here:

https://sites.google.com/site/fabboco/home/arduino-manager-for-iphone-ipad

Unzip it

Run iOSControllerLibrariesInstaller.exe

Choose the iOSControllerForRFduino and install it

Version: 9.0 101/252


Arduino Manager Fabrizio Boco

8.2.2 Mac

Download the iOSControllerLibrariesInstaller.app.zip from here:

https://sites.google.com/site/fabboco/home/arduino-manager-for-iphone-ipad

Unzip it

Run iOSControllerLibrariesInstaller.app

Choose the iOSControllerForRFduino and install it

Version: 9.0 102/252


Arduino Manager Fabrizio Boco

8.2.3 Linux

Download the IOSControllerForRFduino library from here:

https://sites.google.com/site/fabboco/home/arduino-manager-for-iphone-ipad

Locate the Sketchbook location, in the Arduino IDE preferences

Check that a folder called Libraries exists in Sketchbook location, if not


create it

Copy the downloaded file into the libraries directory

Extract the content into the folder Libraries

Please, at the end of library installation procedure, check that the directory
structure is like this:
<Sketchbook location>/Libraries/IOSControllerForRFduino/IOSControllerForRFduino.h
<Sketchbook location>/Libraries/IOSControllerForRFduino/IOSControllerForRFduino.cpp
<Sketchbook location>/Libraries/IOSControllerForRFduino/keywords.txt

8.3 Step 3 Open the example sketch

Open the Arduino IDE

Open the ArduinoManagerRFduinoExample

File -> Examples -> IOControllerForRFduino -> ArduinoManagerForRFduinoExample

Choose RFduino board (Tools->Board->)

Choose the right USB port where your RFduino board is connected

Upload the sketch to your board

8.4 Step 4 Connect Arduino Manager to the board

Start Arduino Manager on your iPad / iPhone

Tap on to access the application menu

Version: 9.0 103/252


Arduino Manager Fabrizio Boco

Tap on to access the connections to the boards

Tap on Scan BLE. If any RFduino is available, it appears in the list of


configurations

Tap Ok

Select the just created connection, few seconds later the connection
indicator on the right bottom side of the screen should change to green.
The two devices are now connected. At the same time, the red LED
should turn on

8.5 Step 5 Configure Arduino Manager

Tap somewhere and insert a Display Widget

Tap on field just down the display and enter: T

Now you should be able to read the temperature measured by RFduino


internal temperature sensor;

Add a Switch Display and enter S1

Now, tapping on the switch, you should be able to turn the yellow LED on
and off

Add a LED Widget and enter Led13

The LED should follows the yellow LED on the board

Double tapping on the LED Widget you can choose the preferred color

Add a Knob Widget or a Slider Widget and enter Knob1

Moving the dial, the luminosity of the red LED 3 should change

Add a Push Button Widget and enter Push1

Pushing the button, the red LED 2 should turn off for few milliseconds and
then turn back on

Double tapping on the Push Button you can choose the preferred color

Version: 9.0 104/252


Arduino Manager Fabrizio Boco

Add a Graph Widget and enter Pot

Turning the potentiometer on the breadboard a graph should appear.

You can see a tutorial video here:

http://youtube.com/watch?v=Zwe7pHJJUzU

but please note that it may be not updated.

8.6 Step 6 Move a Widget

See chapter 3.8.

8.7 Step 7 Delete a Widget

See chapter 3.9.

8.8 Using encrypted communication

Arduino Manager is able to communicate with RFduino via an encrypted


channel, using AES128 encryption algorithm.

To enable encryption, you have to:

Step 2: Install SIOSControllerForRFduino instead of


iOSControllerForRFduino

Step 3: Open the ArduinoManagerForBluefruitExample from:

File -> Examples -> SIOSControllerForRFduino -> ArduinoManagerRFduinoExample

Step 3: Enter an encryption password (see encPass)

Step 5: After have scanned the device, edit the connection, switch to
Encryption and enter the required password.

Please, double check that the password entered here is exactly the same used
into the sketch.

Version: 9.0 105/252


Arduino Manager Fabrizio Boco

With this configuration all data transferred to and from the RFduino board are
encrypted this make much more hard to anyone taking control of your board.

Version: 9.0 106/252


Arduino Manager Fabrizio Boco

9 Arduino Manager and Adafruit


nRF8001 Bluefruit LE
Breakout for the impatient

To start with Arduino Manager you can follow the steps described in this section,
anyway section 21 contains more technical details.

This section applies if you are using an Adafruit nRF8001 Bluefruit LE Breakout
with UNO, MEGA. If you are using Teensy, please section 11.

Adafruit Bluefruit LE (Bluetooth Smart, Bluetooth Low Energy, Bluetooth 4.0) nRF8001
Breakout allows you to establish an easy to use wireless link between your Arduino and any
compatible iOS or Android (4.3+) device. It works by simulating a UART device beneath the
surface, sending ASCII data back and forth between the devices, letting you decide what
data to send and what to do with it on either end of the connection.

http://www.adafruit.com/product/1697

For more information and tutorials visit:

https://learn.adafruit.com/getting-started-with-the-nrf8001-bluefruit-le-breakout/software-uart-
service

9.1 Step 1 Test Circuit

The test circuit is shown in the following picture.

Version: 9.0 107/252


Arduino Manager Fabrizio Boco

The board measures Temperature (TMP 36) and voltage value at a


Potentiometer and then sends it to the iOS device.

The iOS device sends commands to turn on and off LED 1 (yellow) and
commands to change LED 3 (Red) luminosity.

LED 2 (Red) shows when the iOS device is connected to the board.

Please, note that if you have not TMP36 you can replace it with a trimmer of 10
K and manually change the values.

This is the circuit layout.

Version: 9.0 108/252


Arduino Manager Fabrizio Boco

If you are using Arduino UNO, connections are:

SCK to digital pin 13

MISO to digital pin 12

MOSI to digital pin 11

REQ to digital pin 10

RST to digital pin 9

RDY to digital pin 2

Version: 9.0 109/252


Arduino Manager Fabrizio Boco

If you are using Arduino MEGA, connections are:

SCK to digital pin 52

MISO to digital pin 50

MOSI to digital pin 51

REQ to digital pin 10

RST to digital pin 9

RDY to digital pin 2

9.2 Step 2 Install IOSControllerForBluefruit Library

If you have already installed BLE SDK for Arduino and / or RBL_nRF8001
remove them before proceeding.

9.2.1 Windows

Download the iOSControllerLibrariesInstaller.exe.zip from here:

https://sites.google.com/site/fabboco/home/arduino-manager-for-iphone-ipad

Unzip it

Run iOSControllerLibrariesInstaller.exe

Choose the iOSControllerForBluefruit and install it

Version: 9.0 110/252


Arduino Manager Fabrizio Boco

9.2.2 Mac

Download the iOSControllerLibrariesInstaller.app.zip from here:

https://sites.google.com/site/fabboco/home/arduino-manager-for-iphone-ipad

Unzip it

Run iOSControllerLibrariesInstaller.app

Choose the iOSControllerForBluefruit and install it

Version: 9.0 111/252


Arduino Manager Fabrizio Boco

9.2.3 Linux

Download the IOSControllerForBluefruit library from here:

https://sites.google.com/site/fabboco/home/arduino-manager-for-iphone-ipad

Locate the Sketchbook location, in the Arduino 1.x IDE preferences

Check that a folder called Libraries exists in Sketchbook location, if not


create it

Copy the downloaded file into the libraries directory

Extract the content into the folder Libraries

Version: 9.0 112/252


Arduino Manager Fabrizio Boco

Please, at the end of library installation procedure check that the directory
structure is like this:
<Sketchbook location>/Libraries/IOSControllerForBluefruit/IOSControllerForBluefruit.h
<Sketchbook location>/Libraries/ IOSControllerForBluefruit/IOSControllerForBluefruit.cpp
<Sketchbook location>/Libraries/ IOSControllerForBluefruit/keywords.txt

9.3 Step 3 Open the example sketch

Open the Arduino IDE

Open the ArduinoManagerForBluefruitExample

File -> Examples -> IOControllerForBluefruit -> ArduinoManagerForBluefruitExample

Choose the right board (Tools->Board->)

Choose the right USB port where your board is connected

Upload the sketch to your board

9.4 Step 4 - Connect Arduino Manager to the board

Start Arduino Manager on your iPad / iPhone

Tap on to access the application menu

Tap on to access the connections to the boards

Tap on Scan BLE. If any Bluefruit breakout board is available, it appears


in the list of configurations

Tap Ok

Select the just created connection, few seconds later the connection
indicator on the right bottom side of the screen should change to green.
The two devices are now connected. At the same time, the red LED
should turn on

Version: 9.0 113/252


Arduino Manager Fabrizio Boco

9.5 Step 6 Configure Arduino Manager

Tap somewhere and insert a Display Widget

Tap on field just down the display and enter: T

Now you should be able to read the temperature measured by TEMP 36;

Add a Switch Display and enter S1

Now, tapping on the switch, you should be able to turn the yellow LED on
and off

Add a LED Widget and enter Led13

The LED should follows the yellow LED on the board

Double tapping on the LED Widget you can choose the preferred color

Add a Knob Widget or a Slider Widget and enter Knob1

Moving the dial, the luminosity of the red LED 3 should change

Add a Push Button Widget and enter Push1

Pushing the button, the red LED 2 should turn off for few milliseconds and
then turn back on

Double tapping on the Push Button you can choose the preferred color

Add a Graph Widget and enter Pot

Turning the potentiometer on the breadboard a graph should appear.

You can see a tutorial video here:

http://youtube.com/watch?v=Zwe7pHJJUzU

but please note that it may be not updated.

9.6 Step 7 Move a Widget

See chapter 3.8.

Version: 9.0 114/252


Arduino Manager Fabrizio Boco

9.7 Step 8 - Delete a Widget

See chapter 3.9.

9.8 Using encrypted communication

Arduino Manager is able to communicate with Arduino board via an encrypted


channel, using AES128 encryption algorithm.

Encryption is supported only using Arduino MEGA because of memory and


processing power limitations of UNO.

To enable encryption, you have to:

Step 2: Install SIOSControllerForBluefruit instead of


SIOSControllerForBluefruit

Step 4: Open the ArduinoManagerForBluefruitExample from:

File -> Examples -> IOControllerForBluefruit -> ArduinoManagerForBluefruitExample

Step 3: Enter an encryption password (see encPass)

Step 4: After have scanned the device, edit the connection, switch to
Encryption and enter the required password.

Please, double check that the password entered here is exactly the same used
into the sketch.

With this configuration all data transferred to and from the Arduino board are
encrypted this make much more hard to anyone taking control of your board.

Version: 9.0 115/252


Arduino Manager Fabrizio Boco

10 Arduino Manager and


Adafruit Bluefruit SPI Friend
for the impatient

To start with Arduino Manager you can follow the steps described in this section,
anyway section 22 contains more technical details.

This section applies if you are using an Adafruit Bluefruit LE SPI Friend with
UNO, MEGA or Zero.

The Bluefruit LE SPI Friend makes it easy to add Bluetooth Low Energy connectivity to
anything with 4 or 5 GPIO pins. With SPI, you don't have to worry about baud rates, flow
control, or giving up a hardware UART port. Connect to your Arduino or other microcontroller
using the common four-pin SPI interface (MISO, MOSI, SCK and CS) plus a 5th GPIO pin for
interrupts (to let the Arduino know when data or a response is ready).

https://www.adafruit.com/products/2633

For more information and tutorials visit:

https://learn.adafruit.com/introducing-the-adafruit-bluefruit-spi-breakout

10.1 Step 1 Test Circuit

10.1.1 Arduino Uno / Mega

If you are using Arduino Mega or Uno, the test circuit is shown in the following
picture.

Version: 9.0 116/252


Arduino Manager Fabrizio Boco

The board measures Temperature (TMP 36) and voltage value at a


Potentiometer and then sends it to the iOS device.

The iOS device sends commands to turn on and off LED 1 (yellow) and
commands to change LED 3 (Red) luminosity.

LED 2 (Red) shows when the iOS device is connected to the board.

Please, note that if you have not TMP36 you can replace it with a trimmer of 10
K and manually change the values.

This is the circuit layout.

Version: 9.0 117/252


Arduino Manager Fabrizio Boco

10.1.2 Arduino Zero

If you are using Arduino Zero, the test circuit is shown in the following picture.

Version: 9.0 118/252


Arduino Manager Fabrizio Boco

The board measures Temperature (TMP 36) and voltage value at a


Potentiometer and then sends it to the iOS device.

The iOS device sends commands to turn on and off LED 1 (yellow) and
commands to change LED 3 (Red) luminosity.

LED 2 (Red) shows when the iOS device is connected to the board.

Please, note that if you have not TMP36 you can replace it with a trimmer of 10
K and manually change the values.

This is the circuit layout.

Version: 9.0 119/252


Arduino Manager Fabrizio Boco

If

10.2 Step 2 - Install Adafruit BluefruitLE nRF51

This library is required and to install it you can use the Library Manager:

Sketch -> Include Library

Manage Libraries

Enter nRF51 in the search field

Locate the library, select it and click Install

Version: 9.0 120/252


Arduino Manager Fabrizio Boco

10.3 Step 3 Install IOSControllerForBluefruitSPIFriend Library

10.3.1 Windows

Download the iOSControllerLibrariesInstaller.exe.zip from here:

https://sites.google.com/site/fabboco/home/arduino-manager-for-iphone-ipad

Unzip it

Run iOSControllerLibrariesInstaller.exe

Choose the iOSControllerForBluefruitSPIFriend and install it

10.3.2 Mac

Download the iOSControllerLibrariesInstaller.app.zip from here:

https://sites.google.com/site/fabboco/home/arduino-manager-for-iphone-ipad

Unzip it

Run iOSControllerLibrariesInstaller.app

Choose the iOSControllerForBluefruit and install it

Version: 9.0 121/252


Arduino Manager Fabrizio Boco

10.3.3 Linux

Download the IOSControllerForBluefruitSPIFriend library from here:

https://sites.google.com/site/fabboco/home/arduino-manager-for-iphone-ipad

Locate the Sketchbook location, in the Arduino IDE preferences

Check that a folder called Libraries exists in Sketchbook location, if not


create it

Copy the downloaded file into the libraries directory

Extract the content into the folder Libraries

Please, at the end of library installation procedure check that the directory
structure is like this:

<Sketchbook
location>/Libraries/IOSControllerForBluefruitSPIFriend/IOSControllerForBluefruitSPIFriend
.h

<Sketchbook location>/Libraries/ IOSControllerForBluefruitSPIFriend


/IOSControllerForBluefruitSPIFriend.cpp

<Sketchbook location>/Libraries/ IOSControllerForBluefruitSPIFriend/keywords.txt

Version: 9.0 122/252


Arduino Manager Fabrizio Boco

10.4 Step 4 Open the example sketch

Open the Arduino IDE

Open the ArduinoManagerForBluefruitSPIFriendExample

File -> Examples -> IOControllerForBluefruitSPIFriend ->


ArduinoManagerForBluefruitSPIFriendExample

Choose the right board (Tools->Board->)

Choose the right USB port where your board is connected

Upload the sketch to your board

10.5 Step 5 - Connect Arduino Manager to the board

Start Arduino Manager on your iPad / iPhone

Tap on to access the application menu

Tap on to access the connections to the boards

Tap on Scan BLE. If any Bluefruit SPI Friend breakout board is available,
it appears in the list of configurations

Tap Ok

Select the just created connection, few seconds later the connection
indicator on the right bottom side of the screen should change to green.
The two devices are now connected. At the same time, the red LED
should turn on

10.6 Step 6 - Configure Arduino Manager

Tap somewhere and insert a Display Widget

Tap on field just down the display and enter: T

Now you should be able to read the temperature measured by TEMP 36;

Add a Switch Display and enter S1

Version: 9.0 123/252


Arduino Manager Fabrizio Boco

Now, tapping on the switch, you should be able to turn the yellow LED on
and off

Add a LED Widget and enter Led13

The LED should follows the yellow LED on the board

Double tapping on the LED Widget you can choose the preferred color

Add a Knob Widget or a Slider Widget and enter Knob1

Moving the dial, the luminosity of the red LED 3 should change

Add a Push Button Widget and enter Push1

Pushing the button, the red LED 2 should turn off for few milliseconds and
then turn back on

Double tapping on the Push Button you can choose the preferred color

Add a Graph Widget and enter Pot

Turning the potentiometer on the breadboard a graph should appear.

You can see a tutorial video here:

http://youtube.com/watch?v=Zwe7pHJJUzU

but please note that it may be not updated.

10.7 Step 8 Move a Widget

See chapter 3.8.

10.8 Step 9 - Delete a Widget

See chapter 3.9.

Version: 9.0 124/252


Arduino Manager Fabrizio Boco

11 Teensy, Arduino Manager


and Adafruit nRF8001
Bluefruit LE Breakout for the
impatient

To start with Arduino Manager you can follow the steps described in this section,
anyway section 23 contains more technical details.

This section applies if you are using an Adafruit nRF8001 Bluefruit LE Breakout
with Teensy. If you are using UNO or MEGA, please, see section 11.

Adafruit Bluefruit LE (Bluetooth Smart, Bluetooth Low Energy, Bluetooth 4.0) nRF8001
Breakout allows you to establish an easy to use wireless link between your Arduino and any
compatible iOS or Android (4.3+) device. It works by simulating a UART device beneath the
surface, sending ASCII data back and forth between the devices, letting you decide what
data to send and what to do with it on either end of the connection.

http://www.adafruit.com/product/1697

For more information and tutorials visit:

https://learn.adafruit.com/getting-started-with-the-nrf8001-bluefruit-le-breakout/software-uart-
service

11.1 Step 1 Test Circuit

The test circuit is shown in the following picture.

Version: 9.0 125/252


Arduino Manager Fabrizio Boco

The board measures Temperature (TMP 36) and voltage value at a


Potentiometer and then sends it to the iOS device.

The iOS device sends commands to turn on and off LED 1 (yellow) and
commands to change LED 3 (Red) luminosity.

LED 2 (Red) shows when the iOS device is connected to the board.

Please, note that if you have not TMP36 you can replace it with a trimmer of 10
K and manually change the values.

This is the circuit layout.

Version: 9.0 126/252


Arduino Manager Fabrizio Boco

11.2 Step 2 Install IOSControllerTeensyForBluefruit Library

If you have already installed Adafruit_nRF8001 library, please remove it before


next steps.

11.2.1 Windows

Download the iOSControllerLibrariesInstaller.exe.zip from here:

https://sites.google.com/site/fabboco/home/arduino-manager-for-iphone-ipad

Unzip it

Run iOSControllerLibrariesInstaller.exe

Choose the iOSControllerTeensyForBluefruit and install it

Version: 9.0 127/252


Arduino Manager Fabrizio Boco

11.2.2 Mac

Download the iOSControllerLibrariesInstaller.app.zip from here:

https://sites.google.com/site/fabboco/home/arduino-manager-for-iphone-ipad

Unzip it

Run iOSControllerLibrariesInstaller.app

Choose the iOSControllerTeensy For Bluefruit and install it

Version: 9.0 128/252


Arduino Manager Fabrizio Boco

11.2.3 Linux

Download the IOSControllerTeensyForBluefruit library from here:

https://sites.google.com/site/fabboco/home/arduino-manager-for-iphone-ipad

Locate the Sketchbook location, in the Arduino 1.x IDE preferences

Check that a folder called Libraries exists in Sketchbook location, if not


create it

Copy the downloaded file into the libraries directory

Extract the content into the folder Libraries

Please, at the end of library installation procedure check that the directory
structure is like this:

<Sketchbook location>/Libraries/IOSControllerTeensyForBluefruit/IOSControllerForBluefruit.h

<Sketchbook location>/Libraries/IOSControllerTeensyForBluefruit
/IOSControllerForBluefruit.cpp

<Sketchbook location>/Libraries/IOSControllerTeensyForBluefruit /keywords.txt

11.3 Step 3 Open the example sketch

Open the Arduino IDE

Open the ArduinoManagerTeensyForBluefruitExample

File -> Examples -> IOControllerTeensyForBluefruit -> ArduinoManagerTeensyForBluefruitExample

Choose the right board (Tools->Board->)

Choose the right USB port where your board is connected

Upload the sketch to your board

Version: 9.0 129/252


Arduino Manager Fabrizio Boco

11.4 Step 4 - Connect Arduino Manager to the board

Start Arduino Manager on your iPad / iPhone

Tap on to access the application menu

Tap on to access the connections to the boards

Tap on Scan BLE. If any Bluefruit breakout board is available, it appears


in the list of configurations

Tap Ok

Select the just created connection, few seconds later the connection
indicator on the right bottom side of the screen should change to green.
The two devices are now connected. At the same time, the red LED
should turn on

11.5 Step 6 Configure Arduino Manager

See chapter 9.5

11.6 Step 7 Move a Widget

See chapter 3.8.

11.7 Step 8 - Delete a Widget

See chapter 3.9.

11.8 Using encrypted communication

Arduino Manager is able to communicate with Teensy via an encrypted channel,


using AES128 encryption algorithm.

To enable encryption, you have to:

Version: 9.0 130/252


Arduino Manager Fabrizio Boco

Step 2: Install SIOSControllerTeensyForBluefruit instead of


IOSControllerTeensyForBluefruit

Step 3: Open the ArduinoManagerWINC1500Example from:

File -> Examples -> SIOControllerTeensyForBluefruit -> ArduinoManagerTeensyForBluefruitExample

Step 3: Enter an encryption password (see encPass)

Step 6: Entering the connection information, switch to Encryption and


enter the required password.

Please, double check that the password entered here is exactly the same used
into the sketch.

With this configuration all data transferred to and from the Arduino board are
encrypted this make much more hard to anyone taking control of your board.

Version: 9.0 131/252


Arduino Manager Fabrizio Boco

12 Arduino Manager and


RedBearLab BLE Shield for
the impatient

To start with Arduino Manager you can follow the steps described in this section,
anyway section 24 contains more technical details.

This section applies if you are using a RedBearLab BLE Shield.

BLE Shield stands for Bluetooth Low Energy (BLE) Shield. It is designed to work with
Arduino boards, including Arduino Uno, Mega and Leonardo. BLE shield could operate under
3.3V or 5V, therefore it should work with a lot of Arduino compatibles too.

http://redbearlab.com/bleshield/

12.1 Step 1 Test Circuit

The test circuit is shown in the following picture.

The board measures Temperature (TMP 36) and Light and then sends them to
the iOS device.

Version: 9.0 132/252


Arduino Manager Fabrizio Boco

The iOS device sends commands to turn on and off LED 1 (yellow) and
commands to move Servo.

LED 2 (Red) shows when the iOS device is connected to the board.

Please, note that if you have not TMP36 and / or Photo-resistor you can replace
them with a trimmer of 10 K and manually change the values.

This is the circuit layout.

Once your circuit is ready, jump to the next step.

12.2 Step 2 Install required libraries

Open Arduino IDE

Select

Sketch -> Include Library -> Manage Libraries

In the filter field enter: BLE SDK

Version: 9.0 133/252


Arduino Manager Fabrizio Boco

Select: BLE SDK for Arduino and click Install

Select RBL_nRF8001 and click Install

12.3 Step 3 Install IOSControllerBLE Library

12.3.1 Windows

Download the iOSControllerLibrariesInstaller.exe.zip from here:

https://sites.google.com/site/fabboco/home/arduino-manager-for-iphone-ipad

Unzip it

Run iOSControllerLibrariesInstaller.exe

Choose the iOSControllerBLE and install it

12.3.2 Mac

Download the iOSControllerLibrariesInstaller.app.zip from here:

https://sites.google.com/site/fabboco/home/arduino-manager-for-iphone-ipad

Unzip it

Version: 9.0 134/252


Arduino Manager Fabrizio Boco

Run iOSControllerLibrariesInstaller.app

Choose the iOSControllerBLE and install it

12.3.3 Linux

Locate the Sketchbook location, in the Arduino 1.x IDE preferences

Check that a folder called Libraries exists in Sketchbook location, if not


create it

Download the IOSControllerBLE library from here:

https://sites.google.com/site/fabboco/home/arduino-manager-for-iphone-ipad

Copy the downloaded file into the libraries directory

Extract the content into the folder Libraries

Please, at the end of library installation procedure check that the directory
structure is like this:

<Sketchbook location>/Libraries/IOSControllerBLE/IOSControllerBLE.h

<Sketchbook location>/Libraries/IOSControllerBLE/IOSControllerBLE.cpp

<Sketchbook location>/Libraries/IOSControllerBLE/keywords.txt

Version: 9.0 135/252


Arduino Manager Fabrizio Boco

12.4 Step 4 RedBearLab BLE Shield

Insert your RedBearLab BLE Shield on your Arduino board

Connect the Arduino board to your MAC or PC

12.5 Step 5 - Open the example sketch

Open the Arduino IDE

Open the ArduinoManagerBLEExample

File -> Examples -> IOControllerBLE -> ArduinoManagerBLEExample

Choose the right Arduino board (Tools->Board->)

Choose the right USB port where your Arduino board is connected

Upload the sketch to your board

12.6 Step 6 Connect Arduino Manager to the board

Start Arduino Manager on your iPad / iPhone

Tap on to access the application menu

Tap on to access the connections to the boards

Tap on Scan BLE. If any RedBear Bluetooth shield is available, it appears


in the list of configurations

Tap Ok

Select the just created connection, few seconds later the connection
indicator on the right bottom side of the screen should change to green.
The two devices are now connected. At the same time, the red LED
should turn on

Version: 9.0 136/252


Arduino Manager Fabrizio Boco

12.7 Step 7 Configure Arduino Manager

See chapter 3.7.

12.8 Step 8 Move a Widget

See chapter 3.8.

12.9 Step 9 - Delete a Widget

See chapter 3.9.

Version: 9.0 137/252


Arduino Manager Fabrizio Boco

13 Arduino Manager and


Adafruit CC3000 Breakout
for the impatient

To start with Arduino Manager you can follow the steps described in this section,
anyway section 25 contains more technical details.

This section applies if you are using an Adafruit CC3000 WiFi Breakout.

Everything should work also with Adafruit CC3000 WiFi Shield even thought we
have not tested it yet.

Adafruit CC3000 WiFi Breakout is a microcontroller-friendly WiFi module which


hits that sweet spot of usability, price and capability. It uses SPI for communication (not
UART!) so you can push data as fast as you want or as slow as you want. It has a proper
interrupt system with IRQ pin so you can have asynchronous connections. It supports
802.11b/g, open/WEP/WPA/WPA2 security, TKIP & AES. A built in TCP/IP stack with a
"BSD socket" interface. TCP and UDP in both client and server mode, up to 4 concurrent
sockets. It does not support "AP" mode, it can connect to an access point but it cannot be an
access point.

http://www.adafruit.com/products/1469

http://www.adafruit.com/product/1697

For more information and tutorials visit:

https://learn.adafruit.com/adafruit-cc3000-wifi

Version: 9.0 138/252


Arduino Manager Fabrizio Boco

13.1 Step 1 Test Circuit

The test circuit is shown in the following picture.

The board measures Temperature (TMP 36), light intensity and voltage value at
a Potentiometer and then sends it to the iOS device.

The iOS device sends commands to turn on and off LED 1 (yellow).

Please, note that if you have not TMP36 you can replace it with a trimmer of 10
K and manually change the values.

This is the circuit layout.

Version: 9.0 139/252


Arduino Manager Fabrizio Boco

If you are using Arduino UNO, connections are:

VBEN to Digital 5

IRQ to Digital 3

CLK to Digital 13

MISO to Digital 12

MOSI to Digital 11

CS to Digital 10

Version: 9.0 140/252


Arduino Manager Fabrizio Boco

If you are using Arduino MEGA, connections are:

VBEN to Digital 5

IRQ to Digital 3

CLK to digital pin 52

MISO to digital pin 50

MOSI to digital pin 51

CS to digital 10

13.2 Step 2 Install Adafruit CC3000 Library

This library is required and to install it you can use the Library Manager:

Sketch -> Include Library

Manage Libraries

Enter Adafruit CC3000 in the search field

Locate the library, select it and click Install.

13.3 Step 3 Install IOSControllerWiFiCC3000 Library

13.3.1 Windows

Download the iOSControllerLibrariesInstaller.exe.zip from here:

https://sites.google.com/site/fabboco/home/arduino-manager-for-iphone-ipad

Unzip it

Run iOSControllerLibrariesInstaller.exe

Choose the iOSControllerWiFiCC3000 and install it

Version: 9.0 141/252


Arduino Manager Fabrizio Boco

13.3.2 Mac

Download the iOSControllerLibrariesInstaller.app.zip from here:

https://sites.google.com/site/fabboco/home/arduino-manager-for-iphone-ipad

Unzip it

Run iOSControllerLibrariesInstaller.app

Choose the iOSControllerWiFiCC3000 and install it

Version: 9.0 142/252


Arduino Manager Fabrizio Boco

13.4 Step 4 Open the example sketch

Open the Arduino IDE

Open the ArduinoManagerWiFiCC3000Example

File -> Examples -> IOControllerWiFiCC3000 -> ArduinoManagerWiFiCC3000Example

Edit YOUR_SSID/YOUR_PASSWORD adapting them to your network

Edit address in the setStaticIPAddress function call adapting them to your


network

First address is the address which you assign to the board

Second address is the network mask of your network

Third address is the address of your gateway

Forth address is the address of your DNS

Choose the right Arduino board that you have (Tools->Board->)

Choose the right USB port where your Arduino board is connected (for
more information visit the Arduino site: http://www.Arduino.cc)

Upload the sketch to your board.

13.5 Step 5 Connect Arduino Manager to the board

Start Arduino Manager on your iPad / iPhone

Tap on to access the application menu

Tap on to access the connections to the boards

Tap on Add for enter a new connection

Enter the following information

Connection Name

IP Address to assign to the Arduino board (this has to be the same


that you have entered into the sketch)

Version: 9.0 143/252


Arduino Manager Fabrizio Boco

Port Address

You can let the timeout value unchanged

Tap Ok

Select the just created connection, few seconds later the connection
indicator on the right bottom side of the screen should change to green.
The two devices are now connected. At the same time, the red LED
should turn on

13.6 Step 6 Configure Arduino Manager

Click somewhere and insert a Display Widget

Click on field just down the display and enter: T

Now you should be able to read the temperature measured by TEMP 36

Add another Display Widget and enter: L

Now you should be able to read the light measured by the Photo-resistor

Add a Switch Display and enter S1

Now, clicking on the switch, you should be able to turn the yellow LED on
and off

Add a LED Widget and enter Led13

The LED should follows the yellow LED on the board

Double clicking on the LED Widget you can choose the preferred color

Add a Knob Widget and enter Knob1

Moving the dial, the servo motor should change its position

Add a Push Button Widget and enter Push1

Pushing the button, the red LED should turn off for few milliseconds and
then turn back on

Double clicking on the Push Button you can choose the preferred color

Version: 9.0 144/252


Arduino Manager Fabrizio Boco

Add a Graph Widget and enter Pot

Turning the potentiometer on the breadboard a graph should appear.

You can see a tutorial video here:

http://www.youtube.com/watch?v=jp8s6DJdHoc&feature=player_detailpage

but please note that it may be not updated.

13.7 Step 7 Other steps

Now on you can follows the steps from chapter 8.6 through chapter 8.7.

13.8 Using encrypted communication

Arduino Manager is able to communicate with Arduino board via an encrypted


channel, using AES128 encryption algorithm.

Encryption is supported only using Arduino MEGA because of memory and


processing power limitations of UNO.

To enable encryption, you have to:

Step 2: Install SOSControllerWiFiCC3000 instead of


iOSControllerWiFiCC3000

Step 5: Open the ArduinoManagerWiFiCC3000Example from:

File -> Examples -> IOControllerWiFiCC3000 -> ArduinoManagerWiFiCC3000Example

Step 2: Edit IP parameter, YOUR_SSID/YOUR_PASSWORD and enter


an encryption password (see encPass)

Step 4: Entering the connection information, switch to Encryption and


enter the required password.

Version: 9.0 145/252


Arduino Manager Fabrizio Boco

Please, double check that the password entered here is exactly the same used
into the sketch.

With this configuration all data transferred to and from the Arduino board are
encrypted this make much more hard to anyone taking control of your board.

Version: 9.0 146/252


Arduino Manager Fabrizio Boco

14 Arduino Manager and


Arduino Yun for impatient

To start with Arduino Manager you can follow the steps described in this section,
anyway section 26 contains more technical details.

This section applies if you are using an Arduino Yun.

14.1 Step 1 Test Circuit

Test circuit is exactly the same used in paragraph 3.1.

14.2 Step 2 Install IOSControllerForYun Library

14.2.1 Windows

Download the iOSControllerLibrariesInstaller.exe.zip from here:

https://sites.google.com/site/fabboco/home/arduino-manager-for-iphone-ipad

Unzip it

Run iOSControllerLibrariesInstaller.exe

Choose the iOSControllerForYun and install it

Version: 9.0 147/252


Arduino Manager Fabrizio Boco

14.2.2 Mac

Download the iOSControllerLibrariesInstaller.app.zip from here:

https://sites.google.com/site/fabboco/home/arduino-manager-for-iphone-ipad

Unzip it

Run iOSControllerLibrariesInstaller.app

Choose the iOSControllerForYun and install it

Version: 9.0 148/252


Arduino Manager Fabrizio Boco

14.2.3 Linux

Download the IOSControllerForYun library from here:

https://sites.google.com/site/fabboco/home/arduino-manager-for-iphone-ipad

Locate the Sketchbook location, in the Arduino 1.x IDE preferences

Check that a folder called Libraries exists in Sketchbook location, if not


create it

Copy the downloaded file into the libraries directory

Extract the content into the folder Libraries

Please, at the end of library installation procedure check that the directory
structure is like this:

<Sketchbook location>/Libraries/IOSControllerForYun/IOSControllerForYun.h

<Sketchbook location>/Libraries/IOSControllerForYun/IOSControllerForYun.cpp

<Sketchbook location>/Libraries/IOSControllerForYun/keywords.txt

14.3 Step 3 Open the example sketch

Open the Arduino IDE

Open the ArduinoManagerForYunExample

File -> Examples -> IOControllerForYun -> ArduinoManagerForYunExample

Choose the right board (Tools->Board->)

Choose the right USB port where your board is connected

Upload the sketch to your board

Version: 9.0 149/252


Arduino Manager Fabrizio Boco

14.4 Step 4 Connect Arduino Manager to the board

Please, see paragraph 3.6.

Please, note that the TestSketchForYun uses the port 5555.

14.5 Step 5 Configure Arduino Manager

Please, see paragraph 3.7.

14.6 Step 6 Move a Widget

Please, see paragraph 3.8.

14.7 Step 7 Delete a Widget

Please, see paragraph 3.9.

Version: 9.0 150/252


Arduino Manager Fabrizio Boco

15 Arduino Manager and Intel


Galileo for impatient

To start with Arduino Manager you can follow the steps described in this section,
anyway section 27 contains more technical details.

This section applies if you are using an Intel Galileo.

15.1 Step 1 Test Circuit

Test circuit is exactly the same used in paragraph 3.1.

15.2 Step 2 Install IOSControllerForGalileo Library

15.2.1 Windows

Download the iOSControllerLibrariesInstaller.exe.zip from here:

https://sites.google.com/site/fabboco/home/arduino-manager-for-iphone-ipad

Unzip it

Run iOSControllerLibrariesInstaller.exe

Choose the iOSControllerForGalileo and install it

15.2.2 Mac

Download the iOSControllerLibrariesInstaller.app.zip from here:

https://sites.google.com/site/fabboco/home/arduino-manager-for-iphone-ipad

Unzip it

Version: 9.0 151/252


Arduino Manager Fabrizio Boco

Run iOSControllerLibrariesInstaller.app

Choose the iOSControllerForGalileo and install it

15.2.3 Linux

Download the IOSControllerForGalileo library from here:

https://sites.google.com/site/fabboco/home/arduino-manager-for-iphone-ipad

Locate the Sketchbook location, in the Arduino 1.x IDE preferences

Check that a folder called Libraries exists in Sketchbook location, if not


create it

Copy the downloaded file into the libraries directory

Extract the content into the folder Libraries

Please, at the end of library installation procedure check that the directory
structure is like this:

<Sketchbook location>/Libraries/IOSControllerForGalileo/IOSControllerForGalileo.h

<Sketchbook location>/Libraries/ IOSControllerForGalileo /IOSControllerForGalileo.cpp

<Sketchbook location>/Libraries/ IOSControllerForGalileo /keywords.txt

15.3 Step 3 Fix the libraries

For some reason the Wire library is replicated into the Servo library and they
cannot be used together. To fix this issue follow the following procedure:

Locate the folder where the Galileo board is installed.

o WINDOWS: C:\Users\<your user>\AppData\Arduino15\packages\Intel

o Mac: /Users/<your user>/Library/Arduino15/packages/Intel

Remove the following file:

Version: 9.0 152/252


Arduino Manager Fabrizio Boco

/Intel/hardware/i586/1.6.7+1.0/libraries/Servo/src/Wire.h
/Intel/hardware/i586/1.6.7+1.0/libraries/Servo/src/Wire.cpp

15.4 Step 4 Open the example sketch

Open the Arduino IDE

Open the ArduinoManagerForGalileoExample

File -> Examples -> IOControllerForGalileo -> ArduinoManagerForGalileoExample

Choose the right board (Tools->Board->)

Choose the right USB port where your board is connected

Upload the sketch to your board

15.5 Step 5 Set the board clock

Alarms are based on the Galileo internal clock, which then needs to be set
following these steps:

1. Connect to the board via ssh:


ssh root@<Board Address>

2. Run this command:


date MMddhhmmyy

Time is UTC

Define Description
MM Month
dd Day
hh Hours, in 24h format
mm Minutes
yy year

Version: 9.0 153/252


Arduino Manager Fabrizio Boco

Please, remember that this procedure has to be followed each time the board is
turned on.
Otherwise you can wire a battery so that the board clock runs also when the board is
turned off.

15.6 Step 6 Connect Arduino Manager to the board

Please, see paragraph 3.6.

15.7 Step 7 Configure Arduino Manager

Please, see paragraph 3.7.

15.8 Step 8 Move a Widget

Please, see paragraph 3.8.

15.9 Step 9 Delete a Widget

Please, see paragraph 3.9.

Version: 9.0 154/252


Arduino Manager Fabrizio Boco

16 Development Manual
IOSController

16.1 IOSController Library

The IOSController library allows to the iOS Arduino Manager app to receive
information from your own sketches and to control them.

This library works with the Ethernet Shield and the Ethernet Library
(http://arduino.cc/en/Reference/Ethernet)1.

Limitations:

Variable length: 14 characters

Value length: 14 characters

16.2 How to reduce Library memory occupation

IOSController library memory occupation may be controlled through following


defines in IOSController.h:

Define Description
SD_SUPPORT If it is not defined, the support
for reading SD Card content is
removed and the SD Widget cannot
be used.
ALARMS_SUPPORT If it is not defined, the support
for Alarms is removed and the
Alarm Widget cannot be used.
SDLOGGEDATAGRAPH_SUPPORT If it is not defined, the support
for reading accessing logged data

1
It should also work with other shields, which fully support the official Ethernet library, but it has not been tested
yet. You have been warned.

Version: 9.0 155/252


Arduino Manager Fabrizio Boco

Define Description
is removed and the Logged Data
Graph Widget cannot be used.

16.3 Available Functions

16.3.1 IOSController

Initialize an instance of class IOSController that doesnt process alarms.

Parameter Description
EthernetServer *server Instance of EthernetServer class.
void (*doWork)(void) Callback function which replace
the standard loop() in the
sketch.
void (*doSync)(char *variable) Callback function called when the
iOS device needs to synchronize
switches and knobs positions with
the board.
void (*processIncomingMessages)(char Callback function called when the
*variable, char *value) board receives a message. This
means that variable has a value.
Variable has value SD if the iOS
device needs the list of files in
the SD Card.
Variable has value SDDL if the
iOS device needs to download the
file which name is defined by
value.
void (*processOutgoingMessages)(void) Callback function called when the
board is ready to send messages
to the iOS device.
void (*deviceConnected)(void) Callback function called when the
iOS device connects to the board.
May be NULL.
void (*deviceDisconnected)(void) Callback function called when the
iOS device is disconnects from

Version: 9.0 156/252


Arduino Manager Fabrizio Boco

Parameter Description
the device. May be NULL.

16.3.2 IOSController

Initialize an instance of class IOSController that process alarms.

Parameter Description
EthernetServer *server Instance of EthernetServer class.
void (*doWork)(void) Callback function which replace
the standard loop() in the
sketch.
void (*doSync)(char *variable) Callback function called when the
iOS device needs to synchronize
switches and knobs positions with
the board.
void (*processIncomingMessages)(char Callback function called when the
*variable, char *value) board receives a message. This
means that variable has a value.
Variable has value SD if the iOS
device needs the list of files in
the SD Card.
Variable has value SDDL if the
iOS device needs to download the
file which name is defined by
value.
void (*processOutgoingMessages)(void) Callback function called when the
board is ready to send messages
to the iOS device.
void (*processAlarms)(char *alarm), Callback function called when an
alarm has been fired. May be
NULL.
void (*deviceConnected)(void) Callback function called when the
iOS device connects to the board.
May be NULL.
void (*deviceDisconnected)(void) Callback function called when the
iOS device is disconnects from
the device. May be NULL.

Version: 9.0 157/252


Arduino Manager Fabrizio Boco

16.3.3 loop

This function has to be called into the standard sketch loop.

Parameter Description
unsigned long delay Delay in processing incoming and
out coming messages.
Delay is in milliseconds.
Lower the delay, faster the
messages are processed.

For compatibility reasons loop function, without parameters, is still available


with a default delay of 500 milliseconds.

16.3.4 writeMessage

This function sends a message to the connected iOS device.

Lets suppose that the iOS device has a Display Widget called T. Periodically
the callback function processOutgoingMessages is called and inside this
function the iOS Widget is updated calling:
writeMessage(T,123);

Parameter Description
char *variable Name of the variable
float value Value of the variable

16.3.5 writeTripleMessage

This function sends a message to the connected iOS device.

Lets suppose that the iOS device has a Accelerometer Widget called Acc.
Periodically the callback function processOutgoingMessages is called and
inside this function the iOS Widget is updated calling:
writeTripleMessage(Acc,accX,accY,accZ);

Version: 9.0 158/252


Arduino Manager Fabrizio Boco

Parameter Description
char *variable Name of the variable
float value1 First value of the variable
float value2 Second value of the variable
float value3 Third value of the variable

16.3.6 writeTxtMessage

This function sends a message to the connected iOS device.


writeTxtMessage(T,Hello);

Parameter Description
char *variable Name of the variable
char *value Value of the variable

16.3.7 temporaryDigitalWrite

This function write the value to the pin for some time then set the previous
values.
temporaryDigitalWrite(pin13,HIGH,50);

If pin13 is LOW, this brings pin13 to HIGH for 50ms and then pin13 goes back
to LOW. If pin13 is LOW, it is unchanged.

Parameter Description
uint8_t pin The pin number
uint8_t value HIGH or LOW
unsigned long ms Duration of pins value change

Please, note that this function pause the sketch execution for the time indicated
by the ms parameter. So, use it with caution.

Version: 9.0 159/252


Arduino Manager Fabrizio Boco

16.3.8 sendFileList

This function sends a message to the connected iOS device with the list of files
available in the root directory of the SD Card.

Deprecated You dont need this function anymore.

16.3.9 sendFile

This function sends a message to the connected iOS device with the content of
the requested file.

Deprecated You dont need this function anymore.

Parameter Description
char * fileName Name of the file to send

16.3.10 setNTPServerAddress

This function set the address of the NTP Server used to synchronize time of the
clock for firing alarms.

The default NTP Server is: 64.90.182.55

Parameter Description
IPAddress address IPAddress of NTP Server

16.3.11 log

This function allows writing a text message or an integer on the Console Widget.

Parameter Description

Version: 9.0 160/252


Arduino Manager Fabrizio Boco

char *msg character message to write on the


Console Widget

Parameter Description
int *msg Integer value to write on the
Console Widget

16.3.12 logLn

This function allows writing a text message or an integer on the Console Widget
followed by a new line (\n).

Parameter Description
char *msg character message to write on the
Console Widget

Parameter Description
int *msg integer value to write on the
Console Widget

Parameter Description
long *msg long value to write on the
Console Widget

Parameter Description
unsigned long *msg Unsigned long value to write on
the Console Widget

16.3.13 sdLogLabels

This function writes the labels to the log file.

Version: 9.0 161/252


Arduino Manager Fabrizio Boco

Parameter Description
char *variable Name of the Logged Data Widget for
which file is written
char *label1 First label

Parameter Description
char *variable Name of the Logged Data Widget
for which file is written
char *label1 First label
char *label2 Second label

Parameter Description
char *variable Name of the Logged Data Widget
for which file is written
char *label1 First label
char *label2 Second label
char *label3 Third label

Version: 9.0 162/252


Arduino Manager Fabrizio Boco

Parameter Description
char *variable Name of the Logged Data Widget for
which file is written
char *label1 First label
char *label2 Second label
char *label3 Third label
char *label4 Forth label

Parameter Description
char *variable Name of the Logged Data Widget for
which file is written
char *label1 First label
char *label2 Second label
char *label3 Third label
char *label4 Forth label
char *label5 Fifth label

16.3.14 sdLog

This function writes the values to the log file.

Parameter Description
char *variable Name of the Logged Data Widget for
which file is written
unsigned long time current time as Unix epoch
float value1 First value

Parameter Description
char *variable Name of the Logged Data Widget for
which file is written
unsigned long time current time as Unix epoch
float value1 First value
float value2 Second value

Version: 9.0 163/252


Arduino Manager Fabrizio Boco

Parameter Description
char *variable Name of the Logged Data Widget for
which file is written
unsigned long time current time as Unix epoch
float value1 First value
float value2 Second value
float value3 Third value

Parameter Description
char *variable Name of the Logged Data Widget for
which file is written
unsigned long time current time as Unix epoch
float value1 First value
float value2 Second value
float value3 Third value
float value4 Forth value

Parameter Description
char *variable Name of the Logged Data Widget for
which file is written
unsigned long time current time as Unix epoch
float value1 First value
float value2 Second value
float value3 Third value
float value4 Forth value
float value5 Fifth value

Version: 9.0 164/252


Arduino Manager Fabrizio Boco

16.3.15 sdPurgeLogData

This function deletes the content of the log file.

Parameter Description
char *variable Name of the Logged Data Widget for
which file is written

16.3.16 now

This function returns the current time as Unix epoch.

16.4 Sketch skeleton for IOSController support

The typical sketch layout has to be revisited for IOSController integration.


Basically, what you had written in the loop() function have to be moved to the
function doWork and you have to implement four functions:

processIncomingMessages: when this callback function is called, a


message from the iOS device is received and your sketch has to react to
it.

processOutgoingMessages: when this callback function is called, your


sketch may send information to the iOS device.

doSync: when this callback function is called, the iOS device is just
connected and it needs to initialize the position of switches and knobs.

processAlarms: when this callback function is called, an alarm has fired


and it can be processed as needed.

So take a look to the typical Sketch for IOSController.


#include <SPI.h>
#include <Ethernet.h>
#include <SD.h>
#include <Servo.h>
#include <IOSController.h>

/*

Version: 9.0 165/252


Arduino Manager Fabrizio Boco

*
* Ethernet Library configuration
*
*/
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED }; // MAC Address assigned to
the board

/*
*
* IP info
*
* Using DHCP these parameters are not needed
*/
IPAddress ip(192,168,1, 220);
IPAddress gateway(192,168,1,1);
IPAddress subnet(255,255,255,0);

// Initialize the Ethernet server library


//
EthernetServer server(80); // Messages received on port 80

// Other initializations

int yellowLedPin = 8;
int yellowLed;

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

/*
*
* IOSController Library initialization
*
*/
IOSController
iosController(&server,&doWork,&doSync,&processIncomingMessages,&processOutgoingMes
sages,&processAlarms,&deviceConnected,&deviceDisconnected);

void setup()
{
/*
* Start the Ethernet connection and the server
* ATTENTION: Ethernet Library provided with Arduino 1.0 has the subnet and gateway
swapped respect to the documentation
*
*/

Version: 9.0 166/252


Arduino Manager Fabrizio Boco

server.begin();

// Do your initialization here



delay(500);
}

void loop() {

// Only this function is called

iosController.loop(450);
}

/**
*
*
* This function is called periodically and its equivalent to the standard loop()
function
*
*/
void doWork()
{
// Here the actual work is performed

temperature = analogRead();

digitalWrite(yellowLedPin,yellowLed);

/**
*
*
* This function is called when a new message is received from the iOS device
*
*/
void processIncomingMessages(char *variable, char *value) {

if (strcmp(variable,"S1")==0) {

yellowLed = atoi(value);
s1 = yellowLed;
}

if (strcmp(variable,"Knob1")==0) {

servoPos = atoi(value);
}

Version: 9.0 167/252


Arduino Manager Fabrizio Boco

if (strcmp(variable,"Push1") == 0){

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

/**
*
*
* This function is called periodically and messages can be sent to the iOS device
*
*/
void processOutgoingMessages() {

iosController.writeMessage("T",temperature);

...
iosController.writeMessage("Led13",yellowLed);
}

/**
*
*
* This function is called when the iOS device connects and needs to initialize the
position of switches and knobs
*
*/
void doSync (char *variable) {



if (strcmp(variable,"S1")==0) {

// Switch called S1 has to be set at the value of yellowLed


iosController.writeMessage(variable, yellowLed));
}

/**
*
*
* This function is called when a Alarm is fired
*
*/
void processAlarms(char *alarm) {

/**
*
*
* This function is called when the iOS device connects
*
*/
void deviceConnected () {

Version: 9.0 168/252


Arduino Manager Fabrizio Boco

/**
*
* This function is called when the iOS device disconnects
*
*/
void deviceDisconnected () {

Version: 9.0 169/252


Arduino Manager Fabrizio Boco

17 Development Manual
IOSControllerWINC1500

17.1 IOSControllerWINC1500 Library

The IOSControllerWINC1500 library allows to the iOS Arduino Manager app to


receive information from your own sketches and to control them.

This library works with the Adafruit ATWINC1500 breakout


(https://www.adafruit.com/products/2999).

Limitations:

Variable length: 14 characters

Value length: 14 characters

This library supports Alarm Widgets on Arduino UNO or MEGA.

To enable Alarm Widgets enter into the iOSControllerWINC1500.h file and


uncomment this define:
//#define ALARMS_SUPPORT // uncomment to enable support for Alarm Widget

Version: 9.0 170/252


Arduino Manager Fabrizio Boco

17.2 How to reduce Library memory occupation

IOSControllerWINC1500 library memory occupation may be controlled through


following defines in IOSControllerWINC1500.h:

Define Description
ALARMS_SUPPORT If it is not defined, the support
for Alarms is removed and the
Alarm Widget cannot be used.

17.3 Available Functions

17.3.1 IOSControllerWINC1500

Initialize an instance of class IOSController that doesnt process alarms.

Parameter Description
Adafruit_WINC1500Server *server Instance of WINC1500Server class.
void (*doWork)(void) Callback function which replace
the standard loop() in the
sketch.
void (*doSync)(char *variable) Callback function called when the
iOS device needs to synchronize
switches and knobs positions with
the board.
void (*processIncomingMessages)(char Callback function called when the
*variable, char *value) board receives a message. This
means that variable has a value.
Variable has value SD if the iOS
device needs the list of files in
the SD Card.
Variable has value SDDL if the
iOS device needs to download the
file which name is defined by
value.
void (*processOutgoingMessages)(void) Callback function called when the
board is ready to send messages
to the iOS device.

Version: 9.0 171/252


Arduino Manager Fabrizio Boco

Parameter Description
void (*deviceConnected)(void) Callback function called when the
iOS device connects to the board.
May be NULL.
void (*deviceDisconnected)(void) Callback function called when the
iOS device is disconnects from
the device. May be NULL.

17.3.2 IOSControllerWINC1500

Initialize an instance of class IOSController that process alarms.

Parameter Description
Adafruit_WINC1500Server *server Instance of WINC1500Server class.
void (*doWork)(void) Callback function which replace
the standard loop() in the
sketch.
void (*doSync)(char *variable) Callback function called when the
iOS device needs to synchronize
switches and knobs positions with
the board.
void (*processIncomingMessages)(char Callback function called when the
*variable, char *value) board receives a message. This
means that variable has a value.
Variable has value SD if the iOS
device needs the list of files in
the SD Card.
Variable has value SDDL if the
iOS device needs to download the
file which name is defined by
value.
void (*processOutgoingMessages)(void) Callback function called when the
board is ready to send messages
to the iOS device.
void (*processAlarms)(char *alarm), Callback function called when an
alarm has been fired. May be
NULL.
void (*deviceConnected)(void) Callback function called when the
iOS device connects to the board.

Version: 9.0 172/252


Arduino Manager Fabrizio Boco

Parameter Description
May be NULL.
void (*deviceDisconnected)(void) Callback function called when the
iOS device is disconnects from
the device. May be NULL.

17.3.3 loop

See paragraph 16.3.3.

17.3.4 writeMessage

See paragraph 16.3.4.

17.3.5 writeTripleMessage

See paragraph 16.3.5.

17.3.6 writeTxtMessage

See paragraph 16.3.6.

17.3.7 temporaryDigitalWrite

See paragraph 16.3.7.

17.3.8 setNTPServerAddress

See paragraph 16.3.10.

17.3.9 log

See paragraph 16.3.11.

Version: 9.0 173/252


Arduino Manager Fabrizio Boco

17.3.10 logLn

See paragraph 16.3.12.

17.3.11 now

See paragraph 16.3.16.

17.4 Sketch skeleton for IOSControllerWINC1500 support

The typical sketch layout has to be revisited for IOSController integration.


Basically, what you had written in the loop() function have to be moved to the
function doWork and you have to implement four functions:

processIncomingMessages: when this callback function is called, a


message from the iOS device is received and your sketch has to react to
it.

processOutgoingMessages: when this callback function is called, your


sketch may send information to the iOS device.

doSync: when this callback function is called, the iOS device is just
connected and it needs to initialize the position of switches and knobs.

processAlarms: when this callback function is called, an alarm has fired


and it can be processed as needed.

So take a look to the typical Sketch for IOSControllerWINC1500.

#include <SPI.h>
#include <Adafruit_WINC1500.h>
#include <Servo.h>
#include <IOSControllerForWINC1500.h>

#define WINC_CS 8
#define WINC_IRQ 7
#define WINC_RST 4

/*
*
* WiFI Library configuration
*

Version: 9.0 174/252


Arduino Manager Fabrizio Boco

*/
IPAddress ip(192,168,1,233);
IPAddress dns(8,8,8,8);
IPAddress gateway(192,168,1,1);
IPAddress subnet(255,255,255,0);

char ssid[] = "myssid"; // your network SSID (name)


char pass[] = "mypassword"; // your network password

int status = WL_IDLE_STATUS;

Adafruit_WINC1500Server server(80);

/**
*
* Other initializations
*
*/
#define YELLOWLEDPIN 9
int yellowLed = HIGH;

/*
*
* Prototypes of IOSControllerWINC1500s callbacks
*
*
*/
void doWork();
void doSync(char *variable);
void processIncomingMessages(char *variable, char *value);
void processOutgoingMessages();
void processAlarms(char *variable);
void deviceConnected();
void deviceDisconnected();

Adafruit_WINC1500 WiFi(WINC_CS, WINC_IRQ, WINC_RST);

/*
*
* IOSController Library initialization
*
*/
#ifdef ALARMS_SUPPORT
IOSControllerForWINC1500
iosController(&server,&doWork,&doSync,&processIncomingMessages,&processOutgoingMes
sages,&processAlarms,&deviceConnected,&deviceDisconnected);
#else
IOSControllerForWINC1500
iosController(&server,&doWork,&doSync,&processIncomingMessages,&processOutgoingMes
sages,&deviceConnected,&deviceDisconnected);
#endif

void setup() {

Serial.begin(9600);
while (!Serial) {

Version: 9.0 175/252


Arduino Manager Fabrizio Boco

; // wait for serial port to connect. Needed for native USB port only
}

// attempt to connect to Wifi network

WiFi.config(ip, dns, gateway, subnet);

while (status != WL_CONNECTED) {

Serial.print("Attempting to connect to SSID: ");


Serial.println(ssid);

// Connect to WPA/WPA2 network. Change this line if using open or WEP network
status = WiFi.begin(ssid, pass);

// wait 2 seconds for connection:


delay(2000);
}

// print your WiFi shield's IP address

IPAddress ip = WiFi.localIP();
Serial.print("IP Address: ");
Serial.println(ip);

// Set a new NTP Server


//
//iosController.setNTPServerAddress(IPAddress(178,63,135,195));

/**
*
* Other initializations
*
*/

/**
*
* Standard loop function
*
*/
void loop() {

iosController.loop(20);
}

/**
*
*
* This function is called periodically and its equivalent to the standard loop()
function
*
*/
void doWork() {

// Here the actual work is performed

Version: 9.0 176/252


Arduino Manager Fabrizio Boco

temperature = analogRead();

digitalWrite(yellowLedPin,yellowLed);
}

/**
*
*
* This function is called when the ios device connects and needs to initialize the
position of switches and knobs
*
*/
void doSync (char *variable) {

if (strcmp(variable,"Knob1")==0) {

iosController.writeMessage(variable,map(servo.read(),0,180,0,1023));
}

/**
*
*
* This function is called when a new message is received from the iOS device
*
*/
void processIncomingMessages(char *variable, char *value) {

if (strcmp(variable,"S1")==0) {

yellowLed = atoi(value);
}

/**
*
*
* This function is called periodically and messages can be sent to the iOS device
*
*/
void processOutgoingMessages() {

iosController.writeMessage("T",temperature);

/**
*
*
* This function is called when a Alarm is fired
*
*/

Version: 9.0 177/252


Arduino Manager Fabrizio Boco

void processAlarms(char *alarm) {

/**
*
*
* This function is called when the iOS device connects
*
*/
void deviceConnected () {

/**
*
*
* This function is called when the iOS device disconnects
*
*/
void deviceDisconnected () {

Version: 9.0 178/252


Arduino Manager Fabrizio Boco

18 Development Manual
IOSControllerWiFi

18.1 IOSControllerWiFi Library

The IOSControllerWiFi library allows to the iOS Arduino Manager app to


receive information from your own sketches and to control them.

This library works with the official WiFi Shield


(http://arduino.cc/en/Main/ArduinoWiFiShield) and the official WiFi library
(http://arduino.cc/en/Reference/WiFi)2.

Limitations:

Variable length: 14 characters

Value length: 14 characters

18.2 How to reduce Library memory occupation

IOSControllerWiFi library memory occupation may be controlled through


following defines in IOCControllerWiFi.h:

Define Description
SD_SUPPORT If it is not defined, the support
for reading SD Card content is
removed and the SD Widget cannot
be used.
ALARMS_SUPPORT If it is not defined, the support
for Alarms is removed and the
Alarm Widget cannot be used.
SDLOGGEDATAGRAPH_SUPPORT If it is not defined, the support

2
It should also work with other shields, which fully support the official WiFi library, but it has not been tested yet.
You have been warned.

Version: 9.0 179/252


Arduino Manager Fabrizio Boco

Define Description
for reading accessing logged data
is removed and the Logged Data
Graph Widget cannot be used.

18.3 Available Functions

18.3.1 IOSControllerWiFi

Initialize an instance of class IOSControllerWiFi which doesnt process alarms.

Parameter Description
WiFiServer *server Instance of Ethernet Server class.
void (*doWork)(void) Callback function which replace
the standard loop() in the sketch.
void (*doSync)(char *variable) Callback function called when the
iOS device needs to synchronize
switches and knobs positions with
the board.
void (*processIncomingMessages)(char Callback function called when the
*variable, char *value) board receives a message. This
means that variable has a value.
Variable has value SD if the iOS
device needs the list of files in
the SD Card.
Variable has value SDDL if the iOS
device needs to download the file
which name is defined by value.
void (*processOutgoingMessages)(void) Callback function called when the
board is ready to send messages to
the iOS device.
void (*deviceConnected)(void) Callback function called when the
iOS device connects to the board.
May be NULL.
void (*deviceDisconnected)(void) Callback function called when the
iOS device is disconnects from the

Version: 9.0 180/252


Arduino Manager Fabrizio Boco

Parameter Description
device. May be NULL.

18.3.2 IOSControllerWiFi

Initialize an instance of class IOSControllerWiFi that process alarms.

Parameter Description
WiFiServer *server Instance of Ethernet Server class.
void (*doWork)(void) Callback function which replace
the standard loop() in the sketch.
void (*doSync)(char *variable) Callback function called when the
iOS device needs to synchronize
switches and knobs positions with
the board.
void (*processIncomingMessages)(char Callback function called when the
*variable, char *value) board receives a message. This
means that variable has a value.
Variable has value SD if the iOS
device needs the list of files in
the SD Card.
Variable has value SDDL if the iOS
device needs to download the file
which name is defined by value.
void (*processOutgoingMessages)(void) Callback function called when the
board is ready to send messages to
the iOS device.
void (*processAlarms)(char *alarm), Callback function called when an
alarm has been fired. May be NULL.
void (*deviceConnected)(void) Callback function called when the
iOS device connects to the board.
May be NULL.
void (*deviceDisconnected)(void) Callback function called when the
iOS device is disconnects from the
device. May be NULL.

Version: 9.0 181/252


Arduino Manager Fabrizio Boco

18.3.3 loop

See paragraph 16.3.3.

18.3.4 writeMessage

See paragraph 16.3.4.

18.3.5 writeMessage

See paragraph 16.3.5.

18.3.6 writeTxtMessage

See paragraph 16.3.6.

18.3.7 temporaryDigitalWrite

See paragraph 16.3.7.

18.3.8 sendFileList

See paragraph 16.3.8.

Deprecated You dont need this function anymore.

18.3.9 sendFile

See paragraph 16.3.9.

Deprecated You dont need this function anymore.

Version: 9.0 182/252


Arduino Manager Fabrizio Boco

18.3.10 setNTPServerAddress

At the moment, this function does nothing.

Deprecated You dont need this function anymore.

18.3.11 log

See paragraph 16.3.11.

18.3.12 logLn

See paragraph 16.3.12.

18.3.13 sdLogLabels

See paragraph 16.3.13.

18.3.14 sdLog

See paragraph 16.3.14.

18.3.15 sdPurgeLogData

See paragraph 16.3.14.

18.3.16 now

This function returns the current time as Unix epoch.

Version: 9.0 183/252


Arduino Manager Fabrizio Boco

18.4 Sketch skeleton for IOSControllerWiFi support

The typical sketch layout has to be revisited for IOSControllerWiFi integration.


Basically, what you had written in the loop() function have to be moved to the
function doWork and you have to implement four functions:

processIncomingMessages: when this callback function is called, a


message from the iOS device is received and your sketch has to react to
it.

processOutgoingMessages: when this callback function is called, your


sketch may send information to the iOS device.

doSync: when this callback function is called, the iOS device is just
connected and it needs to initialize the position of switches and knobs.

processAlarms: when this callback function is called, an alarm has fired


and it can be processed as needed.

So take a look to the typical Sketch for IOSControllerWiFi.


#include <SPI.h>
#include <WiFi.h>
#include <SD.h>
#include <Servo.h>
#include <IOSControllerWiFi.h>

/*
*
* WiFI Library configuration
*
*/
char ssid[] = "YOUR_SSID"; // your network SSID (name)
char pass[] = "YOUR_PASSWORD"; // your network password
int keyIndex = 0; // your network key Index number (needed only for WEP)

int status = WL_IDLE_STATUS;

WiFiServer server(80);

// Initialize the Ethernet server library


//
EthernetServer server(80); // Messages received on port 80

// Other initializations

int yellowLedPin = 8;
int yellowLed;

Version: 9.0 184/252


Arduino Manager Fabrizio Boco

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

/*
*
* IOSController Library initialization
*
*/
IOSControllerWiFi
iosControllerWiFi(&server,&doWork,&doSync,&processIncomingMessages,&processOutgoin
gMessages,&processAlarms,&deviceConnected,&deviceDisconnected);

void setup()
{
//attempt to connect to Wifi network:
while ( status != WL_CONNECTED)
{
Serial.print("Attempting to connect to SSID: ");
Serial.println(ssid);
// Connect to WPA/WPA2 network. Change this line if using open or WEP network:
status = WiFi.begin(ssid, pass);
// wait 10 seconds for connection:
delay(10000);
}

// print your WiFi shield's IP address:


IPAddress ip = WiFi.localIP();
Serial.print("IP Address: ");
Serial.println(ip);

server.begin();

// Do your initialization here



delay(500);
}

void loop()
{
// Only this function is called

iosControllerWiFi.loop(450);

Version: 9.0 185/252


Arduino Manager Fabrizio Boco

/**
*
*
* This function is called periodically and its equivalent to the standard loop()
function
*
*/
void doWork()
{
// Here the actual work is performed

temperature = analogRead();

digitalWrite(yellowLedPin,yellowLed);


}

/**
*
*
* This function is called when a new message is received from the iOS device
*
*/
void processIncomingMessages(char *variable, char *value) {

if (strcmp(variable,"S1")==0) {

yellowLed = atoi(value);
s1 = yellowLed;
}
if (strcmp(variable,"Knob1")==0) {
servoPos = atoi(value);
}
if (strcmp(variable,"Push1") == 0){
iosControllerWiFi.temporaryDigitalWrite(connectionLedPin,LOW,500);
}
}

/**
*
*
* This function is called periodically and messages can be sent to the iOS device
*
*/
void processOutgoingMessages() {

iosControllerWiFi.writeMessage("T",temperature);

...

iosControllerWiFi.writeMessage("Led13",yellowLed);
}

/**

Version: 9.0 186/252


Arduino Manager Fabrizio Boco

*
*
* This function is called when the iOS device connects and needs to initialize the
position of switches and knobs
*
*/
void doSync (char *variable) {



if (strcmp(variable,"S1")==0) {

// Switch called S1 has to be set at the value of yellowLed

iosControllerWiFi.writeMessage(variable, yellowLed));
}

/**
*
*
* This function is called when a Alarm is fired
*
*/
void processAlarms(char *alarm) {

/**
*
*
* This function is called when the iOS device connects
*
*/
void deviceConnected () {

/**
*
*
* This function is called when the iOS device disconnects
*
*/
void deviceDisconnected () {

Version: 9.0 187/252


Arduino Manager Fabrizio Boco

18.5 Code example for controlling a Rover Robot


/**
*
*
* This function is called when a new message is received from the iOS device
*
*/
void processIncomingMessages(char *variable, char *value) {

if (strcmp(variable,"RC_T") == 0) {

currentSpeed = map(atoi(value),0,100,0,255);

throttle(currentSpeed); // You have to provide this function


}

if (strcmp(variable,"RC_F") == 0) {

forward(currentSpeed); // You have to provide this function


}

if (strcmp(variable,"RC_B") == 0) {

backward(currentSpeed); // You have to provide this function


}

if (strcmp(variable,"RC_R") == 0) {

int rotationSpeed = map(atoi(value),0,100,0,255);


turnRight(currentSpeed,rotationSpeed); // You have to provide this
function
}

if (strcmp(variable,"RC_L") == 0) {

int rotationSpeed = map(atoi(value),0,100,0,255);


turnLeft(currentSpeed,rotationSpeed); // You have to provide this function
}

Version: 9.0 188/252


Arduino Manager Fabrizio Boco

19 Development Manual
IOSControllerForESP8622

19.1 IOSControllerForESP8622 Library

The IOSControllerESP8622 library allows to the iOS Arduino Manager app to


receive information from your own sketches and to control them when Arduino
is connected through the ESP8622 board.

Limitations:

Variable length: 14 characters

Value length: 14 characters

19.2 Not supported Widgets

The IOSControllerForESP8622 library doesnt support the following Widget,


which then cannot be used with ESP8622:

SD Widget

Logged Data Graph.

19.3 Available Functions

19.3.1 IOSControllerForESP8622

Initialize an instance of class IOSControllerForESP8622.

Parameter Description
HardwareSerial &s Serial used for communicating
with ESP8622
void (*doWork)(void) Callback function which replace

Version: 9.0 189/252


Arduino Manager Fabrizio Boco

the standard loop() in the


sketch.
void (*doSync)(char *variable) Callback function called when the
iOS device needs to synchronize
switches and knobs positions with
the board.
void (*processIncomingMessages)(char Callback function called when the
*variable, char *value) board receives a message. This
means that variable has a value.
void (*processOutgoingMessages)(void) Callback function called when the
board is ready to send messages
to the iOS device.
void (*deviceConnected)(void) Callback function called when the
iOS device connects to the board.
May be NULL.
void (*deviceDisconnected)(void) Callback function called when the
iOS device is disconnects from
the device. May be NULL.

19.3.2 IOSControllerForESP8622

Initialize an instance of class IOSControllerForESP8622 which process alarms

Parameter Description
HardwareSerial &s Serial used for communicating
with ESP8622
void (*doWork)(void) Callback function which replace
the standard loop() in the
sketch.
void (*doSync)(char *variable) Callback function called when the
iOS device needs to synchronize
switches and knobs positions with
the board.
void (*processIncomingMessages)(char Callback function called when the
*variable, char *value) board receives a message. This
means that variable has a value.
void (*processOutgoingMessages)(void) Callback function called when the
board is ready to send messages

Version: 9.0 190/252


Arduino Manager Fabrizio Boco

to the iOS device.


void (*processAlarms)(char *alarm), Callback function called when an
alarm has been fired. May be
NULL.
void (*deviceConnected)(void) Callback function called when the
iOS device connects to the board.
May be NULL.
void (*deviceDisconnected)(void) Callback function called when the
iOS device is disconnects from
the device. May be NULL.

19.3.3 begin

This function sets network parameters and initialize the ESP8622 device.

Parameter Description
String ssid SSID of the network to connect to
String password Password of the network to
connect to
String address IP address to assign to the
ESP8622
String port IP port to assign to the ESP8622

19.3.4 loop

See paragraph 16.3.11.

19.3.5 writeMessage

See paragraph 16.3.4.

19.3.6 writeMessage

See paragraph 16.3.5.

Version: 9.0 191/252


Arduino Manager Fabrizio Boco

19.3.7 writeTripleMessage

See chapter 16.3.5.

19.3.8 writeTxtMessage

See paragraph 16.3.6.

19.3.9 temporaryDigitalWrite

See paragraph 16.3.7.

19.3.10 setNTPServerAddress

See paragraph 16.3.10

19.3.11 Log

See paragraph 16.3.11

19.3.12 logLn

See paragraph 16.3.12

19.3.13 now

This function returns the current time as Unix epoch.

19.4 Sketch skeleton for IOSControllerForESP8622 support

The typical sketch layout has to be revisited for IOSController integration.


Basically, what you had written in the loop() function have to be moved to the
function doWork and you have to implement four functions:

Version: 9.0 192/252


Arduino Manager Fabrizio Boco

processIncomingMessages: when this callback function is called, a


message from the iOS device is received and your sketch has to react to
it.

processOutgoingMessages: when this callback function is called, your


sketch may send information to the iOS device.

doSync: when this callback function is called, the iOS device is just
connected and it needs to initialize the position of switches and knobs.

processAlarms: when this callback function is called, an alarm has fired


and it can be processed as needed.

So take a look to the typical Sketch for IOSControllerForESP8622.


#include "IOSControllerForESP8266.h"

//

// Other initializations

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

/*
*
* IOSController Library initialization
*
*/
char ssid[] = "Your SSID";
char pass[] = "Your Password";

IOSControllerForESP8266 iosController(Serial1,
&doWork,
&doSync,

Version: 9.0 193/252


Arduino Manager Fabrizio Boco

&processIncomingMessages,
&processOutgoingMessages,
&processAlarms,
&deviceConnected,
&deviceDisconnected);

void setup()
{

Serial.begin(9600);
Serial1.begin(115200); // your esp's baud rate might be different

if (!iosController.begin(ssid,pass, "192.168.1.235",80)) {
Serial.println("Setup failed");
while(true)
;
}

// Do your initialization here



delay(500);
}

void loop()
{
// Only this function is called

iosController.loop(50);
}

/**
*
*
* This function is called periodically and its equivalent to the standard loop()
function
*
*/
void doWork()
{
// Here the actual work is performed

temperature = (3.25 * analogRead(TEMPERATUREPIN) * 100.0) / 1024.;

/**
*
*
* This function is called when a new message is received from the iOS device

Version: 9.0 194/252


Arduino Manager Fabrizio Boco

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

if (strcmp(variable,"S1") == 0)
digitalWrite(YELLOWLED,atoi(value));


}

/**
*
*
* This function is called periodically and messages can be sent to the iOS device
*
*/
void processOutgoingMessages() {

iosController.writeMessage("T",temperature);

...
iosController.writeMessage("Led13", digitalRead(YELLOWLED));
}

/**
*
*
* This function is called when the iOS device connects and needs to initialize the
position of switches and knobs
*
*/
void doSync (char *variable) {



if (strcmp(variable,"S1")==0) {

// Switch called S1 has to be set at the value of yellowLed


iosController.writeMessage("S1",digitalRead(YELLOWLED));

/**
*
*
* This function is called when a Alarm is fired
*
*/
void processAlarms(char *alarm) {

/**
*
*
* This function is called when the iOS device connects
*

Version: 9.0 195/252


Arduino Manager Fabrizio Boco

*/
void deviceConnected () {

/**
*
* This function is called when the iOS device disconnects
*
*/
void deviceDisconnected () {

Version: 9.0 196/252


Arduino Manager Fabrizio Boco

20 Development Manual
IOSControllerForRFduino

20.1 IOSControllerForRFduino Library

The IOSControllerForRFduino library allows to the iOS Arduino Manager app to


receive information from your own sketches and to control them.

Limitations:

Variable length: 14 characters

Value length: 14 characters

20.2 Not supported Widgets

The IOSControllerForRFduino library doesnt support the following Widget,


which then cannot be used with RFduino:

Alarm

SD Widget

Logged Data Graph.

Version: 9.0 197/252


Arduino Manager Fabrizio Boco

20.3 Available Functions

20.3.1 IOSControllerForRFduino

Initialize an instance of class IOSControllerForRFduino.

Parameter Description
void (*doWork)(void) Callback function which replace
the standard loop() in the
sketch.
void (*doSync)(char *variable) Callback function called when the
iOS device needs to synchronize
switches and knobs positions with
the board.
void (*processIncomingMessages)(char Callback function called when the
*variable, char *value) board receives a message. This
means that variable has a value.
void (*processOutgoingMessages)(void) Callback function called when the
board is ready to send messages
to the iOS device.
void (*deviceConnected)(void) Callback function called when the
iOS device connects to the board.
May be NULL.
void (*deviceDisconnected)(void) Callback function called when the
iOS device is disconnects from
the device. May be NULL.

20.3.2 Loop

This function has to be called into the standard sketch loop.

20.3.3 writeMessage

See chapter 16.3.4.

Version: 9.0 198/252


Arduino Manager Fabrizio Boco

20.3.4 writeTripleMessage

See chapter 16.3.5.

20.3.5 writeTxtMessage

See chapter 16.3.6.

20.3.6 temporaryDigitalWrite

See chapter 16.3.7.

20.3.7 log

See chapter 16.3.11.

20.3.8 logLn

See chapter 16.3.12.

20.3.9 now

See chapter 0.

20.4 Sketch skeleton for IOSControllerForRFduino support

The typical sketch layout has to be revisited for IOSControllerForRFduino


integration. Basically, what you had written in the loop() function have to be
moved to the function doWork and you have to implement four functions:

processIncomingMessages: when this callback function is called, a


message from the iOS device is received and your sketch has to react to
it.

Version: 9.0 199/252


Arduino Manager Fabrizio Boco

processOutgoingMessages: when this callback function is called, your


sketch may send information to the iOS device.

doSync: when this callback function is called, the iOS device is just
connected and it needs to initialize the position of switches and knobs.

So take a look to the typical Sketch for IOSControllerForArduino.


#include <RFduinoBLE.h>
#include "IOSControllerForRFduino.h"

#define YELLOWLEDPIN 4
#define CONNECTIONPIN 6
#define VARIABLELED 2
#define POTENTIOMETERPIN 3

int yellowLed;
int connectionLed;
int pot;
float temp;

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

/*
*
* IOSControllerForRFduino Library initialization
*
*/
IOSControllerForRFduino
iosController(&doWork,&doSync,&processIncomingMessages,&processOutgoingMessages,&d
eviceConnected,&deviceDisconnected);

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

RFduinoBLE.deviceName = "A Manager";


RFduinoBLE.advertisementData = "data";
RFduinoBLE.advertisementInterval = MILLISECONDS(250);
RFduinoBLE.txPowerLevel = -20; // (-20dbM to +4 dBm) +4, 0, -4, -8, -12, -16
and -20

Version: 9.0 200/252


Arduino Manager Fabrizio Boco

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

Serial.println("Setup completed");
}
void loop() {

iosController.loop();
}

void doWork() {


temp = RFduino_temperature(CELSIUS);

}

void doSync(char *variable) {

if (strcmp(variable,"S1")==0) {

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

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

if (strcmp(variable,"S1")==0) {

yellowLed = atoi(value);
}

void processOutgoingMessages() {

//Serial.println("Outgoing");

iosController.writeMessage("T",temp);

}

void deviceConnected() {

digitalWrite(CONNECTIONPIN,HIGH);
}

void deviceDisconnected() {

digitalWrite(CONNECTIONPIN,LOW);
}

Version: 9.0 201/252


Arduino Manager Fabrizio Boco

21 Development Manual
IOSControllerForBluefruit

21.1 IOSControllerForBluefruit Library

The IOSControllerForBluefruit library allows to the iOS Arduino Manager app to


receive information from your own sketches and to control them.

Limitations:

Variable length: 14 characters

Value length: 14 characters

21.2 Not supported Widgets

The IOSControllerForBluefruit library doesnt support the following Widget


which then cannot be used with the nRF8001 breakout board.

Alarm Widget

SD Widget

Logged Data Graph.

21.3 Available Functions

21.3.1 IOSControllerForBluefruit

Initialize an instance of class IOSControllerForBluefruit.

Parameter Description
void (*doWork)(void) Callback function which replace

Version: 9.0 202/252


Arduino Manager Fabrizio Boco

the standard loop() in the


sketch.
void (*doSync)(char *variable) Callback function called when the
iOS device needs to synchronize
switches and knobs positions with
the board.
void (*processIncomingMessages)(char Callback function called when the
*variable, char *value) board receives a message. This
means that variable has a value.
void (*processOutgoingMessages)(void) Callback function called when the
board is ready to send messages
to the iOS device.
void (*deviceConnected)(void) Callback function called when the
iOS device connects to the board.
May be NULL.
void (*deviceDisconnected)(void) Callback function called when the
iOS device is disconnects from
the device. May be NULL.

21.3.2 loop

This function has to be called into the standard sketch loop.

21.3.3 writeMessage

See chapter 16.3.4.

21.3.4 writeTripleMessage

See chapter 16.3.5.

21.3.5 writeTxtMessage

See chapter 16.3.6.

Version: 9.0 203/252


Arduino Manager Fabrizio Boco

21.3.6 temporaryDigitalWrite

See chapter 16.3.7.

21.3.7 log

See chapter 16.3.11.

21.3.8 logLn

See chapter 16.3.12.

21.4 Sketch skeleton for IOSControllerForBluefruit support

The typical sketch layout has to be revisited for IOSControllerForBluefruit


integration. Basically, what you had written in the loop() function have to be
moved to the function doWork and you have to implement four functions:

processIncomingMessages: when this callback function is called, a


message from the iOS device is received and your sketch has to react to
it.

processOutgoingMessages: when this callback function is called, your


sketch may send information to the iOS device.

doSync: when this callback function is called, the iOS device is just
connected and it needs to initialize the position of switches and knobs.

So take a look to the typical Sketch for IOSControllerForBluefruit.


#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;

Version: 9.0 204/252


Arduino Manager Fabrizio Boco

int pot;
float temperature;

/*
*
* IOSControllerForForBluefruit Library initialization
*
*/
IOSControllerForBluefruit
iosController(&doWork,&doSync,&processIncomingMessages,&processOutgoingMessages,&d
eviceConnected,&deviceDisconnected);

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

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) {

if (strcmp(variable,"S1")==0) {

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

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

if (strcmp(variable,"S1")==0) {

Led13 = atoi(value);

digitalWrite(6,Led13);
}

Version: 9.0 205/252


Arduino Manager Fabrizio Boco

void processOutgoingMessages() {

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

void deviceConnected () {

digitalWrite(CONNECTIONPIN,HIGH);
}

void deviceDisconnected () {

digitalWrite(CONNECTIONPIN,LOW);
}

Version: 9.0 206/252


Arduino Manager Fabrizio Boco

22 Development Manual
IOSControllerForBluefruitSPIF
riend

22.1 IOSControllerForBluefruitSPIFriend Library

The IOSControllerForBluefruit library allows to the iOS Arduino Manager app to


receive information from your own sketches and to control them.

Limitations:

Variable length: 14 characters

Value length: 14 characters

22.2 Not supported Widgets

The IOSControllerForBluefruitSPIFriend library doesnt support the following


Widget which then cannot be used with the Bluefruit LE SPI Friend board.

Alarm Widget

SD Widget

Logged Data Graph.

Version: 9.0 207/252


Arduino Manager Fabrizio Boco

22.3 Available Functions

22.3.1 IOSControllerForBluefruitSPIFriend

Initialize an instance of class IOSControllerForBluefruitSPIFriend.

Parameter Description
void (*doWork)(void) Callback function which replace
the standard loop() in the
sketch.
void (*doSync)(char *variable) Callback function called when the
iOS device needs to synchronize
switches and knobs positions with
the board.
void (*processIncomingMessages)(char Callback function called when the
*variable, char *value) board receives a message. This
means that variable has a value.
void (*processOutgoingMessages)(void) Callback function called when the
board is ready to send messages
to the iOS device.
void (*deviceConnected)(void) Callback function called when the
iOS device connects to the board.
May be NULL.
void (*deviceDisconnected)(void) Callback function called when the
iOS device is disconnects from
the device. May be NULL.

22.3.2 loop

This function has to be called into the standard sketch loop.

22.3.3 writeMessage

See chapter 16.3.4.

Version: 9.0 208/252


Arduino Manager Fabrizio Boco

22.3.4 writeTripleMessage

See chapter 16.3.5.

22.3.5 writeTxtMessage

See chapter 16.3.6.

22.3.6 temporaryDigitalWrite

See chapter 16.3.7.

22.3.7 log

See chapter 16.3.11.

22.3.8 logLn

See chapter 16.3.12.

22.4 Sketch skeleton for IOSControllerForBluefruitSPIFriend support

The typical sketch layout has to be revisited for


IOSControllerForBluefruitSPIFriend integration. Basically, what you had written
in the loop() function have to be moved to the function doWork and you have to
implement four functions:

processIncomingMessages: when this callback function is called, a


message from the iOS device is received and your sketch has to react to
it.

processOutgoingMessages: when this callback function is called, your


sketch may send information to the iOS device.

doSync: when this callback function is called, the iOS device is just
connected and it needs to initialize the position of switches and knobs.

Version: 9.0 209/252


Arduino Manager Fabrizio Boco

So take a look to the typical Sketch for IOSControllerForBluefruitSPIFriend.


#include "IOSControllerForBluefruitSPIFriend.h"

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

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

/*
*
* IOSControllerForBluefruitSPIFriend Library initialization
*
*/
IOSControllerForBluefruitSPIFriend
iosController(&doWork,&doSync,&processIncomingMessages,&processOutgoingMessages,&d
eviceConnected,&deviceDisconnected);

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

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) {

if (strcmp(variable,"S1")==0) {

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

Version: 9.0 210/252


Arduino Manager Fabrizio Boco

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

if (strcmp(variable,"S1")==0) {

Led13 = atoi(value);

digitalWrite(6,Led13);
}

void processOutgoingMessages() {

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

void deviceConnected () {

digitalWrite(CONNECTIONPIN,HIGH);
}

void deviceDisconnected () {

digitalWrite(CONNECTIONPIN,LOW);
}

Version: 9.0 211/252


Arduino Manager Fabrizio Boco

23 Development Manual
IOSControllerTeensyForBlue
fruit

23.1 IOSControllerTeensyForBluefruit Library

The IOSControllerTeensyForBluefruit library allows to the iOS Arduino Manager


app to receive information from your own sketches and to control them when
running on Teensy 3.1.

Limitations:

Variable length: 14 characters

Value length: 14 characters

23.2 Not supported Widgets

The IOSControllerTeensyForBluefruit library doesnt support the following


Widget which then cannot be used with the nRF8001 breakout board.

Alarm Widget

SD Widget

Logged Data Graph.

Version: 9.0 212/252


Arduino Manager Fabrizio Boco

23.3 Available Functions

23.3.1 IOSControllerTeensyForBluefruit

Initialize an instance of class IOSControllerTeensyForBluefruit.

Parameter Description
void (*doWork)(void) Callback function which replace
the standard loop() in the
sketch.
void (*doSync)(char *variable) Callback function called when the
iOS device needs to synchronize
switches and knobs positions with
the board.
void (*processIncomingMessages)(char Callback function called when the
*variable, char *value) board receives a message. This
means that variable has a value.
void (*processOutgoingMessages)(void) Callback function called when the
board is ready to send messages
to the iOS device.
void (*deviceConnected)(void) Callback function called when the
iOS device connects to the board.
May be NULL.
void (*deviceDisconnected)(void) Callback function called when the
iOS device is disconnects from
the device. May be NULL.

For all other functions, refer to previous section (Development Manual


IOSControllerForBluefruit).

Version: 9.0 213/252


Arduino Manager Fabrizio Boco

24 Development Manual
IOSControllerBLE

24.1 IOSControllerBLE Library

The IOSControllerBLE library allows to the iOS Arduino Manager app to receive
information from your own sketches and to control them.

Limitations:

Variable length: 14 characters

Value length: 14 characters

24.2 Not supported Widgets

The IOSControllerBLE library doesnt support the following Widget which then
cannot be used with the BLE Shield.

SD Widget

Logged Data Graph.

24.3 How to reduce Library memory occupation

IOSControllerBLE library memory occupation may be controlled through


following define in IOCControllerBLE.h:

Define Description
ALARMS_SUPPORT If it is not defined, the support
for Alarms is removed and the
Alarm Widget cannot be used.

Version: 9.0 214/252


Arduino Manager Fabrizio Boco

24.4 Available Functions

24.4.1 IOSControllerBLE

Initialize an instance of class IOSControllerBLE that doesnt process alarms.

Parameter Description
void (*doWork)(void) Callback function which replace
the standard loop() in the
sketch.
void (*doSync)(char *variable) Callback function called when the
iOS device needs to synchronize
switches and knobs positions with
the board.
void (*processIncomingMessages)(char Callback function called when the
*variable, char *value) board receives a message. This
means that variable has a value.
void (*processOutgoingMessages)(void) Callback function called when the
board is ready to send messages
to the iOS device.
void (*deviceConnected)(void) Callback function called when the
iOS device connects to the board.
May be NULL.
void (*deviceDisconnected)(void) Callback function called when the
iOS device is disconnects from
the device. May be NULL.

24.4.2 IOSControllerBLE

Initialize an instance of class IOSControllerBLE that process alarms.

Parameter Description
void (*doWork)(void) Callback function which replace
the standard loop() in the
sketch.

Version: 9.0 215/252


Arduino Manager Fabrizio Boco

void (*doSync)(char *variable) Callback function called when the


iOS device needs to synchronize
switches and knobs positions with
the board.
void (*processIncomingMessages)(char Callback function called when the
*variable, char *value) board receives a message. This
means that variable has a value.
void (*processOutgoingMessages)(void) Callback function called when the
board is ready to send messages
to the iOS device.
void (*processAlarms)(char *alarm), Callback function called when an
alarm has been fired. May be
NULL.
void (*deviceConnected)(void) Callback function called when the
iOS device connects to the board.
May be NULL.
void (*deviceDisconnected)(void) Callback function called when the
iOS device is disconnects from
the device. May be NULL.

24.4.3 loop

This function has to be called into the standard sketch loop.

24.4.4 writeMessage

See chapter 16.3.4.

24.4.5 writeTripleMessage

See chapter 16.3.5.

24.4.6 writeTxtMessage

See chapter 16.3.6.

Version: 9.0 216/252


Arduino Manager Fabrizio Boco

24.4.7 temporaryDigitalWrite

See chapter 16.3.7.

24.4.8 log

See chapter 16.3.11.

24.4.9 logLn

See chapter 16.3.12.

24.4.10 now

See chapter 0.

24.5 Sketch skeleton for IOSControllerBLE support

The typical sketch layout has to be revisited for IOSControllerBLE integration.


Basically, what you had written in the loop() function have to be moved to the
function doWork and you have to implement four functions:

processIncomingMessages: when this callback function is called, a


message from the iOS device is received and your sketch has to react to
it.

processOutgoingMessages: when this callback function is called, your


sketch may send information to the iOS device.

doSync: when this callback function is called, the iOS device is just
connected and it needs to initialize the position of switches and knobs.

processAlarms: when this callback function is called, an alarm has fired


and it can be processed as needed.

So take a look to the typical Sketch for IOSControllerBLE.

Version: 9.0 217/252


Arduino Manager Fabrizio Boco

#include <Arduino.h>
#include <SPI.h>
#include <Servo.h>
#include "ble.h"
#include <IOSControllerBLE.h>

#define YELLOWLEDPIN 6
#define CONNECTIONPIN 7
#define TEMPERATUREPIN 0
#define LIGHTPIN 1
#define POTENTIOMETERPIN 2
#define SERVOPIN 5

boolean Led13;
int light;
int pot;
float temperature;

Servo servo;
int servoPos;

#ifdef ALARMS_SUPPORT
IOSControllerBLE
iosController(&doWork,&doSync,&processIncomingMessages,&processOutgoingMessages,&p
rocessAlarms,&deviceConnected,&deviceDisconnected);
#else
IOSControllerBLE
iosController(&doWork,&doSync,&processIncomingMessages,&processOutgoingMessages,&d
eviceConnected,&deviceDisconnected);
#endif

void setup()
{
SPI.setDataMode(SPI_MODE0);
SPI.setBitOrder(LSBFIRST);
SPI.setClockDivider(SPI_CLOCK_DIV16);
SPI.begin();

ble_begin();

Serial.begin(115200);

..

Serial.println("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

Version: 9.0 218/252


Arduino Manager Fabrizio Boco

void doSync (char *variable) {

if (strcmp(variable,"S1")==0) {

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

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

if (strcmp(variable,"S1")==0) {

Led13 = atoi(value);

digitalWrite(6,Led13);
}

void processOutgoingMessages() {

iosController.writeMessage("Led13",Led13);
iosController.writeMessage("T",temperature);
iosController.writeMessage("L",light);
iosController.writeMessage("Pot",pot);
}

void deviceConnected () {

digitalWrite(CONNECTIONPIN,HIGH);
}

void deviceDisconnected () {

digitalWrite(CONNECTIONPIN,LOW);
}

#ifdef ALARMS_SUPPORT
/**
*
*
* This function is called when a Alarm is fired
*
*/
void processAlarms(char *alarm) {

iosController.log("Alarm fired: ");

Version: 9.0 219/252


Arduino Manager Fabrizio Boco

iosController.logLn(alarm);

}
#endif

Version: 9.0 220/252


Arduino Manager Fabrizio Boco

25 Development Manual
IOSControllerWiFiCC3000

25.1 IOSControllerWiFiCC3000 Library

The IOSControllerWiFiCC3000 library allows to the iOS Arduino Manager app


to receive information from your own sketches and to control them when
Arduino is connected through the Adafruit WiFi Breakout.

Limitations:

Variable length: 14 characters

Value length: 14 characters

25.2 How to reduce Library memory occupation

IOSControllerWiFiCC3000 library memory occupation may be controlled


through following define in IOCControllerWiFiCC3000.h:

Define Description
ALARMS_SUPPORT If it is not defined, the support
for Alarms is removed and the
Alarm Widget cannot be used.

25.3 Available Functions

25.3.1 IOSControllerWiFiCC3000

Initialize an instance of class IOSControllerWiFiCC3000 that doesnt process


alarms.

Version: 9.0 221/252


Arduino Manager Fabrizio Boco

Parameter Description
Adafruit_CC3000_Server *server Instance of Adafruit_CC3000_Server
class.
void (*doWork)(void) Callback function which replace
the standard loop() in the sketch.
void (*doSync)(char *variable) Callback function called when the
iOS device needs to synchronize
switches and knobs positions with
the board.
void (*processIncomingMessages)(char Callback function called when the
*variable, char *value) board receives a message. This
means that variable has a value.
Variable has value SD if the iOS
device needs the list of files in
the SD Card.
Variable has value SDDL if the iOS
device needs to download the file
which name is defined by value.
void (*processOutgoingMessages)(void) Callback function called when the
board is ready to send messages to
the iOS Device.
void (*deviceConnected)(void) Callback function called when the
iOS device connects to the board.
May be NULL.
void (*deviceDisconnected)(void) Callback function called when the
iOS device is disconnects from the
device. May be NULL.

25.3.2 IOSControllerWiFiCC3000

Initialize an instance of class IOSControllerWiFiCC3000 that process alarms

Parameter Description
Adafruit_CC3000 *cc3000 Pointer to instance of
Adafruit_CC3000
Adafruit_CC3000_Server *server Pointer to instance of
Adafruit_CC3000_Server class.
void (*doWork)(void) Callback function which replace
the standard loop() in the

Version: 9.0 222/252


Arduino Manager Fabrizio Boco

sketch.
void (*doSync)(char *variable) Callback function called when the
iOS device needs to synchronize
switches and knobs positions with
the board.
void (*processIncomingMessages)(char Callback function called when the
*variable, char *value) board receives a message. This
means that variable has a value.
Variable has value SD if the iOS
device needs the list of files in
the SD Card.
Variable has value SDDL if the
iOS device needs to download the
file which name is defined by
value.
void (*processOutgoingMessages)(void) Callback function called when the
board is ready to send messages
to the iOS device.
void (*processAlarms)(char *alarm), Callback function called when an
alarm has been fired. May be
NULL.
void (*deviceConnected)(void) Callback function called when the
iOS device connects to the board.
May be NULL.
void (*deviceDisconnected)(void) Callback function called when the
iOS device is disconnects from
the device. May be NULL.

25.3.3 loop

See paragraph 16.3.3.

25.3.4 writeMessage

See paragraph 16.3.4.

Version: 9.0 223/252


Arduino Manager Fabrizio Boco

25.3.5 writeTripleMessage

See chapter 16.3.5.

25.3.6 writeTxtMessage

See paragraph 16.3.6.

25.3.7 temporaryDigitalWrite

See paragraph 16.3.7.

25.3.8 Log

See paragraph 16.3.11

25.3.9 logLn

See paragraph 16.3.12

25.3.10 now

This function returns the current time as Unix epoch.

25.4 Sketch skeleton for IOSControllerWiFiCC3000 support

The typical sketch layout has to be revisited for IOSControllerWiFiCC3000


integration. Basically, what you had written in the loop() function have to be
moved to the function doWork and you have to implement four functions:

processIncomingMessages: when this callback function is called, a


message from the iOS device is received and your sketch has to react to
it.

Version: 9.0 224/252


Arduino Manager Fabrizio Boco

processOutgoingMessages: when this callback function is called, your


sketch may send information to the iOS device.

doSync: when this callback function is called, the iOS device is just
connected and it needs to initialize the position of switches and knobs.

processAlarms: when this callback function is called, an alarm has fired


and it can be processed as needed.
#include <Adafruit_CC3000.h>
#include <SPI.h>
#include "utility/debug.h"
#include "utility/socket.h"

#include <Servo.h>
#include <IOSControllerWiFiCC3000.h>

#define ADAFRUIT_CC3000_IRQ 3
#define ADAFRUIT_CC3000_VBAT 5
#define ADAFRUIT_CC3000_CS 10

Adafruit_CC3000 cc3000 = Adafruit_CC3000(ADAFRUIT_CC3000_CS, ADAFRUIT_CC3000_IRQ,


ADAFRUIT_CC3000_VBAT,SPI_CLOCK_DIVIDER);

#define WLAN_SECURITY WLAN_SEC_WPA2

/*
*
* WiFI Library configuration
*
*/
char ssid[] = "YOUR_SSID"; // your network SSID (name)
char pass[] = "YOUR_PASSWORD"; // your network password

Adafruit_CC3000_Server server(80); // Messages received on port 80

/**
*
* Other initializations
*
*/
#define YELLOWLEDPIN 8
int yellowLed = HIGH;

/*
*
* Prototypes of IOSControllers callbacks
*
*
*/
void doWork();

Version: 9.0 225/252


Arduino Manager Fabrizio Boco

void doSync(char *variable);


void processIncomingMessages(char *variable, char *value);
void processOutgoingMessages();
void processAlarms(char *variable);
void deviceConnected();
void deviceDisconnected();

/*
*
* IOSController Library initialization
*
*/
IOSControllerWiFiCC3000
iosController(&cc3000,&server,&doWork,&doSync,&processIncomingMessages,&processOut
goingMessages,&processAlarms,&deviceConnected,&deviceDisconnected);

void setup() {

Serial.begin(9600);

/* Initialise the module */


Serial.println(F("\nSetting up"));
if (!cc3000.begin()) {

Serial.println(F("Check wiring"));
while(1);
}

/* Delete any old connection data on the module */


// Serial.println(F("\nDeleting old connection profiles"));
// if (!cc3000.deleteProfiles()) {
// Serial.println(F("Failed!"));
// while(1);
// }

/* Setting a static IP Address */

if (!cc3000.setStaticIPAddress(cc3000.IP2U32(192, 168, 1, 10),


cc3000.IP2U32(255, 255, 255, 0),
cc3000.IP2U32(192, 168, 1, 1),
cc3000.IP2U32(8, 8, 8, 8))) {

Serial.println(F("Failed to set static IP"));


while(true);
}

/* End setting static IP Address*/

Serial.print(F("Connecting to ")); Serial.print(ssid); Serial.print(F("..."));

if (!cc3000.connectToAP(ssid, pass, WLAN_SECURITY)) {


Serial.println(F("Failed!"));
while(1);
}

Serial.println(F("Connected!"));

Version: 9.0 226/252


Arduino Manager Fabrizio Boco

while (!cc3000.checkDHCP()) {

delay(100);
}

/* Display the IP address DNS, Gateway, etc. */


while (!displayConnectionDetails()) {
delay(1000);
}

// Start listening for connections


server.begin();

/**
*
* Other initializations
*
*/

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

Serial.println(F("Setup Completed"));
}

/**
*
* Standard loop function
*
*/
void loop()
{
iosController.loop(0);
}

/**
*
*
* This function is called periodically and its equivalent to the standard loop()
function
*
*/
void doWork() {

// Here the actual work is performed

temperature = analogRead();

digitalWrite(YELLOWLEDPIN,yellowLed);

Version: 9.0 227/252


Arduino Manager Fabrizio Boco

/**
*
*
* This function is called when the iOS device connects and needs to initialize the
position of switches and knobs
*
*/
void doSync (char *variable) {

if (strcmp(variable,"S1")==0) {

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

/**
*
*
* This function is called when a new message is received from the iOS device
*
*/
void processIncomingMessages(char *variable, char *value) {

if (strcmp(variable,"S1")==0) {

yellowLed = atoi(value);
}

/**
*
*
* This function is called periodically and messages can be sent to the iOS device
*
*/
void processOutgoingMessages() {

iosController.writeMessage("T",temperature);

/**
*
*
* This function is called when a Alarm is fired

Version: 9.0 228/252


Arduino Manager Fabrizio Boco

*
*/
void processAlarms(char *alarm) {

/**
*
*
* This function is called when the iOS device connects
*
*/
void deviceConnected () {

/**
*
*
* This function is called when the iOS device disconnects
*
*/
void deviceDisconnected () {

Version: 9.0 229/252


Arduino Manager Fabrizio Boco

26 Development Manual
IOSControllerForYun

26.1 IOSControllerForYun Library

The IOSController library allows to the iOS Arduino Manager app to receive
information from your own sketches and to control them.

Limitations:

Variable length: 14 characters

Value length: 14 characters

26.2 How to reduce Library memory occupation

IOSControllerForYun library memory occupation may be controlled through


following defines in IOCControllerYun.h:

Define Description
SD_SUPPORT If it is not defined, the support
for reading SD Card content is
removed and the SD Widget cannot
be used.
ALARMS_SUPPORT If it is not defined, the support
for Alarms is removed and the
Alarm Widget cannot be used.

Version: 9.0 230/252


Arduino Manager Fabrizio Boco

26.3 Available Functions

26.3.1 IOSControllerForYun

Initialize an instance of class IOSControllerForYun that doesnt process alarms.

Parameter Description
YunServer *server Instance of YunServer class.
void (*doWork)(void) Callback function which replace
the standard loop() in the sketch.
void (*doSync)(char *variable) Callback function called when the
iOS device needs to synchronize
switches and knobs positions with
the board.
void (*processIncomingMessages)(char Callback function called when the
*variable, char *value) board receives a message. This
means that variable has a value.
Variable has value SD if the iOS
device needs the list of files in
the SD Card.
Variable has value SDDL if the iOS
device needs to download the file
which name is defined by value.
void (*processOutgoingMessages)(void) Callback function called when the
board is ready to send messages to
the iOS device.
void (*deviceConnected)(void) Callback function called when the
iOS device connects to the board.
May be NULL.
void (*deviceDisconnected)(void) Callback function called when the
iOS device is disconnects from the
device. May be NULL.

26.3.2 IOSControllerForYun

Initialize an instance of class IOSController that process alarms.

Version: 9.0 231/252


Arduino Manager Fabrizio Boco

Parameter Description
YunServer *server Instance of YunServer class.
void (*doWork)(void) Callback function which replace
the standard loop() in the sketch.
void (*doSync)(char *variable) Callback function called when the
iOS device needs to synchronize
switches and knobs positions with
the board.
void (*processIncomingMessages)(char Callback function called when the
*variable, char *value) board receives a message. This
means that variable has a value.
Variable has value SD if the iOS
device needs the list of files in
the SD Card.
Variable has value SDDL if the iOS
device needs to download the file
which name is defined by value.
void (*processOutgoingMessages)(void) Callback function called when the
board is ready to send messages to
the iOS device.
void (*processAlarms)(char *alarm), Callback function called when an
alarm has been fired. May be NULL.
void (*deviceConnected)(void) Callback function called when the
iOS device connects to the board.
May be NULL.
void (*deviceDisconnected)(void) Callback function called when the
iOS device is disconnects from the
device. May be NULL.

26.3.3 loop

This function has to be called into the standard sketch loop.

Parameter Description
unsigned long delay Delay in processing incoming and
out coming messages.
Delay is in milliseconds.
Lower the delay, faster the

Version: 9.0 232/252


Arduino Manager Fabrizio Boco

messages are processed.

For compatibility reasons loop function, without parameters, is still available


with a default delay of 500 milliseconds.

26.3.4 writeMessage

This function sends a message to the connected iOS device.

Lets suppose that the iOS device has a Display Widget called T. Periodically
the callback function processOutgoingMessages is called and inside this
function the iOS Widget is updated calling:
writeMessage(T,123);

Parameter Description
char *variable Name of the variable
float value Value of the variable

Version: 9.0 233/252


Arduino Manager Fabrizio Boco

26.3.5 writeTripleMessage

This function sends a message to the connected iOS device.

Lets suppose that the iOS device has a Accelerometer Widget called Acc.
Periodically the callback function processOutgoingMessages is called and
inside this function the iOS Widget is updated calling:
writeTripleMessage(Acc,accX,accY,accZ);

Parameter Description
char *variable Name of the variable
float value1 First value of the variable
float value2 Second value of the variable
float value3 Third value of the variable

26.3.6 writeTxtMessage

This function sends a message to the connected iOS device.


writeTxtMessage(T,Hello);

Parameter Description
char *variable Name of the variable
char *value Value of the variable

26.3.7 temporaryDigitalWrite

This function write the value to the pin for some time then set the previous
values.
temporaryDigitalWrite(pin13,HIGH,50);

If pin13 is LOW, this brings pin13 to HIGH for 50ms and then pin13 goes back
to LOW. If pin13 is LOW, it is unchanged.

Parameter Description
uint8_t pin The pin number
uint8_t value HIGH or LOW

Version: 9.0 234/252


Arduino Manager Fabrizio Boco

unsigned long ms Duration of pins value change

26.3.8 log

This function allows writing a text message or an integer on the Console Widget.

Parameter Description
char *msg character message to write on the
Console Widget

Parameter Description
int *msg Integer value to write on the
Console Widget

26.3.9 logLn

This function allows writing a text message or an integer on the Console Widget
followed by a new line (\n).

Parameter Description
char *msg character message to write on the
Console Widget

Parameter Description
int *msg integer value to write on the
Console Widget

Parameter Description
long *msg long value to write on the Console
Widget

Version: 9.0 235/252


Arduino Manager Fabrizio Boco

Parameter Description
unsigned long *msg Unsigned long value to write on
the Console Widget

26.3.10 now

This function returns the current time as Unix epoch.

26.4 Sketch skeleton for IOSControllerForYun support

Please, refer to paragraph 16.4.

Version: 9.0 236/252


Arduino Manager Fabrizio Boco

27 Development Manual
IOSControllerForGalileo

27.1 IOSControllerForGalileo Library

The IOSController library allows to the iOS Arduino Manager app to receive
information from your own sketches and to control them.

Limitations:

Variable length: 14 characters

Value length: 14 characters

Please, see paragraph 15.5, for properly set board clock and use the Alarm
Widget.

27.2 How to reduce Library memory occupation

IOSControllerForGalileo library memory occupation may be controlled through


following defines in IOSControllerForGalileo.h:

Define Description
SD_SUPPORT If it is not defined, the support
for reading SD Card content is
removed and the SD Widget cannot
be used.
ALARMS_SUPPORT If it is not defined, the support
for Alarms is removed and the
Alarm Widget cannot be used.
SDLOGGEDATAGRAPH_SUPPORT If it is not defined, the support
for reading accessing logged data
is removed and the Logged Data
Graph Widget cannot be used.

Version: 9.0 237/252


Arduino Manager Fabrizio Boco

27.3 Available Functions

27.3.1 IOSControllerForGalileo

Initialize an instance of class IOSControllerForGalileo that doesnt process


alarms.

Parameter Description
EthernetServer *server Instance of EthernetServer class.
void (*doWork)(void) Callback function which replace
the standard loop() in the sketch.
void (*doSync)(char *variable) Callback function called when the
iOS device needs to synchronize
switches and knobs positions with
the board.
void (*processIncomingMessages)(char Callback function called when the
*variable, char *value) board receives a message. This
means that variable has a value.
Variable has value SD if the iOS
device needs the list of files in
the SD Card.
Variable has value SDDL if the iOS
device needs to download the file
which name is defined by value.
void (*processOutgoingMessages)(void) Callback function called when the
board is ready to send messages to
the iOS device.
void (*deviceConnected)(void) Callback function called when the
iOS device connects to the board.
May be NULL.
void (*deviceDisconnected)(void) Callback function called when the
iOS device is disconnects from the
device. May be NULL.

Version: 9.0 238/252


Arduino Manager Fabrizio Boco

27.3.2 IOSControllerForGalileo

Initialize an instance of class IOSControllerForGalileo that process alarms.

Parameter Description
EthernetServer *server Instance of EthernetServer class.
void (*doWork)(void) Callback function which replace
the standard loop() in the sketch.
void (*doSync)(char *variable) Callback function called when the
iOS device needs to synchronize
switches and knobs positions with
the board.
void (*processIncomingMessages)(char Callback function called when the
*variable, char *value) board receives a message. This
means that variable has a value.
Variable has value SD if the iOS
device needs the list of files in
the SD Card.
Variable has value SDDL if the iOS
device needs to download the file
which name is defined by value.
void (*processOutgoingMessages)(void) Callback function called when the
board is ready to send messages to
the iOS device.
void (*processAlarms)(char *alarm), Callback function called when an
alarm has been fired. May be NULL.
void (*deviceConnected)(void) Callback function called when the
iOS device connects to the board.
May be NULL.
void (*deviceDisconnected)(void) Callback function called when the
iOS device is disconnects from the
device. May be NULL.

27.3.3 loop

This function has to be called into the standard sketch loop.

Parameter Description
unsigned long delay Delay in processing incoming and

Version: 9.0 239/252


Arduino Manager Fabrizio Boco

out coming messages.


Delay is in milliseconds.
Lower the delay, faster the
messages are processed.

For compatibility reasons loop function, without parameters, is still available


with a default delay of 500 milliseconds.

27.3.4 writeMessage

This function sends a message to the connected iOS device.

Lets suppose that the iOS device has a Display Widget called T. Periodically
the callback function processOutgoingMessages is called and inside this
function the iOS Widget is updated calling:
writeMessage(T,123);

Parameter Description
char *variable Name of the variable
float value Value of the variable

27.3.5 writeTripleMessage

This function sends a message to the connected iOS device.

Lets suppose that the iOS device has a Accelerometer Widget called Acc.
Periodically the callback function processOutgoingMessages is called and
inside this function the iOS Widget is updated calling:
writeTripleMessage(Acc,accX,accY,accZ);

Parameter Description
char *variable Name of the variable
float value1 First value of the variable
float value2 Second value of the variable

Version: 9.0 240/252


Arduino Manager Fabrizio Boco

float value3 Third value of the variable

27.3.6 writeTxtMessage

This function sends a message to the connected iOS device.


writeTxtMessage(T,Hello);

Parameter Description
char *variable Name of the variable
char *value Value of the variable

27.3.7 temporaryDigitalWrite

This function write the value to the pin for some time then set the previous
values.
temporaryDigitalWrite(pin13,HIGH,50);

If pin13 is LOW, this brings pin13 to HIGH for 50ms and then pin13 goes back
to LOW. If pin13 is LOW, it is unchanged.

Parameter Description
uint8_t pin The pin number
uint8_t value HIGH or LOW
unsigned long ms Duration of pins value change

27.3.8 log

This function allows writing a text message or an integer on the Console Widget.

Parameter Description

Version: 9.0 241/252


Arduino Manager Fabrizio Boco

char *msg character message to write on the


Console Widget

Parameter Description
int *msg Integer value to write on the
Console Widget

27.3.9 logLn

This function allows writing a text message or an integer on the Console Widget
followed by a new line (\n).

Parameter Description
char *msg character message to write on the
Console Widget

Parameter Description
int *msg integer value to write on the
Console Widget

Parameter Description
long *msg long value to write on the Console
Widget

Parameter Description
unsigned long *msg Unsigned long value to write on
the Console Widget

27.3.10 sdLogLabels

This function writes the labels to the log file.

Version: 9.0 242/252


Arduino Manager Fabrizio Boco

Parameter Description
char *variable Name of the Logged Data Widget for
which file is written
char *label1 First label

Parameter Description
char *variable Name of the Logged Data Widget for
which file is written
char *label1 First label
char *label2 Second label

Parameter Description
char *variable Name of the Logged Data Widget for
which file is written
char *label1 First label
char *label2 Second label
char *label3 Third label

Parameter Description
char *variable Name of the Logged Data Widget for
which file is written
char *label1 First label
char *label2 Second label
char *label3 Third label
char *label4 Forth label

Version: 9.0 243/252


Arduino Manager Fabrizio Boco

Parameter Description
char *variable Name of the Logged Data Widget for
which file is written
char *label1 First label
char *label2 Second label
char *label3 Third label
char *label4 Forth label
char *label5 Fifth label

27.3.11 sdLog

This function writes the values to the log file.

Parameter Description
char *variable Name of the Logged Data Widget
for which file is written
unsigned long time current time as Unix epoch
float value1 First value

Parameter Description
char *variable Name of the Logged Data Widget
for which file is written
unsigned long time current time as Unix epoch
float value1 First value
float value2 Second value

Parameter Description
char *variable Name of the Logged Data Widget
for which file is written
unsigned long time current time as Unix epoch
float value1 First value
float value2 Second value
float value3 Third value

Parameter Description

Version: 9.0 244/252


Arduino Manager Fabrizio Boco

Parameter Description
char *variable Name of the Logged Data Widget
for which file is written
unsigned long time current time as Unix epoch
float value1 First value
float value2 Second value
float value3 Third value
float value4 Forth value

Parameter Description
char *variable Name of the Logged Data Widget
for which file is written
unsigned long time current time as Unix epoch
float value1 First value
float value2 Second value
float value3 Third value
float value4 Forth value
float value5 Fifth value

27.3.12 sdPurgeLogData

This function deletes the content of the log file.

Parameter Description
char *variable Name of the Logged Data Widget
for which file is written

27.3.13 now

This function returns the current time as Unix epoch.

27.4 Sketch skeleton for IOSController support

Please, refer to chapter 16.4.

Version: 9.0 245/252


Arduino Manager Fabrizio Boco

28 Code Generators

28.1 Code Generator

Code Generator allows the user to generate the communication infrastructure


between the Arduino board and iOS device and generate the code for each
chosen widget in order to simplify the programming effort on Arduino board.

Code Generator is available as In App purchase.

To start the Code Generator, tap on . If you have not purchased the Code
Generator yet, you will be asked to buy it.

To access the documentation, tap on , if you have not purchased the Code
Generator yet, you will be asked to buy it. Otherwise you will be instructed how
to access the documentation.

28.2 PIN Code Generator

The PIN Code Generator allows the user to associate a pin to each Widget and
generate the code to manage that pin. In most cases this avoid writing any
code and requires to the user connecting only the proper hardware to the pin.

Access to the PIN Code Generator is directly from the Code Generator.

28.3 Restore Purchases

To restore your Code Generator and PIN Code Generator purchases on a new

device, tap on .

Version: 9.0 246/252


Arduino Manager Fabrizio Boco

29 Frequent Asked
Questions

In this section you can find the solution to the most frequent problems. Anyway,
you can always write to fabboco@gmail.com for further support.

Question Answer
I get compilation errors uploading the Test Likely, you have not properly installed the one of these
sketch. libraries: IOSController, IOSControllerWiFi,
IOSControllerBLE, IOSControllerForYun,
IOSControllerForGalileo.
Please, see paragraph 3.2 or 5.2 or Error! Reference
source not found.
I get the following compilation error: Likely, you have not properly installed the one of these
libraries: IOSController, IOSControllerWiFi,
iosController was not declared in IOSControllerBLE, IOSControllerForYun,
this scope
IOSControllerForGalileos.
or
Please, see paragraph 3.2 or 5.2 or Error! Reference
iosControllerWiFi was not source not found.
declared in this scope

or

iosControllerBLE was not declared


in this scope

I get the following error uploading the Test Different boards have different program memory available.
sketch: See one of these paragraphs 16.2, 18.2, 24.3 to understand
how to reduce the memory required from the iOSController
processing.app.debug.RunnerException:
library you are using.
Sketch too big;

I get the following error uploading the Test Likely, you have selected a wrong board.

Version: 9.0 247/252


Arduino Manager Fabrizio Boco

Question Answer
sketch: In the Arduino IDE go to Tools->Board and select the right
board
avrdude: stk500_recv():
programmer is not responding
I cant connect to the Arduino Board 1) Check that you have properly configured IP address and
IP port of the Arduino board
2) If you are using the WiFi Shield, you may need to update
the Shield firmware. (See here for more details:
http://arduino.cc/en/Hacking/WiFiShieldFirmwareUpgrading)
I cant delete Widgets Please, follow this procedure:
1) Turn on the Edit switch
2) Select the Widget to delete long tapping on it
3) Release your finger
4) Swipe down the selected Widget
Please, note that Alarm Widgets can be deleted only when
Arduino Manager is connected to the board.
You cant access your device at: Configure the device Wi-Fi connection to use static IP
http://x.y.z.t:1235 instead of DHCP.
to download the generated code.
TestArduinoManagerRFduino doesnt work. I Using IDE 1.5.7 requires a change in compiler flags.
cannot read temperature on iOS device Please, see Arduino Manager and RFduino for the
impatient

Version: 9.0 248/252


Arduino Manager Fabrizio Boco

30 Revision History

Date Document Changes


Version
04/02/2016 9.0 Libraries with encryption
Section for Adafruit WINC1500
Added some missed Credits
RedbearLab library installation
01/02/2016 8.2 Compatibility Matrix
Support for Bluefruit LE SPI Friend Uno and Zero
Arduino Manager and ESP8266 for the impatient updated for Zero
12/11/2015 8.1 Secured Push Button Widget
Bubble Level Widget
GPS Widget
- 8.0 Introduced Arduino Manager for Apple Watch.
No changes to the document
10/24/2015 7.1 Minor changes on some Widgets how to use
Saving Widget lists to iCloud
09/01/2015 7.0 Voice Commands
Voice Commands Widget
05/12/2015 6.2 Web Widget
Graph Widget with more variables.
Support for Teensy 3.1
Support for ESP8266
Minor fixes
6.1 Never published
03/02/2015 6.0 Updates for new interface.
Thermostat Widget.
Added chapter on Networking.
12/18/2014 5.0 Version of this document aligned to the software version, jumping from
3.1 to 5.0.
Switch and Rotary Switch Widget How to use them paragraph added.
Push Button How to use it paragraph added.
Alarm Widget paragraph update with new picture and user settings
11/05/2014 3.1 Accelerometer Widget
Gyroscope Widget

Version: 9.0 249/252


Arduino Manager Fabrizio Boco

Date Document Changes


Version
writeTripleMessage function
10/20/2014 3.0 Bar Widget, Color Picker Widget
08/16/2014 2.9 IOSControllerWiFiCC3000
07/28/2014 2.8.1 Compilations flags for IDE 1.5.7 and RFduino
06/24/2014 2.8 IOSControllerForBluefruit
Libraries Installer screenshots updated
06/08/2014 2.7 PIN Code Generator
05/18/2014 2.6.1 Corrections for Joystick Widget
05/05/2014 2.6 Joystick Widget
04/05/2014 2.5 Unit of measure for Gauge Widget
Ranging information for iBeacon Widget
03/02/2014 2.4.1 IOSControllerForYun and IOSControllerForGalileo added
Changed the link to the download site
02/10/2014 2.4 Added Gauge Widget
Added USTREAM Widget
Some changes to the paragraph 0
Added paragraph 1.15
Added paragraph 1.20
Added some details added to paragraph 1.6
Added some details added to paragraph 0
Added function sdPurgeLogData
02/01/2014 2.3.1 Changes for the installation procedures
01/06/2014 2.3 iBeacon Widget
12/12/2013 2.2 LED Widget and Switch & LED blinking
Slider Widget
Updated instructions for downloading and installing RedBearLab BLE
library
16/11/2013 2.1 How to use Display Widget
How to use LED Widget
Secured Switch Widget
Widget List Management
FAQ updated
Credits Updated
BLE library downloadable from my site
09/21/2013 2.0.1 FAQ updated
08/21/2013 2.0 Bluetooth Shield support
How to enable or disable the Display Widget from Arduino

Version: 9.0 250/252


Arduino Manager Fabrizio Boco

Date Document Changes


Version
How to change the LEDs color in the LED Widget
How to change the LEDs color in the Switch & LED Widget
Rover Control Widget: RC_Throttle changed into RC_T
FAQ chapter added
07/29/2013 1.9.1 Switch & LED Widget
06/16/2013 1.9 Logged Data Graph documentation
Console Widget documentation
Log Functions
03/02/2013 1.8 Sound Alarm Widget documentation
Threshold Widget documentation
01/30/2013 1.7 Rover Control Widget documentation
Graph Widget using details
Sharing configuration details
01/09/2013 1.6.1 Added information on max length for variable and value
12/01/2012 1.6 Command Widget description.
Directory structure after installing IOSController library and
IOSControllerWiFi library (useful to check that libraries are correctly
installed)
11/07/2012 1.5.1 Limitations deleting Alarm Widget
09/08/2012 1.5 Alarm Widget.
IOSControllerWiFi
Support for Arduino Leonardo

Version: 9.0 251/252


Arduino Manager Fabrizio Boco

31 Comments and Support

You may send your comments and support requests to fabboco@gmail.com.

Version: 9.0 252/252

Você também pode gostar