Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: BLE_API TextLCD mbed nRF51822 nRF51_LowPwr nRF51_Vdd
Revision 5:315161fd3d19, committed 2016-06-12
- Comitter:
- kenjiArai
- Date:
- Sun Jun 12 12:39:00 2016 +0000
- Parent:
- 4:ed7848c6d374
- Commit message:
- Use nRF51_LowPwr library
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
| nRF51_LowPwr.lib | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Wed Jun 01 12:36:23 2016 +0000
+++ b/main.cpp Sun Jun 12 12:39:00 2016 +0000
@@ -5,7 +5,7 @@
* http://mbed.org/users/kenjiArai/
*
* Started: April 8th, 2016
- * Revised: June 1st, 2016
+ * Revised: June 12th, 2016
*
* Original program:
* BLE_Nano_CentralTest
@@ -33,9 +33,9 @@
// Definition ------------------------------------------------------------------------------------
// Before using this function, please specify your program are used following functions or not.
#define USE_DEVICE_STDIO_MESSAGES 0 // printf
-#define USE_DEVICE_SERIAL 0 // Serial or DEBUG & etc.
+#define USE_DEVICE_SERIAL 1 // Serial or DEBUG & etc.
#define USE_DEVICE_I2C 1 // Sensors with I2C, LCD, EEPROM, Driver chips & etc.
-#define USE_DEVICE_SPI 0 // Sensors with SOI, LCD, EEPROM, Driver chips & etc.
+#define USE_DEVICE_SPI 0 // Sensors with SPI, LCD, EEPROM, Driver chips & etc.
#define USE_DEVICE_SPISLAVE 0 // Communication with master vis SPI
#define USE_DEVICE_PWMOUT 0 // PWM duty output, Serve & etc.
#define USE_DEVICE_ANALOGIN 0 // Analog adc
@@ -178,13 +178,13 @@
uint8_t *p;
nrf_delay_us(100);
+ LowPwr set_lowpwr(&lowpwr_table);
ticker.attach(periodicCallback, 5); /* Blink LED every second */
ATTACH(&serialRxCallback, Serial::RxIrq);
for (int k = 0; k < 20; k++) { PRINTF("\r\n");}
PRINTF("Check paired Peripheral board\r\n"); // opening message
- LowPwr set_lowpwr(&lowpwr_table);
+ wait(1.0);
// lcd
- lcd.setCursor(TextLCD::CurOff_BlkOff);
lcd.locate(0, 0); // 1st line top
// 12345678
lcd.printf("TY51822r");
@@ -192,6 +192,7 @@
// 12345678
lcd.puts(" JH1PJL ");
contrast = auto_contrast(vdd.read_real_value());
+ lcd.setCursor(TextLCD::CurOff_BlkOff);
lcd.setContrast(contrast);
// BLE
ble.init();
--- a/nRF51_LowPwr.lib Wed Jun 01 12:36:23 2016 +0000 +++ b/nRF51_LowPwr.lib Sun Jun 12 12:39:00 2016 +0000 @@ -1,1 +1,1 @@ -https://developer.mbed.org/users/kenjiArai/code/nRF51_LowPwr/#9ddf14df689c +https://developer.mbed.org/users/kenjiArai/code/nRF51_LowPwr/#ffd5168de563