Basic example that demonstrates functionalities of the BMC 150 SiP.

Dependencies:   adc52832_common mbed

Files at this revision

API Documentation at this revision

Comitter:
jurica238814
Date:
Mon Jul 31 10:29:34 2017 +0000
Commit message:
Init commit. Basic functionalities example.

Changed in this revision

BMC150.lib Show annotated file Show diff for this revision Revisions of this file
adc52832_common.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/BMC150.lib	Mon Jul 31 10:29:34 2017 +0000
@@ -0,0 +1,1 @@
+http://developer.mbed.org/users/Dautor/code/BMC150/#f0d2ab09e3f8
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/adc52832_common.lib	Mon Jul 31 10:29:34 2017 +0000
@@ -0,0 +1,1 @@
+http://developer.mbed.org/teams/aconno-dev-team/code/adc52832_common/#e2b1f1f2226e
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Mon Jul 31 10:29:34 2017 +0000
@@ -0,0 +1,34 @@
+/*
+ *  Something nice =)
+ *  Jurica Resetar @ aconno.de
+ *
+ */
+
+#include "mbed.h"
+#include "bmc150.h"
+#include "acd52832_bsp.h"
+#include "utilities.h"
+
+#define SPI_MISO        (p17)
+#define SPI_MOSI        (p18)
+#define SPI_CLK         (p20)
+#define BMC150_SPI_CS   (p19)
+
+#define VCC_ON_PIN      (p25)
+
+DigitalOut bmcCs(BMC150_SPI_CS);
+DigitalOut vccOn(VCC_ON_PIN);
+DigitalOut readyLED(PIN_LED_RED);
+SPI spi(SPI_MOSI, SPI_MISO, SPI_CLK); // mosi, miso, sclk
+BMC150 bmc(spi, bmcCs);
+
+int main(){
+    uint8_t temperature;
+    readyLED = 0;
+    vccOn = 1; // Turn VCC_ON on for BMC150
+    wait_ms(100);
+    readyLED = 1;
+    
+    temperature = bmc.readTemperature();
+    
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Mon Jul 31 10:29:34 2017 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/abea610beb85
\ No newline at end of file