Sunday, 9 April 2017

CBiS Education Micro:Bit based Robot Car

At PiWars 2017 (1st-2nd April 2017), thanks to the generosity of CBiS Education, I now have one of their BBC micro:bit RobotCar . It is a sturdy bit of kit, encased in an aluminum chassis with a clear acrylic screen - it feels substantial when you pick it up. 

It is based around fours motors, control by a Micro:Bit, via L298N based motor controller/shield. Batteries power, 8 AAs, the motors and a Lithium powerbank to power the Micro:Bit - all included. 

More information about the technical details and example software can be found on their site https://www.cbis.education/robotic-car-kit# including further details on the L298N based motor controller/shield, which I found useful for programming it. 




I have experimented briefly with programming it in Python (micropython), getting it to it move forward, backward; to the right and left, using the Mu editor. 

The code is shown below for those who want to try it:

from microbit import *


def forward(n):
    pin13.write_digital(1)
    pin16.write_digital(1)
    sleep(n)
    
def backward(n):
    pin14.write_digital(1)
    pin15.write_digital(1)
    sleep(n)

def stopit(n):
    pin13.write_digital(0)
    pin14.write_digital(0)
    pin15.write_digital(0)
    pin16.write_digital(0)
    sleep(n)

def spinLeft(n):
    pin13.write_digital(1)
    pin15.write_digital(1)
    sleep(n)

def spinRight(n):
    pin14.write_digital(1)
    pin16.write_digital(1)
    sleep(n)


while True:
    forward(500)
    stopit(1000)
    backward(500)
    stopit(1000)
    spinRight(1000)
    stopit(1000)
    spinLeft(1000)
    stopit(1000)


This thing is quick. I like the feel of it, you pick it up and it doesn't feel like it is going to fall apart; because it comes all assembled - including batteries, it is ready to go. I look forward to trying some more ideas on it.



All opinions in this blog are the Author's and should not in any way be seen as reflecting the views of any organisation the Author has any association with. Twitter @scottturneruon

6 comments:

  1. "Your ability to make complex subjects accessible and interesting is truly a gift. You're a master at simplifying the intricate, and I'm grateful for that."
    cash app barcode to load money at 7-eleven

    ReplyDelete
  2. "The depth and breadth of topics covered on your blog are incredible. It's like having an encyclopedia of knowledge at my fingertips. Kudos to you!"
    who became one of the richest men in hungary thanks to a toy he developed

    ReplyDelete
  3. "I'm thoroughly impressed by the thoughtfulness and thoroughness of this blog. The author's dedication to providing quality content is evident, and it's a pleasure to read. Keep up the fantastic work!"
    safelite promo code

    ReplyDelete
  4. "I'm genuinely impressed by the author's ability to break down barriers in understanding. The use of analogies and metaphors to explain complex concepts makes the content not only accessible but also enjoyable. A true talent for effective communication!"
    spirit airlines gift card

    ReplyDelete
  5. The detailed insights and technical discussions showcase a commendable depth of knowledge. If you're a tech enthusiast shaping your workspace, consider 'biolife returning donor coupon $1000' for potential savings on furnishings to complement your cutting-edge interests.

    ReplyDelete
  6. This comment has been removed by the author.

    ReplyDelete

Who wants to produce AI produced cartoon strips

Question: How easy is it produce a comic/cartoon using genetative AI? Let's start with  using ChatGPT4o to produce cartoons. The idea wa...