research-plan-programming

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
research-plan-programming [2024/06/26 18:02] daniel.chenresearch-plan-programming [2024/06/26 19:38] (current) daniel.chen
Line 1: Line 1:
-====== comprehensive report material programming ======+====== programming ====== 
 + 
 +[[daniel-chen| Daniel Chen]] 
 + 
 +==== These are the codes for testing if my robot is working correctly ==== 
  
 [[daniel-code-car-part| car part]] [[daniel-code-car-part| car part]]
  
 [[daniel-code-pen-part| pen part]] [[daniel-code-pen-part| pen part]]
-====== car part  ====== 
-input.onButtonPressed(Button.A, function () { 
-    wuKong.setMotorSpeed(wuKong.MotorList.M1, -100) 
-    wuKong.setMotorSpeed(wuKong.MotorList.M2, 100) 
-    T = 1 
-}) 
-input.onButtonPressed(Button.AB, function () { 
-    if (T == 1) { 
-        wuKong.setMotorSpeed(wuKong.MotorList.M1, 100) 
-        wuKong.setMotorSpeed(wuKong.MotorList.M2, 100) 
-        T = 0 
-    } else { 
-        wuKong.stopMotor(wuKong.MotorList.M1) 
-        wuKong.stopMotor(wuKong.MotorList.M2) 
-        T = 1 
-    } 
-}) 
-input.onButtonPressed(Button.B, function () { 
-    wuKong.setMotorSpeed(wuKong.MotorList.M1, 100) 
-    wuKong.setMotorSpeed(wuKong.MotorList.M2, -100) 
-    T = 1 
-}) 
-let T = 0 
-T = 1 
-====== pen part ====== 
  
-basic.forever(function () { +[[daniel-code-wheel-part| wheel part]] 
-    if (input.buttonIsPressed(Button.A)) { +
-        wuKong.setServoSpeed(wuKong.ServoList.S0, 20) +
-    } else { +
-        wuKong.setServoSpeed(wuKong.ServoList.S0, -100) +
-    } +
-}) +
-====== wheel part ====== +
-https://makecode.microbit.org/75006-20679-19973-89492+
  
-*This is a code written by someone else. This is not the final version, but it shows that omniscience can be use in micro bit. 
  • research-plan-programming.1719450158.txt.gz
  • Last modified: 2024/06/26 18:02
  • by daniel.chen