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.
Revision 0:ab6b71828f52, committed 2021-11-03
- Comitter:
- domemort
- Date:
- Wed Nov 03 15:36:25 2021 +0000
- Commit message:
- -
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/master.cpp Wed Nov 03 15:36:25 2021 +0000
@@ -0,0 +1,25 @@
+#include "mbed.h"
+
+SPI port(D11, D12, D13);
+DigitalOut cs(D7);
+AnalogIn adc_temp(ADC_TEMP);
+
+char buffer[2];
+
+int main(){
+ cs=1;
+ port.format(8,3);
+ port.frequency(1000000);
+ while(1){
+ cs=1;
+ buffer[0] = adc_temp.read();
+ buffer[1] = adc_temp.read()<<8;
+ cs=0;
+ port.write(buffer[0]);
+ cs=1;
+ cs=0;
+ port.write(buffer[1]);
+ wait_ms(50);
+ }
+
+ }
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Wed Nov 03 15:36:25 2021 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400 \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/slave.cpp Wed Nov 03 15:36:25 2021 +0000
@@ -0,0 +1,21 @@
+#include "mbed.h"
+
+SPISlave port(D11, D12, D13, D7);
+Serial pc(USBTX, USBRX);
+
+int main(){
+ while (1){
+
+
+
+
+
+ }
+
+
+
+
+
+
+
+ }
\ No newline at end of file