Skip to content

Commit

Permalink
Merge branch 'Fix-documentation'
Browse files Browse the repository at this point in the history
  • Loading branch information
Skjerve committed Jul 15, 2014
2 parents 69c9f7c + 9dcef78 commit 86c5e52
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 40 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
#ble_a_Hello_World_Program : Setup

The Hello_World_Program uses BLE to send a string, "Hello World, works", from the Arduino board to the peer Bluetooth low energy device.
The peer can be the nRF UART app running on iOS or Android or PC (See the Master Emulator -> Examples -> nRFUART, this is installed as part of the Master control panel Windows tool)
The Hello_World_Program uses Bluetooth low energy to send the string "Hello World, works" from the Arduino board to the peer. The peer can be the nRF UART app running on iOS, Android, or a PC (see the nRFUART example that is installed as part of the Master Control Panel Windows tool).

The Arduino IDE or equivalent and Arduino board are working. You can use the "Getting Started" pages on http://arduino.cc to get help and to troubleshoot.
Once you have confirmed that the Aduino board and IDE are working:
* Connect the nRF8001 to the Arduino (using either a shield or with direct wiring)
* Open the ble_a_Hello_World_Program sketch (.ino file) in the IDE or equivalent
* Verify that the pin connections are correct for the shield in the sketch.
This will vary depending on the shield that you use.
Before you begin connecting the nRF8001 development kit board, you must make sure the Arduino IDE or equivalent and Arduino board are working. You can use the "Getting Started" pages on http://arduino.cc to get help and troubleshoot.

Once you have confirmed that the Arduino board and IDE are working:

1. Connect the nRF8001 to the Arduino (using either a shield or with direct wiring).
2. Open the ble_a_Hello_World_Program sketch (.ino file) in the IDE or equivalent.
3. Verify that the pin connections are correct for the shield in the sketch.

**Note:** This will vary depending on the shield that you use.

<code>
/*
Expand All @@ -32,31 +34,29 @@ This will vary depending on the shield that you use.
aci_state.aci_pins.interface_is_interrupt = false;
aci_state.aci_pins.interrupt_number = 1;
</code>
* Click Upload in the Arduino IDE or equivalent to upload the sketch to the Arduino board.
Wait until the upload is successful.
* Open the Serial Monitor window using Tools -> Serial Monitor in the Arduino IDE
* Set the line ending option in the Serial Monitor to "New Line"
* Set the baud rate in the Serial Monitor to "115200 baud"

When the ble_a_Hello_World_Program runs successfully you will see:
1. Click Upload in the Arduino IDE or equivalent to upload the sketch to the Arduino board.
Wait until the upload is successful.
2. Open the Serial Monitor window using Tools -> Serial Monitor in the Arduino IDE.
3. Set the line ending option in the Serial Monitor to "New Line".
4. Set the baud rate in the Serial Monitor to "115200 baud".

When the ble_a_Hello_World_Program runs successfully you will see the following message in the Serial Monitor:
"
Arduino setup
Evt Device Started: Setup
Evt Device Started: Standby
Advertising started : Tap Connect on the nRF UART app
"
in the Serial Monitor.


##Troubleshooting:
##Troubleshooting
If you only see "Arduino Setup" on the Serial Monitor, then verify that the pin connections on the shield or the nRF8001 module are correct.
Verify that all steps in the setup (see above) are done correctly.

Note that the leonardo do not reset when you run the serial monitor,
so you will not see the initial setup messages unless you add a delay in the code
so you can open the serial monitor before the code is executed.
**Note:** The Arduino Leonardo board does not reset when you run the serial monitor,
so you will not see the initial setup messages unless you add a delay in the code.

##Sending and Recieving data over BLE
##Sending and Receiving data over BLE
Once the setup steps have been successfully completed.
You can use the nRF UART iOS/Android app or the nRFUART PC Windows application.
The nRFUART PC Windows application is installed when you install the Windows tool called
Expand All @@ -69,18 +69,18 @@ You can now send and receive data using the Serial Monitor "Send" button and the

##Using the Master Control Panel on the PC with the ble_a_Hello_World_Program

* Install the Master control panel, this Windows tool is available only on purchase of the nRF8001 Development kit
* Run the Master control panel
* Select the Master Emulator board from the pull down on the top left
* After the board has been identified by the software, click the "Device Discovery" button
* Click on the Device "Hello" -> then click Select Device.
* You will see a new screen
* Then click the "Service Discovery button"
* Wait for the Service Discovery to complete
* Click -> Enable Services to configure the BLE Service used for Hello World
* Click on the entry that says UART RX
* Then in the Value text box , type a value and then click "send update"
* This value is then sent over BLE , received by the Arduino and printed on the Serial Monitor
1. Install the Master control panel, this Windows tool is available only on purchase of the nRF8001 Development kit.
2. Run the Master control panel.
3. Select the Master Emulator board from the pull down on the top left.
4. After the board has been identified by the software, click the "Device Discovery" button.
5. Click on the Device "Hello" -> then click Select Device.
6. You will see a new screen.
7. Then click the "Service Discovery button".
8. Wait for the Service Discovery to complete.
9. Click -> Enable Services to configure the BLE Service used for Hello World.
10. Click on the entry that says UART RX.
11. Then in the Value text box , type a value and then click "send update".
12. This value is then sent over BLE , received by the Arduino and printed on the Serial Monitor.

## Next steps
The ble_uart_project_template is the next program to be used to understand sending and receiving data over BLE.
Expand Down
13 changes: 6 additions & 7 deletions documentation/libraries/BLE/nRF8001-Porting-ACI-Library.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
####[BLE](https://github.com/NordicSemiconductor/ble-sdk-arduino/tree/master/documentation/libraries/BLE "Go to BLE folder")

#Porting the nRF8001 SDK for Arduino (0.9.0) to your chosen micro controller
#Porting the nRF8001 SDK for Arduino (0.9.0) to your chosen microcontroller

The nRF8001 SDK for Arduino is portable C code that can be easily ported to a different micro controller.
A few parts of the SDK however must be re-implemented on the new micro controller,
The nRF8001 SDK for Arduino is portable C code that can be easily ported to a different microcontroller.
A few parts of the SDK however must be re-implemented on the new microcontroller,
these are the SPI/ACI interface, GPIO interface, delay and optionally the interrupt interface.
All other code in the SDK can be ported to the new micro controller.
All other code in the SDK can be ported to the new microcontroller.

##Getting the nRF8001 SDK for Arduino ready for porting:

Expand Down Expand Up @@ -36,8 +36,7 @@ aci_state.aci_pins.interface_is_interrupt = false;

Remove the interface from the SDK that will not be used in your target mcu

###Removing the interrupt interface: (Assuming this interface is not used in the target micro controller)

###Removing the interrupt interface: (Assuming this interface is not used in the target microcontroller)
Remove the function static void m_aci_isr(void) from the hal_aci_tl.cpp

Remove all instances of noInterrupts(); and interrupts();
Expand Down Expand Up @@ -139,7 +138,7 @@ The function will then continue clocking on the SPI for the larger of the length

##Portable C code

The aci_queue functions in aci_queue.cpp are portable to any micro controller that supports C.
The aci_queue functions in aci_queue.cpp are portable to any microcontroller that supports C.
These functions implement a circular FIFO using indices.

The queue functions implemented are enqueue to add to the tail of the queue,
Expand Down

0 comments on commit 86c5e52

Please sign in to comment.