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: mbed SDFileSystem
Diff: main.cpp
- Revision:
- 0:cb620b090bf4
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Mon Mar 02 14:45:01 2020 +0000
@@ -0,0 +1,65 @@
+#include "mbed.h"
+#include "max6675.h"
+#include "max6675_2.h"
+#include "max6675_3.h"
+#include "max6675_4.h"
+#include "SDFileSystem.h"
+#include <time.h>
+#include <stdio.h>
+
+DigitalOut led_1(LED1);
+DigitalOut led_2(LED2);
+DigitalOut led_3(LED3);
+DigitalOut led_4(LED4);
+SPI spi(p11,p12,p13);
+max6675 max(spi,p18);
+SPI spi_2(p11,p12,p13);
+max6675_2 max_2(spi_2,p21);
+SPI spi_3(p11,p12,p13);
+max6675_3 max_3(spi_3,p22);
+SPI spi_4(p11,p12,p13);
+max6675_4 max_4(spi_4,p23);
+AnalogIn LM61(p15);
+SDFileSystem sd(p5, p6, p7, p8, "sd"); // the pinout on the mbed Cool Components workshop board
+Serial pc(USBTX,USBRX);
+DigitalIn swi_1(p23); //p5~p30のどれでも良い
+DigitalIn swi_2(p22); //p5~p30のどれでも良い
+
+void led()
+{
+ led_1 = 1;
+ led_2 = 1;
+ led_3 = 1;
+ led_4 = 1;
+ wait(.2);
+
+ led_1 = 0;
+ led_2 = 0;
+ led_3 = 0;
+ led_4 = 0;
+ wait(.2);
+
+ led_1 = 1;
+ led_2 = 1;
+ led_3 = 1;
+ led_4 = 1;
+ wait(.2);
+
+ led_1 = 0;
+ led_2 = 0;
+ led_3 = 0;
+ led_4 = 0;
+ wait(.2);
+}
+
+
+int main() {
+ while(1) {
+ myled = 1;
+ wait(0.2);
+ myled = 0;
+ wait(0.2);
+ float i = .54;
+ printf("%f",i)
+ }
+}