Browse Source

updated test codes and firmware

Toby Chui 10 months ago
parent
commit
404e16d109
2 changed files with 7 additions and 5 deletions
  1. 2 2
      firmware/cute_useless_robot/tasks.ino
  2. 5 3
      firmware/display_test/display_test.ino

+ 2 - 2
firmware/cute_useless_robot/tasks.ino

@@ -68,7 +68,7 @@ void PrimaryController( void * pvParameters ) {
     //Loop of primary logics
     //setAnimationCode('a');
     //delay(10000);
-    /*
+    
     //Stepper test
     forward(50);
     delay(3000);
@@ -79,7 +79,7 @@ void PrimaryController( void * pvParameters ) {
     //rotate backward
     rotateClockwise(100);
     delay(3000);
-    */
+    
     //Servo test
     //Push button angle: 140
     //Servo arm vertical alignment angle: 125

+ 5 - 3
firmware/display_test/display_test.ino

@@ -5,6 +5,8 @@
 // User can enter text on the serial monitor and this will display as a
 // message on the display.
 // Library doc https://majicdesigns.github.io/MD_MAX72XX/class_m_d___m_a_x72_x_x.html
+//
+// THIS TEST CASE IS SUPPOSE TO BE RUN WITH ESP8266 (Wemos D1 Mini)
 
 #include <MD_MAX72xx.h>
 #include <SPI.h>
@@ -17,9 +19,9 @@
 #define HARDWARE_TYPE MD_MAX72XX::DR1CR0RR0_HW    
 #define MAX_DEVICES 8
 
-#define CLK_PIN   32  // or SCK
-#define DATA_PIN  33  // or MOSI
-#define CS_PIN    25 // or SS
+#define CLK_PIN   D2  // or SCK
+#define DATA_PIN  D3  // or MOSI
+#define CS_PIN    D4 // or SS
 
 // SPI hardware interface
 //MD_MAX72XX mx = MD_MAX72XX(HARDWARE_TYPE, CS_PIN, MAX_DEVICES);