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.
Diff: main.cpp
- Revision:
- 0:4ff8aeb3e4d1
- Child:
- 1:2594a70c1ddd
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Fri Apr 02 05:24:49 2021 +0000
@@ -0,0 +1,54 @@
+/* mbed Microcontroller Library
+ * Copyright (c) 2019 ARM Limited
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * 20201024 Thread example :
+ * got from https://os.mbed.com/docs/mbed-os/v6.3/apis/thread.html
+ */
+#define NO_ROS 0
+#include "mbedHeader.hpp"
+#include "robotConfig.h"
+#include "rosHeader.hpp"
+#include "moduleHeader.hpp"
+#include "defineHeader.h"
+#include "instanceHeader.hpp"
+#include "myUtil.hpp"
+#include "globalVariable.h"
+#include "initFunction.hpp"
+#include "threadDeclaration.hpp"
+#include "callbackHeader.hpp"
+
+/* function protopytes begin ------------------------------------------------ */
+
+/* function protopytes end -------------------------------------------------- */
+
+
+/* Instancs begin ----------------------------------------------------------- */
+#if (NO_ROS)
+mbed::Serial pc(USBTX, USBRX);
+#else
+ros::NodeHandle nh;
+#endif
+//MODULE module(BOOSTPUMP_PIN, SOLENOID_PIN, PURIFIER_PWM_PIN, PURIFIER_BR_PIN, UVC_PIN);
+MODULE module(PURIFIER_PWM_PIN, PURIFIER_BR_PIN, UVC_PIN);
+Serial bt(BT_TX,BT_RX);
+#define CALIBRATION_MODE 1
+/* Instancs end ------------------------------------------------------------- */
+int main() {
+ SystemCoreClockUpdate();
+#if (NO_ROS)
+ initSerial();
+ //pc.printf("- Start of Program. CPU SystemCoreClock is %d Hz\r\n", SystemCoreClock);
+#else
+ initROS();
+#endif
+ //initBT();
+ initThread();
+ while(1) {;}
+#if (NO_ROS)
+ pc.printf("- End of Program\r\n");
+#endif
+ return 0;
+}
+
+/***** EOF *****/
\ No newline at end of file