Motobit , unable to code sensors with it in make code.! HELP PLZ

Hello,

I’m new to robotics and I’m currently trying to create a 2WD MOTOBit car using MicroBit. I have encountered two issues:

Items I am using :

  • MOTOBIT Board

    Microbit

    2Wd car chassis

    2 IR sensors

    1 Ultrasonic Sensor

  • problem Number 1: Line Following Robot Car
    I have two IR sensors that I need to code. Although they’re correctly connected, I’m having difficulties coding them in MakeCode. Can anyone guide me? I have attached a picture for reference.

    This SENSOR : https://www.google.com/url?sa=i&url=htt … AdAAAAABAE

    Problem Number 2: Obstacle Avoidance Robot Car
    I have an Ultrasonic HRC sensor with 4 pins, but the MOTOBit only has 3 pin inputs. Where should I connect the Echo pin? Also, I need help with coding for this setup.

    I greatly appreciate any assistance. Thank you so much.

    For the 1st one you’d just need to read the analog voltage being output from the sensor/into the board

    For the ultrasonic go through this https://randomnerdtutorials.com/complet … r-hc-sr04/ and wire it Trig & Echo to 2 of the digital pins…or purchase our version https://www.sparkfun.com/products/17777 that can be used over qwiic! :slight_smile:

    ok thanks, and what about IR sensors? we have a competition and i cant CODE it, i need MAke code Coding snippets