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 NHK2021_ikarashiSV
Revision 0:1f76e79805d0, committed 2021-10-17
- Comitter:
- ikarashikota
- Date:
- Sun Oct 17 13:09:21 2021 +0000
- Commit message:
- add samplecode
Changed in this revision
diff -r 000000000000 -r 1f76e79805d0 NHK2021_ikarashiSV.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NHK2021_ikarashiSV.lib Sun Oct 17 13:09:21 2021 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/teams/NHK-Robocon2016_Nagaoka_B_Team/code/NHK2021_ikarashiSV/#d08346d0178a
diff -r 000000000000 -r 1f76e79805d0 main.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Sun Oct 17 13:09:21 2021 +0000
@@ -0,0 +1,28 @@
+#include "mbed.h"
+#include "ikarashiSV.h"
+
+Serial pc(USBTX, USBRX,115200);
+
+ikarashiSV slv(PC_7,PB_10,PB_4,PB_5);
+
+//ボタンを押したときor離したときを読み取る定義の仕方
+InterruptIn button(USER_BUTTON);
+
+void add()
+{
+ slv.add_state();
+}
+
+int main()
+{
+ int val;
+ while(1) {
+ button.fall(&add);
+ val = slv.state_show();
+ pc.printf("\t\tstate : %d",val);
+ if(val >= 1) {
+ slv.solenoid(val%3);
+ }
+ slv.solenoid_show();
+ }
+}
\ No newline at end of file
diff -r 000000000000 -r 1f76e79805d0 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Sun Oct 17 13:09:21 2021 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400 \ No newline at end of file