Skip to content

Wall Detection and Integrated Charging addition for KS4031 Keyestudio 4WD Mecanum Robot Car

License

Notifications You must be signed in to change notification settings

microbit-cz/Keyestudio-4WD-RobotCar-IR-upgrade

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 

Repository files navigation

Wall Detection and Integrated Charging addition for KS4031 Keyestudio 4WD Mecanum Robot Car

Czech English

Welcome!

The wall detection feature uses sensors to detect the presence of obstacles in 180° radius such as walls and other objects in the car's path, allowing the car to automatically stop or change its direction to avoid collisions. This feature can be particularly useful in situations where the car is operating in a confined space or navigating through a complex environment such as Maze.

The integrated charging through USB-C can save time and improve convenience by allowing users to quickly and easily recharge the car without the need for additional equipment or cables.

Documentation


Functionality test

pins.setPull(DigitalPin.P0, PinPullMode.PullNone);
pins.setPull(DigitalPin.P7, PinPullMode.PullNone);
pins.setPull(DigitalPin.P12, PinPullMode.PullNone);
pins.setPull(DigitalPin.P13, PinPullMode.PullNone);

while (true) {
  let front_P = pins.digitalReadPin(DigitalPin.P12);
  let front_L = pins.digitalReadPin(DigitalPin.P7);
  let left = pins.digitalReadPin(DigitalPin.P0);
  let right = pins.digitalReadPin(DigitalPin.P13);

  console.log("front_P: " + front_P);
  console.log("front_L: " + front_L);
  console.log("left: " + left);
  console.log("right: " + right);
  pause(100);
}

The given code snippet assigns the digital readings from the IR sensors to respective variables: front_P, front_L, left, and right. The console.log statements display the values of each sensor to the Console.


About

Wall Detection and Integrated Charging addition for KS4031 Keyestudio 4WD Mecanum Robot Car

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published