Skip to content

Commit ec17ec0

Browse files
authored
Merge pull request #339 from dastels/master
Add WobblyBot code
2 parents 0e34313 + 428595d commit ec17ec0

File tree

4 files changed

+745
-0
lines changed

4 files changed

+745
-0
lines changed
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
// COMMON SETTINGS
2+
// ----------------------------------------------------------------------------------------------
3+
// These settings are used in both SW UART, HW UART and SPI mode
4+
// ----------------------------------------------------------------------------------------------
5+
#define BUFSIZE 128 // Size of the read buffer for incoming data
6+
#define VERBOSE_MODE true // If set to 'true' enables debug output
7+
#define BLE_READPACKET_TIMEOUT 500 // Timeout in ms waiting to read a response
8+
9+
10+
// SOFTWARE UART SETTINGS
11+
// ----------------------------------------------------------------------------------------------
12+
// The following macros declare the pins that will be used for 'SW' serial.
13+
// You should use this option if you are connecting the UART Friend to an UNO
14+
// ----------------------------------------------------------------------------------------------
15+
#define BLUEFRUIT_SWUART_RXD_PIN 9 // Required for software serial!
16+
#define BLUEFRUIT_SWUART_TXD_PIN 10 // Required for software serial!
17+
#define BLUEFRUIT_UART_CTS_PIN 11 // Required for software serial!
18+
#define BLUEFRUIT_UART_RTS_PIN -1 // Optional, set to -1 if unused
19+
20+
21+
// HARDWARE UART SETTINGS
22+
// ----------------------------------------------------------------------------------------------
23+
// The following macros declare the HW serial port you are using. Uncomment
24+
// this line if you are connecting the BLE to Leonardo/Micro or Flora
25+
// ----------------------------------------------------------------------------------------------
26+
#ifdef Serial1 // this makes it not complain on compilation if there's no Serial1
27+
#define BLUEFRUIT_HWSERIAL_NAME Serial1
28+
#endif
29+
30+
31+
// SHARED UART SETTINGS
32+
// ----------------------------------------------------------------------------------------------
33+
// The following sets the optional Mode pin, its recommended but not required
34+
// ----------------------------------------------------------------------------------------------
35+
#define BLUEFRUIT_UART_MODE_PIN 12 // Set to -1 if unused
36+
37+
38+
// SHARED SPI SETTINGS
39+
// ----------------------------------------------------------------------------------------------
40+
// The following macros declare the pins to use for HW and SW SPI communication.
41+
// SCK, MISO and MOSI should be connected to the HW SPI pins on the Uno when
42+
// using HW SPI. This should be used with nRF51822 based Bluefruit LE modules
43+
// that use SPI (Bluefruit LE SPI Friend).
44+
// ----------------------------------------------------------------------------------------------
45+
#define BLUEFRUIT_SPI_CS 8
46+
#define BLUEFRUIT_SPI_IRQ 7
47+
#define BLUEFRUIT_SPI_RST 4 // Optional but recommended, set to -1 if unused
48+
49+
// SOFTWARE SPI SETTINGS
50+
// ----------------------------------------------------------------------------------------------
51+
// The following macros declare the pins to use for SW SPI communication.
52+
// This should be used with nRF51822 based Bluefruit LE modules that use SPI
53+
// (Bluefruit LE SPI Friend).
54+
// ----------------------------------------------------------------------------------------------
55+
#define BLUEFRUIT_SPI_SCK 13
56+
#define BLUEFRUIT_SPI_MISO 12
57+
#define BLUEFRUIT_SPI_MOSI 11

0 commit comments

Comments
 (0)