masaaki makabe / Mbed 2 deprecated KS7

Dependencies:   BLE_API nRF51822 mbed

Fork of KS7 by masaaki makabe

Branch:
KS3
Revision:
25:da723b86c60b
Parent:
24:c6ef55535900
Child:
27:8c3c29b3f704
--- a/main.cpp	Mon Mar 28 02:15:04 2016 +0000
+++ b/main.cpp	Tue Mar 29 02:46:41 2016 +0000
@@ -41,7 +41,9 @@
 #define BRIGHTNESS_MAXVALUE (1.0)
 
 // Properties
-io io;
+//io io;
+//io io(P0_15, P0_13); // HX711's CLK & DAT
+io io(P0_5, P0_4); // HX711's CLK & DAT
 uint32_t weight_data;
 float32_t weight = 0.0;
 uint32_t scale = 0;
@@ -226,6 +228,18 @@
     int sample = 0;
 #ifdef UART_DEBUG
     pc.baud(UART_BAUD_RATE);
+/*
+    pc.printf("SPI->PSELSCK  = %x\r\n", NRF_SPI0->PSELSCK);  // will be 15 (P0_15)
+    pc.printf("SPI->PSELMISO = %x\r\n", NRF_SPI0->PSELMISO); // will be 13 (P0_13)
+    pc.printf("SPI->PSELMOSI = %x\r\n", NRF_SPI0->PSELMOSI); // will be 14 (P0_14): dummy
+    pc.printf("SPI->PSELSCK  = %x\r\n", NRF_SPI1->PSELSCK);  // will be 15 (P0_15)
+    pc.printf("SPI->PSELMISO = %x\r\n", NRF_SPI1->PSELMISO); // will be 13 (P0_13)
+    pc.printf("SPI->PSELMOSI = %x\r\n", NRF_SPI1->PSELMOSI); // will be 14 (P0_14): dummy
+    io.analog_pow(1);
+    while(1){
+        pc.printf("%x\r\n", io._get_adc_raw(0));
+    }
+*/
 #endif
 #ifdef PCB_VER3
     // set XTAL=32MHz for TaiyoYuden's module