ffwe

Dependencies:   ADXL345_I2C HX711 MPU6050 PCF8563

Files at this revision

API Documentation at this revision

Comitter:
3050311118
Date:
Mon Jul 17 14:05:07 2017 +0000
Commit message:
fqfqw

Changed in this revision

ADXL345_I2C.lib Show annotated file Show diff for this revision Revisions of this file
HX711.lib Show annotated file Show diff for this revision Revisions of this file
MPU6050.lib Show annotated file Show diff for this revision Revisions of this file
PCF8563.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed-os.lib Show annotated file Show diff for this revision Revisions of this file
user/TaskExtMeasureRecv.cpp Show annotated file Show diff for this revision Revisions of this file
user/TaskHmiRecv.cpp Show annotated file Show diff for this revision Revisions of this file
user/TaskHmiRefresh.cpp Show annotated file Show diff for this revision Revisions of this file
user/TaskKey.cpp Show annotated file Show diff for this revision Revisions of this file
user/TaskMain.cpp Show annotated file Show diff for this revision Revisions of this file
user/TaskMotorCtrl.cpp Show annotated file Show diff for this revision Revisions of this file
user/TaskRs485Recv.cpp Show annotated file Show diff for this revision Revisions of this file
user/TaskTempCtrl.cpp Show annotated file Show diff for this revision Revisions of this file
user/TaskUSBRecv.cpp Show annotated file Show diff for this revision Revisions of this file
user/TaskWifiRecv.cpp Show annotated file Show diff for this revision Revisions of this file
user/UserValues.cpp Show annotated file Show diff for this revision Revisions of this file
user/UserValues.h Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r 24fa1506a4b6 ADXL345_I2C.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ADXL345_I2C.lib	Mon Jul 17 14:05:07 2017 +0000
@@ -0,0 +1,1 @@
+https://developer.mbed.org/users/3050311118/code/ADXL345_I2C/#5b9a05540474
diff -r 000000000000 -r 24fa1506a4b6 HX711.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/HX711.lib	Mon Jul 17 14:05:07 2017 +0000
@@ -0,0 +1,1 @@
+https://mbed.org/users/Volt72/code/HX711/#5d57c2060e7b
diff -r 000000000000 -r 24fa1506a4b6 MPU6050.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MPU6050.lib	Mon Jul 17 14:05:07 2017 +0000
@@ -0,0 +1,1 @@
+https://developer.mbed.org/users/3050311118/code/MPU6050/#cd30a8ec605c
diff -r 000000000000 -r 24fa1506a4b6 PCF8563.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/PCF8563.lib	Mon Jul 17 14:05:07 2017 +0000
@@ -0,0 +1,1 @@
+https://developer.mbed.org/users/3050311118/code/PCF8563/#bcea5c3f58f4
diff -r 000000000000 -r 24fa1506a4b6 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Mon Jul 17 14:05:07 2017 +0000
@@ -0,0 +1,98 @@
+#include "mbed.h"
+#include "rtos.h"
+ 
+
+Thread thread_HmiRefresh;//
+// thread_ExtMeasureRecv,
+//             thread_HmiRecv,
+//             thread_HmiRefresh,
+//             thread_Key,
+//             thread_Main,
+//             thread_MotorCtrl,
+//             thread_Rs485Recv,
+//             thread_TempCtrl,
+//             thread_USBRecv,
+//             thread_WifiRecv;
+
+
+extern void vExtMeasureRecvTask(  );
+extern void vHmiRecvTask(  );
+extern void vHmiRefreshTask(  );
+extern void vKeyTask(  );
+extern void vMainTask(  );
+extern void vMotorCtrlTask(  );
+extern void vRs485RecvTask(  );
+extern void vTempCtrlTask(  );
+extern void vUSBRecvTask(  );
+extern void vWifiRecvTask(  );
+
+int main()
+{
+//    thread_ExtMeasureRecv.start(vExtMeasureRecvTask);
+//    thread_HmiRecv.start(vHmiRecvTask);
+    thread_HmiRefresh.start(vHmiRefreshTask);
+//    thread_Key.start(vKeyTask);
+//    thread_Main.start(vMainTask);
+//    thread_MotorCtrl.start(vMotorCtrlTask);
+//    thread_Rs485Recv.start(vRs485RecvTask);
+//    thread_TempCtrl.start(vTempCtrlTask);
+//    thread_USBRecv.start(vUSBRecvTask);
+//    thread_WifiRecv.start(vWifiRecvTask);
+    
+    
+    while (true) {
+                
+          Thread::wait(500);
+    }
+}
+
+
+
+//#include "mbed.h"
+//#include "rtos.h"
+//#include "HX711.h"
+//#include "ADXL345_I2C.h"
+//#include "MPU6050.h"
+//#include "PCF8563.h"
+//
+//Serial usart2(USBTX,USBRX);
+//DigitalOut led1(PB_15);
+//HX711 hx711(PC_0,PC_1);
+//ADXL345_I2C adxl(PB_7, PB_6);
+//MPU6050 mpu6050;
+//PCF8563 pcf8563(PB_7,PB_6);
+//InterruptIn rtcInt(PC_15);
+//
+//int interrupt=0;
+//void timeInt()
+//{
+//   interrupt=1;
+//}
+//
+//void print_thread(void const *argument)
+//{
+//    while (true) {
+//        Thread::wait(500); 
+//        usart2.printf("hx711 %ld \r\n",hx711.getValue());    
+////        usart2.printf("mpu6050 %d \r\n",mpu6050.getAccelerationX()); 
+// //       usart2.printf("adxl %d \r\n",adxl.getDevId());  
+////        time_t seconds=pcf8563.now();   
+////        usart2.printf("pcf8563 %s \r\n",ctime(&seconds)); 
+//        if(interrupt) 
+//        {
+//            usart2.printf("pcf856 ");
+//            interrupt=0;
+//        } 
+//    }
+//}
+//
+//int main()
+//{
+//    mpu6050.initialize();
+//    rtcInt.fall(&timeInt);
+//    Thread thread(print_thread, NULL, osPriorityNormal, DEFAULT_STACK_SIZE);
+//    while (true) {
+//        led1 = !led1;
+//        Thread::wait(500);
+//    }
+//}
\ No newline at end of file
diff -r 000000000000 -r 24fa1506a4b6 mbed-os.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed-os.lib	Mon Jul 17 14:05:07 2017 +0000
@@ -0,0 +1,1 @@
+https://github.com/ARMmbed/mbed-os/#2885c1b41e63158cb6faf5f107cd821ae06ef26c
diff -r 000000000000 -r 24fa1506a4b6 user/TaskExtMeasureRecv.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/user/TaskExtMeasureRecv.cpp	Mon Jul 17 14:05:07 2017 +0000
@@ -0,0 +1,9 @@
+#include "mbed.h"
+#include "rtos.h"
+
+void vExtMeasureRecvTask()
+{
+    while (true) {
+        Thread::wait(1000);
+    }
+}
diff -r 000000000000 -r 24fa1506a4b6 user/TaskHmiRecv.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/user/TaskHmiRecv.cpp	Mon Jul 17 14:05:07 2017 +0000
@@ -0,0 +1,9 @@
+#include "mbed.h"
+#include "rtos.h"
+
+void vHmiRecvTask()
+{
+    while (true) {
+        Thread::wait(1000);
+    }
+}
diff -r 000000000000 -r 24fa1506a4b6 user/TaskHmiRefresh.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/user/TaskHmiRefresh.cpp	Mon Jul 17 14:05:07 2017 +0000
@@ -0,0 +1,12 @@
+#include "mbed.h"
+#include "rtos.h"
+
+extern Serial usart2;
+
+void vHmiRefreshTask()
+{
+    while (true) {
+				usart2.printf("hello worlyyy\r\n");
+        Thread::wait(1000);
+    }
+}
diff -r 000000000000 -r 24fa1506a4b6 user/TaskKey.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/user/TaskKey.cpp	Mon Jul 17 14:05:07 2017 +0000
@@ -0,0 +1,9 @@
+#include "mbed.h"
+#include "rtos.h"
+
+void vKeyTask()
+{
+    while (true) {
+        Thread::wait(1000);
+    }
+}
diff -r 000000000000 -r 24fa1506a4b6 user/TaskMain.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/user/TaskMain.cpp	Mon Jul 17 14:05:07 2017 +0000
@@ -0,0 +1,9 @@
+#include "mbed.h"
+#include "rtos.h"
+
+void vMainTask()
+{
+    while (true) {
+        Thread::wait(1000);
+    }
+}
diff -r 000000000000 -r 24fa1506a4b6 user/TaskMotorCtrl.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/user/TaskMotorCtrl.cpp	Mon Jul 17 14:05:07 2017 +0000
@@ -0,0 +1,9 @@
+#include "mbed.h"
+#include "rtos.h"
+
+void vMotorCtrlTask()
+{
+    while (true) {
+        Thread::wait(1000);
+    }
+}
diff -r 000000000000 -r 24fa1506a4b6 user/TaskRs485Recv.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/user/TaskRs485Recv.cpp	Mon Jul 17 14:05:07 2017 +0000
@@ -0,0 +1,9 @@
+#include "mbed.h"
+#include "rtos.h"
+
+void vRs485RecvTask()
+{
+    while (true) {
+        Thread::wait(1000);
+    }
+}
diff -r 000000000000 -r 24fa1506a4b6 user/TaskTempCtrl.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/user/TaskTempCtrl.cpp	Mon Jul 17 14:05:07 2017 +0000
@@ -0,0 +1,9 @@
+#include "mbed.h"
+#include "rtos.h"
+
+void vTempCtrlTask()
+{
+    while (true) {
+        Thread::wait(1000);
+    }
+}
diff -r 000000000000 -r 24fa1506a4b6 user/TaskUSBRecv.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/user/TaskUSBRecv.cpp	Mon Jul 17 14:05:07 2017 +0000
@@ -0,0 +1,9 @@
+#include "mbed.h"
+#include "rtos.h"
+
+void vUSBRecvTask()
+{
+    while (true) {
+        Thread::wait(1000);
+    }
+}
diff -r 000000000000 -r 24fa1506a4b6 user/TaskWifiRecv.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/user/TaskWifiRecv.cpp	Mon Jul 17 14:05:07 2017 +0000
@@ -0,0 +1,9 @@
+#include "mbed.h"
+#include "rtos.h"
+
+void vWifiRecvTask()
+{
+    while (true) {
+        Thread::wait(1000);
+    }
+}
diff -r 000000000000 -r 24fa1506a4b6 user/UserValues.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/user/UserValues.cpp	Mon Jul 17 14:05:07 2017 +0000
@@ -0,0 +1,32 @@
+#include "mbed.h"
+#include "rtos.h"
+
+//���ڶ���
+Serial usart1(PA_9,PA_10);
+Serial usart2(USBTX,USBRX);
+Serial usart3(PB_10,PB_11);
+Serial usart4(PC_10,PC_11);
+//ģ��ڶ���
+AnalogIn ADC_ref431(PB_1);
+AnalogIn ADC_safeadj(PA_4);
+AnalogIn ADC_pt100A(PA_5);
+AnalogIn ADC_pt100B(PA_6);
+AnalogIn ADC_pt1000C(PA_7);
+//�������
+AnalogIn ADC_MOTOR_TORQUE(PB_0);
+PwmOut PWM_MOTOR(PC_8);
+InterruptIn INT_MOTOR(PC_4);
+DigitalOut O_MOTOR_CWCCW(PC_3);
+DigitalOut O_MOTOR_START(PC_2);
+//���ȿ���
+DigitalOut O_HEAT(PC_8);
+DigitalOut O_RELAY(PC_14);
+//�������
+DigitalIn I_UPKEY(PA_15);
+DigitalIn I_DOWNKEY(PB_4);
+DigitalIn I_LEFTKEY(PB_8);
+DigitalIn I_RIGHTKEY(PB_12);
+
+DigitalIn I_ENCODERKEY(PA_8);
+
+
diff -r 000000000000 -r 24fa1506a4b6 user/UserValues.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/user/UserValues.h	Mon Jul 17 14:05:07 2017 +0000
@@ -0,0 +1,1 @@
+