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: MCP3208_SWSPI SWSPI mbed
Fork of MCP3208_STM32 by
Revision 5:9568cfe486dd, committed 2016-12-02
- Comitter:
- mcx
- Date:
- Fri Dec 02 16:41:16 2016 +0000
- Parent:
- 4:1267e8fa59a3
- Child:
- 6:64bc197574e7
- Commit message:
- Modified to update at 9600 baud every 0.1s
Changed in this revision
| 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 |
--- a/main.cpp Wed Nov 16 23:47:52 2016 +0000
+++ b/main.cpp Fri Dec 02 16:41:16 2016 +0000
@@ -1,12 +1,12 @@
#include "mbed.h"
#include "mcp3208.h"
-MCP3208 input1(dp2, dp1, dp6, dp9); //MCP3208(PinName mosi, PinName miso, PinName clk, PinName cs)
+MCP3208 input1(PA_7, PA_6, PA_5, PA_4); //MCP3208(PinName mosi, PinName miso, PinName clk, PinName cs)
// MCP3208 input1(p5, p6, p7, p8);
-Serial pc(dp16,dp15);
+//Serial pc(dp16,dp15);
// Serial pc(p9,p10);
-// Serial pc(USBTX, USBRX);
+ Serial pc(USBTX, USBRX);
Ticker datalog;
Timer t;
@@ -59,7 +59,7 @@
pc.baud(9600);
pc.printf("Working!!\n\r");
- datalog.attach_us(&log_data,1000000); // 1000us = 1ms
+ datalog.attach_us(&log_data,100000); // 1000us = 1ms
while(1) {
intToString(datastr0,input1.binary(0));
--- a/mbed.bld Wed Nov 16 23:47:52 2016 +0000 +++ b/mbed.bld Fri Dec 02 16:41:16 2016 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/mbed_official/code/mbed/builds/6c34061e7c34 \ No newline at end of file +http://mbed.org/users/mbed_official/code/mbed/builds/0ab6a29f35bf \ No newline at end of file
